Added parent project name (if it exists) on project list and project overview.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@404 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2007-04-02 20:17:02 +00:00
parent 3c8a38212e
commit 6e1b9326e4
3 changed files with 10 additions and 4 deletions
+3 -2
View File
@@ -39,14 +39,15 @@ class ProjectsController < ApplicationController
# Lists public projects
def list
sort_init 'name', 'asc'
sort_init "#{Project.table_name}.name", "asc"
sort_update
@project_count = Project.count(:all, :conditions => ["is_public=?", true])
@project_pages = Paginator.new self, @project_count,
15,
params['page']
@projects = Project.find :all, :order => sort_clause,
:conditions => ["is_public=?", true],
:conditions => ["#{Project.table_name}.is_public=?", true],
:include => :parent,
:limit => @project_pages.items_per_page,
:offset => @project_pages.current.offset