OSDN Git Service

Issue history is now 'oldest first' sorted.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 14 Aug 2007 09:02:40 +0000 (09:02 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 14 Aug 2007 09:02:40 +0000 (09:02 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@630 e93f8b46-1217-0410-a6f0-8f06a7374b81

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

index 6268cd3..31cc6ae 100644 (file)
@@ -37,7 +37,7 @@ class IssuesController < ApplicationController
   def show
     @status_options = @issue.status.find_new_statuses_allowed_to(logged_in_user.role_for_project(@project), @issue.tracker) if logged_in_user
     @custom_values = @issue.custom_values.find(:all, :include => :custom_field)
-    @journals = @issue.journals.find(:all, :include => [:user, :details], :order => "#{Journal.table_name}.created_on desc")
+    @journals = @issue.journals.find(:all, :include => [:user, :details], :order => "#{Journal.table_name}.created_on ASC")
   end
   
   def export_pdf
index 1ad0c23..bab37b4 100644 (file)
@@ -1,4 +1,4 @@
-<% note_id = journals.length %>
+<% note_id = 1 %>
 <% for journal in journals %>
        <h4><div style="float:right;"><%= link_to "##{note_id}", :anchor => "note-#{note_id}" %></div>
        <%= content_tag('a', '', :name => "note-#{note_id}")%>
@@ -9,5 +9,5 @@
        <% end %>
        </ul>
        <%= textilizable(journal.notes) unless journal.notes.blank? %>
-       <% note_id -= 1 %>
+       <% note_id += 1 %>
 <% end %>