OSDN Git Service

Sort changesets in the same order as comments on the issue details view (#1546).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 22 Feb 2009 15:16:18 +0000 (15:16 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 22 Feb 2009 15:16:18 +0000 (15:16 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2519 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/issues_controller.rb
app/views/issues/show.rhtml

index 8aa4630..d4d1bb6 100644 (file)
@@ -98,6 +98,8 @@ class IssuesController < ApplicationController
     @journals = @issue.journals.find(:all, :include => [:user, :details], :order => "#{Journal.table_name}.created_on ASC")
     @journals.each_with_index {|j,i| j.indice = i+1}
     @journals.reverse! if User.current.wants_comments_in_reverse_order?
+    @changesets = @issue.changesets
+    @changesets.reverse! if User.current.wants_comments_in_reverse_order?
     @allowed_statuses = @issue.new_statuses_allowed_to(User.current)
     @edit_allowed = User.current.allowed_to?(:edit_issues, @project)
     @priorities = Enumeration.priorities
index cd18dfa..946411e 100644 (file)
@@ -86,10 +86,10 @@ end %>
 
 </div>
 
-<% if @issue.changesets.any? && User.current.allowed_to?(:view_changesets, @project) %>
+<% if @changesets.any? && User.current.allowed_to?(:view_changesets, @project) %>
 <div id="issue-changesets">
 <h3><%=l(:label_associated_revisions)%></h3>
-<%= render :partial => 'changesets', :locals => { :changesets => @issue.changesets} %>
+<%= render :partial => 'changesets', :locals => { :changesets => @changesets} %>
 </div>
 <% end %>