Moves relations fetching from views to the controller and skip invalid relations (#7385).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4741 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2011-01-22 13:28:20 +00:00
parent 07a49b94ad
commit b8dee485ca
3 changed files with 5 additions and 4 deletions
+1
View File
@@ -108,6 +108,7 @@ class IssuesController < ApplicationController
@journals.reverse! if User.current.wants_comments_in_reverse_order?
@changesets = @issue.changesets.visible.all
@changesets.reverse! if User.current.wants_comments_in_reverse_order?
@relations = @issue.relations.select {|r| r.other_issue(@issue) && r.other_issue(@issue).visible? }
@allowed_statuses = @issue.new_statuses_allowed_to(User.current)
@edit_allowed = User.current.allowed_to?(:edit_issues, @project)
@priorities = IssuePriority.all