From 0101e609f72a749aad8ff3ec27157320d53461b6 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 22 Feb 2009 15:16:18 +0000 Subject: [PATCH] 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 --- app/controllers/issues_controller.rb | 2 ++ app/views/issues/show.rhtml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 8aa463019..d4d1bb611 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -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 diff --git a/app/views/issues/show.rhtml b/app/views/issues/show.rhtml index cd18dfa09..946411e0b 100644 --- a/app/views/issues/show.rhtml +++ b/app/views/issues/show.rhtml @@ -86,10 +86,10 @@ end %> -<% if @issue.changesets.any? && User.current.allowed_to?(:view_changesets, @project) %> +<% if @changesets.any? && User.current.allowed_to?(:view_changesets, @project) %>

<%=l(:label_associated_revisions)%>

-<%= render :partial => 'changesets', :locals => { :changesets => @issue.changesets} %> +<%= render :partial => 'changesets', :locals => { :changesets => @changesets} %>
<% end %> -- 2.39.5