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
+2 -2
View File
@@ -6,9 +6,9 @@
<p><strong><%=l(:label_related_issues)%></strong></p>
<% if @issue.relations.any? %>
<% if @relations.present? %>
<table style="width:100%">
<% @issue.relations.select {|r| r.other_issue(@issue).visible? }.each do |relation| %>
<% @relations.each do |relation| %>
<tr>
<td><%= l(relation.label_for(@issue)) %> <%= "(#{l('datetime.distance_in_words.x_days', :count => relation.delay)})" if relation.delay && relation.delay != 0 %>
<%= h(relation.other_issue(@issue).project) + ' - ' if Setting.cross_project_issue_relations? %>