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

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

index d11541ec7fa8c9852d6abb89ccb93fa3b2b36902..028626e35def6deaf9f82638270f64cabb8d025e 100644 (file)
@@ -25,6 +25,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 edit
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>