Sort changesets in the same order as comments on the issue details view (#1546).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2519 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2009-02-22 15:16:18 +00:00
parent a64b8695c8
commit 0101e609f7
2 changed files with 4 additions and 2 deletions

View 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

View 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 %>