Show only visible children/ancestors on project overview.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/work@2278 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2009-01-18 08:35:00 +00:00
parent 4c7e1629a3
commit aaeba2dd20
2 changed files with 9 additions and 6 deletions

View File

@@ -80,7 +80,8 @@ class ProjectsController < ApplicationController
# Show @project
def show
@members_by_role = @project.members.find(:all, :include => [:user, :role], :order => 'position').group_by {|m| m.role}
@subprojects = @project.children.find(:all, :conditions => Project.visible_by(User.current))
@subprojects = @project.children.visible
@ancestors = @project.ancestors.visible
@news = @project.news.find(:all, :limit => 5, :include => [ :author, :project ], :order => "#{News.table_name}.created_on DESC")
@trackers = @project.rolled_up_trackers