@@ -37,13 +37,7 class IssuesController < ApplicationController | |||
|
37 | 37 | def show |
|
38 | 38 | @status_options = @issue.status.find_new_statuses_allowed_to(logged_in_user.role_for_project(@project), @issue.tracker) if logged_in_user |
|
39 | 39 | @custom_values = @issue.custom_values.find(:all, :include => :custom_field) |
|
40 | @journals_count = @issue.journals.count | |
|
41 | @journals = @issue.journals.find(:all, :include => [:user, :details], :limit => 15, :order => "#{Journal.table_name}.created_on desc") | |
|
42 | end | |
|
43 | ||
|
44 | def history | |
|
45 | 40 | @journals = @issue.journals.find(:all, :include => [:user, :details], :order => "#{Journal.table_name}.created_on desc") |
|
46 | @journals_count = @journals.length | |
|
47 | 41 | end |
|
48 | 42 | |
|
49 | 43 | def export_pdf |
@@ -1,11 +1,13 | |||
|
1 | <% note_id = journals.length %> | |
|
1 | 2 | <% for journal in journals %> |
|
2 | <h4><%= format_time(journal.created_on) %> - <%= journal.user.name %></h4> | |
|
3 | <h4><div style="float:right;"><%= link_to "##{note_id}", :anchor => "note-#{note_id}" %></div> | |
|
4 | <%= content_tag('a', '', :name => "note-#{note_id}")%> | |
|
5 | <%= format_time(journal.created_on) %> - <%= journal.user.name %></h4> | |
|
3 | 6 | <ul> |
|
4 | 7 | <% for detail in journal.details %> |
|
5 | 8 | <li><%= show_detail(detail) %></li> |
|
6 | 9 | <% end %> |
|
7 | 10 | </ul> |
|
8 | <% if journal.notes? %> | |
|
9 | <%= textilizable(journal.notes) %> | |
|
10 | <% end %> | |
|
11 | <%= textilizable(journal.notes) unless journal.notes.blank? %> | |
|
12 | <% note_id -= 1 %> | |
|
11 | 13 | <% end %> |
@@ -81,14 +81,10 end %> | |||
|
81 | 81 | </div> |
|
82 | 82 | <% end %> |
|
83 | 83 | |
|
84 |
<% if @journals |
|
|
84 | <% if @journals.any? %> | |
|
85 | 85 | <div id="history" class="box"> |
|
86 | <h3><%=l(:label_history)%> | |
|
87 | <% if @journals_count > @journals.length %>(<%= l(:label_last_changes, @journals.length) %>)<% end %></h3> | |
|
86 | <h3><%=l(:label_history)%></h3> | |
|
88 | 87 | <%= render :partial => 'history', :locals => { :journals => @journals } %> |
|
89 | <% if @journals_count > @journals.length %> | |
|
90 | <p><center><small><%= link_to l(:label_change_view_all), :action => 'history', :id => @issue %></small></center></p> | |
|
91 | <% end %> | |
|
92 | 88 | </div> |
|
93 | 89 | <% end %> |
|
94 | 90 |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now