Commit 0101e609 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

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
parent a64b8695
...@@ -98,6 +98,8 @@ class IssuesController < ApplicationController ...@@ -98,6 +98,8 @@ class IssuesController < ApplicationController
@journals = @issue.journals.find(:all, :include => [:user, :details], :order => "#{Journal.table_name}.created_on ASC") @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.each_with_index {|j,i| j.indice = i+1}
@journals.reverse! if User.current.wants_comments_in_reverse_order? @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) @allowed_statuses = @issue.new_statuses_allowed_to(User.current)
@edit_allowed = User.current.allowed_to?(:edit_issues, @project) @edit_allowed = User.current.allowed_to?(:edit_issues, @project)
@priorities = Enumeration.priorities @priorities = Enumeration.priorities
......
...@@ -86,10 +86,10 @@ end %> ...@@ -86,10 +86,10 @@ end %>
</div> </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"> <div id="issue-changesets">
<h3><%=l(:label_associated_revisions)%></h3> <h3><%=l(:label_associated_revisions)%></h3>
<%= render :partial => 'changesets', :locals => { :changesets => @issue.changesets} %> <%= render :partial => 'changesets', :locals => { :changesets => @changesets} %>
</div> </div>
<% end %> <% end %>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment