]> source.dussan.org Git - redmine.git/commitdiff
Merged r3865 and r3866 from trunk.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 25 Jul 2010 09:34:04 +0000 (09:34 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 25 Jul 2010 09:34:04 +0000 (09:34 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3867 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/versions_controller.rb
app/views/versions/show.rhtml

index 05c9743eb1699ac96d31c09cbe89e84d95b74f9e..46b4778d40c6648ea3e37ad4c6d0841f84d28540 100644 (file)
@@ -27,6 +27,9 @@ class VersionsController < ApplicationController
   helper :projects
   
   def show
+    @issues = @version.fixed_issues.visible.find(:all,
+      :include => [:status, :tracker, :priority],
+      :order => "#{Tracker.table_name}.position, #{Issue.table_name}.id")
   end
   
   def new
index 18bc6bc45be1825eb2d1abac90d333c70ca398f8..79de5984b7703a9c36bdb9dac91da27529a6b118 100644 (file)
 <%= render :partial => 'versions/overview', :locals => {:version => @version} %>
 <%= render(:partial => "wiki/content", :locals => {:content => @version.wiki_page.content}) if @version.wiki_page %>
 
-<% issues = @version.fixed_issues.find(:all,
-                                       :include => [:status, :tracker, :priority],
-                                       :order => "#{Tracker.table_name}.position, #{Issue.table_name}.id") %>
-<% if issues.size > 0 %>
+<% if @issues.present? %>
 <fieldset class="related-issues"><legend><%= l(:label_related_issues) %></legend>
 <ul>
-<% issues.each do |issue| -%>
+<% @issues.each do |issue| -%>
     <li><%= link_to_issue(issue) %></li>
 <% end -%>
 </ul>