summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Nichols <nichoj@gentoo.org>2007-05-25 01:55:45 +0000
committerJoshua Nichols <nichoj@gentoo.org>2007-05-25 01:55:45 +0000
commitf0e75d07f8b7264392db60f69b5e2b7ebbb63c59 (patch)
treea0a5b3d30586adb9f179ebc38b5d6d7befa490ec
parentSome display changes. (diff)
downloadnichoj-f0e75d07f8b7264392db60f69b5e2b7ebbb63c59.tar.gz
nichoj-f0e75d07f8b7264392db60f69b5e2b7ebbb63c59.tar.bz2
nichoj-f0e75d07f8b7264392db60f69b5e2b7ebbb63c59.zip
Checkin...
svn path=/; revision=103
-rw-r--r--projects/devdashboard/app/controllers/developers_controller.rb14
-rw-r--r--projects/devdashboard/app/models/developer.rb2
-rw-r--r--projects/devdashboard/app/models/herd.rb2
-rw-r--r--projects/devdashboard/db/schema.rb9
4 files changed, 21 insertions, 6 deletions
diff --git a/projects/devdashboard/app/controllers/developers_controller.rb b/projects/devdashboard/app/controllers/developers_controller.rb
index 1644797..596f119 100644
--- a/projects/devdashboard/app/controllers/developers_controller.rb
+++ b/projects/devdashboard/app/controllers/developers_controller.rb
@@ -8,16 +8,24 @@ class DevelopersController < ApplicationController
USERINFO = '/home/nichoj/checkouts/gentoo/xml/htdocs/proj/en/devrel/roll-call/userinfo.xml'
def index
- list
- render :action => 'list'
+ actives
end
# GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
verify :method => :post, :only => [ :destroy, :create, :update ],
:redirect_to => { :action => :list }
+ def retired
+ @developer_pages, @developers = paginate :developers,
+ :per_page => 10,
+ :conditions => [ "status = 'retired'" ]
+ render :action => 'list'
+ end
+
def list
- @developer_pages, @developers = paginate :developers, :per_page => 10
+ @developer_pages, @developers = paginate :developers,
+ :per_page => 10,
+ :conditions => [ "status = 'active'" ]
end
def show
diff --git a/projects/devdashboard/app/models/developer.rb b/projects/devdashboard/app/models/developer.rb
index 39b20e3..50a2029 100644
--- a/projects/devdashboard/app/models/developer.rb
+++ b/projects/devdashboard/app/models/developer.rb
@@ -7,7 +7,7 @@ class Developer < ActiveRecord::Base
has_many :project_members
validates_presence_of :nickname
- USERINFO = '/home/nichoj/checkouts/gentoo/xml/htdocs/proj/en/devrel/roll-call/userinfo.xml'
+ USERINFO = '/home/jnichols/checkouts/gentoo-website/xml/htdocs/proj/en/devrel/roll-call/userinfo.xml'
PLANET_INI_URL = 'http://sources.gentoo.org/viewcvs.py/*checkout*/planet/configs/planet.ini'
def cia_rss_url
diff --git a/projects/devdashboard/app/models/herd.rb b/projects/devdashboard/app/models/herd.rb
index f08a2be..c545e4b 100644
--- a/projects/devdashboard/app/models/herd.rb
+++ b/projects/devdashboard/app/models/herd.rb
@@ -7,7 +7,7 @@ class Herd < ActiveRecord::Base
validates_presence_of :name
- HERDS_XML = '/home/nichoj/checkouts/gentoo/xml/htdocs/proj/en/metastructure/herds/herds.xml'
+ HERDS_XML = '/home/jnichols/checkouts/gentoo-website/xml/htdocs/proj/en/metastructure/herds/herds.xml'
def Herd.load_from_xml
file = File.new(HERDS_XML)
diff --git a/projects/devdashboard/db/schema.rb b/projects/devdashboard/db/schema.rb
index 5ece916..5e40dd7 100644
--- a/projects/devdashboard/db/schema.rb
+++ b/projects/devdashboard/db/schema.rb
@@ -2,7 +2,7 @@
# migrations feature of ActiveRecord to incrementally modify your database, and
# then regenerate this schema definition.
-ActiveRecord::Schema.define(:version => 3) do
+ActiveRecord::Schema.define(:version => 4) do
create_table "developers", :force => true do |t|
t.column "nickname", :string
@@ -27,6 +27,13 @@ ActiveRecord::Schema.define(:version => 3) do
t.column "description", :text
end
+ create_table "project_members", :force => true do |t|
+ t.column "role", :string
+ t.column "description", :text
+ t.column "project_id", :integer
+ t.column "developer_id", :integer
+ end
+
create_table "projects", :force => true do |t|
t.column "name", :string
t.column "longname", :string