##// END OF EJS Templates
History box on issues/show is now hidden if there's no history...
Jean-Philippe Lang -
r593:188077d6345e
parent child
Show More
@@ -1,116 +1,118
1 <div class="contextual">
1 <div class="contextual">
2 <%= l(:label_export_to) %><%= link_to 'PDF', {:action => 'export_pdf', :id => @issue}, :class => 'icon icon-pdf' %>
2 <%= l(:label_export_to) %><%= link_to 'PDF', {:action => 'export_pdf', :id => @issue}, :class => 'icon icon-pdf' %>
3 </div>
3 </div>
4
4
5 <h2><%= @issue.tracker.name %> #<%= @issue.id %> - <%=h @issue.subject %></h2>
5 <h2><%= @issue.tracker.name %> #<%= @issue.id %> - <%=h @issue.subject %></h2>
6
6
7 <div class="box">
7 <div class="box">
8 <table width="100%">
8 <table width="100%">
9 <tr>
9 <tr>
10 <td style="width:15%"><b><%=l(:field_status)%> :</b></td><td style="width:35%"><%= @issue.status.name %></td>
10 <td style="width:15%"><b><%=l(:field_status)%> :</b></td><td style="width:35%"><%= @issue.status.name %></td>
11 <td style="width:15%"><b><%=l(:field_priority)%> :</b></td><td style="width:35%"><%= @issue.priority.name %></td>
11 <td style="width:15%"><b><%=l(:field_priority)%> :</b></td><td style="width:35%"><%= @issue.priority.name %></td>
12 </tr>
12 </tr>
13 <tr>
13 <tr>
14 <td><b><%=l(:field_assigned_to)%> :</b></td><td><%= @issue.assigned_to ? link_to_user(@issue.assigned_to) : "-" %></td>
14 <td><b><%=l(:field_assigned_to)%> :</b></td><td><%= @issue.assigned_to ? link_to_user(@issue.assigned_to) : "-" %></td>
15 <td><b><%=l(:field_category)%> :</b></td><td><%=h @issue.category ? @issue.category.name : "-" %></td>
15 <td><b><%=l(:field_category)%> :</b></td><td><%=h @issue.category ? @issue.category.name : "-" %></td>
16 </tr>
16 </tr>
17 <tr>
17 <tr>
18 <td><b><%=l(:field_author)%> :</b></td><td><%= link_to_user @issue.author %></td>
18 <td><b><%=l(:field_author)%> :</b></td><td><%= link_to_user @issue.author %></td>
19 <td><b><%=l(:field_start_date)%> :</b></td><td><%= format_date(@issue.start_date) %></td>
19 <td><b><%=l(:field_start_date)%> :</b></td><td><%= format_date(@issue.start_date) %></td>
20 </tr>
20 </tr>
21 <tr>
21 <tr>
22 <td><b><%=l(:field_created_on)%> :</b></td><td><%= format_date(@issue.created_on) %></td>
22 <td><b><%=l(:field_created_on)%> :</b></td><td><%= format_date(@issue.created_on) %></td>
23 <td><b><%=l(:field_due_date)%> :</b></td><td><%= format_date(@issue.due_date) %></td>
23 <td><b><%=l(:field_due_date)%> :</b></td><td><%= format_date(@issue.due_date) %></td>
24 </tr>
24 </tr>
25 <tr>
25 <tr>
26 <td><b><%=l(:field_updated_on)%> :</b></td><td><%= format_date(@issue.updated_on) %></td>
26 <td><b><%=l(:field_updated_on)%> :</b></td><td><%= format_date(@issue.updated_on) %></td>
27 <td><b><%=l(:field_done_ratio)%> :</b></td><td><%= @issue.done_ratio %> %</td>
27 <td><b><%=l(:field_done_ratio)%> :</b></td><td><%= @issue.done_ratio %> %</td>
28 </tr>
28 </tr>
29 <tr>
29 <tr>
30 <td><b><%=l(:field_fixed_version)%> :</b></td><td><%= @issue.fixed_version ? link_to_version(@issue.fixed_version) : "-" %></td>
30 <td><b><%=l(:field_fixed_version)%> :</b></td><td><%= @issue.fixed_version ? link_to_version(@issue.fixed_version) : "-" %></td>
31 <td><b><%=l(:label_spent_time)%> :</b></td>
31 <td><b><%=l(:label_spent_time)%> :</b></td>
32 <td><%= @issue.spent_hours > 0 ? (link_to lwr(:label_f_hour, @issue.spent_hours), {:controller => 'timelog', :action => 'details', :issue_id => @issue}, :class => 'icon icon-time') : "-" %></td>
32 <td><%= @issue.spent_hours > 0 ? (link_to lwr(:label_f_hour, @issue.spent_hours), {:controller => 'timelog', :action => 'details', :issue_id => @issue}, :class => 'icon icon-time') : "-" %></td>
33 </tr>
33 </tr>
34 <tr>
34 <tr>
35 <% n = 0
35 <% n = 0
36 for custom_value in @custom_values %>
36 for custom_value in @custom_values %>
37 <td valign="top"><b><%= custom_value.custom_field.name %> :</b></td><td><%= simple_format(h(show_value(custom_value))) %></td>
37 <td valign="top"><b><%= custom_value.custom_field.name %> :</b></td><td><%= simple_format(h(show_value(custom_value))) %></td>
38 <% n = n + 1
38 <% n = n + 1
39 if (n > 1)
39 if (n > 1)
40 n = 0 %>
40 n = 0 %>
41 </tr><tr>
41 </tr><tr>
42 <%end
42 <%end
43 end %>
43 end %>
44 </tr>
44 </tr>
45 </table>
45 </table>
46 <hr />
46 <hr />
47
47
48 <% if @issue.changesets.any? %>
48 <% if @issue.changesets.any? %>
49 <div style="float:right;">
49 <div style="float:right;">
50 <em><%= l(:label_revision_plural) %>: <%= @issue.changesets.collect{|changeset| link_to(changeset.revision, :controller => 'repositories', :action => 'revision', :id => @project, :rev => changeset.revision)}.join(", ") %></em>
50 <em><%= l(:label_revision_plural) %>: <%= @issue.changesets.collect{|changeset| link_to(changeset.revision, :controller => 'repositories', :action => 'revision', :id => @project, :rev => changeset.revision)}.join(", ") %></em>
51 </div>
51 </div>
52 <% end %>
52 <% end %>
53
53
54 <b><%=l(:field_description)%> :</b><br /><br />
54 <b><%=l(:field_description)%> :</b><br /><br />
55 <%= textilizable @issue.description, :attachments => @issue.attachments %>
55 <%= textilizable @issue.description, :attachments => @issue.attachments %>
56 <br />
56 <br />
57
57
58 <div class="contextual">
58 <div class="contextual">
59 <%= link_to_if_authorized l(:button_edit), {:controller => 'issues', :action => 'edit', :id => @issue}, :class => 'icon icon-edit' %>
59 <%= link_to_if_authorized l(:button_edit), {:controller => 'issues', :action => 'edit', :id => @issue}, :class => 'icon icon-edit' %>
60 <%= link_to_if_authorized l(:button_log_time), {:controller => 'timelog', :action => 'edit', :issue_id => @issue}, :class => 'icon icon-time' %>
60 <%= link_to_if_authorized l(:button_log_time), {:controller => 'timelog', :action => 'edit', :issue_id => @issue}, :class => 'icon icon-time' %>
61 <%= watcher_tag(@issue, @logged_in_user) %>
61 <%= watcher_tag(@issue, @logged_in_user) %>
62 <%= link_to_if_authorized l(:button_move), {:controller => 'projects', :action => 'move_issues', :id => @project, "issue_ids[]" => @issue.id }, :class => 'icon icon-move' %>
62 <%= link_to_if_authorized l(:button_move), {:controller => 'projects', :action => 'move_issues', :id => @project, "issue_ids[]" => @issue.id }, :class => 'icon icon-move' %>
63 <%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy', :id => @issue}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
63 <%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy', :id => @issue}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
64 </div>
64 </div>
65
65
66 <% if authorize_for('issues', 'change_status') and @status_options and !@status_options.empty? %>
66 <% if authorize_for('issues', 'change_status') and @status_options and !@status_options.empty? %>
67 <% form_tag({:controller => 'issues', :action => 'change_status', :id => @issue}) do %>
67 <% form_tag({:controller => 'issues', :action => 'change_status', :id => @issue}) do %>
68 <%=l(:label_change_status)%> :
68 <%=l(:label_change_status)%> :
69 <select name="new_status_id">
69 <select name="new_status_id">
70 <%= options_from_collection_for_select @status_options, "id", "name" %>
70 <%= options_from_collection_for_select @status_options, "id", "name" %>
71 </select>
71 </select>
72 <%= submit_tag l(:button_change) %>
72 <%= submit_tag l(:button_change) %>
73 <% end %>
73 <% end %>
74 <% end %>
74 <% end %>
75 &nbsp;
75 &nbsp;
76 </div>
76 </div>
77
77
78 <% if authorize_for('issue_relations', 'new') || @issue.relations.any? %>
78 <% if authorize_for('issue_relations', 'new') || @issue.relations.any? %>
79 <div id="relations" class="box">
79 <div id="relations" class="box">
80 <%= render :partial => 'relations' %>
80 <%= render :partial => 'relations' %>
81 </div>
81 </div>
82 <% end %>
82 <% end %>
83
83
84 <% if @journals_count > 0 %>
84 <div id="history" class="box">
85 <div id="history" class="box">
85 <h3><%=l(:label_history)%>
86 <h3><%=l(:label_history)%>
86 <% if @journals_count > @journals.length %>(<%= l(:label_last_changes, @journals.length) %>)<% end %></h3>
87 <% if @journals_count > @journals.length %>(<%= l(:label_last_changes, @journals.length) %>)<% end %></h3>
87 <%= render :partial => 'history', :locals => { :journals => @journals } %>
88 <%= render :partial => 'history', :locals => { :journals => @journals } %>
88 <% if @journals_count > @journals.length %>
89 <% if @journals_count > @journals.length %>
89 <p><center><small><%= link_to l(:label_change_view_all), :action => 'history', :id => @issue %></small></center></p>
90 <p><center><small><%= link_to l(:label_change_view_all), :action => 'history', :id => @issue %></small></center></p>
90 <% end %>
91 <% end %>
91 </div>
92 </div>
93 <% end %>
92
94
93 <div class="box">
95 <div class="box">
94 <h3><%=l(:label_attachment_plural)%></h3>
96 <h3><%=l(:label_attachment_plural)%></h3>
95 <%= link_to_attachments @issue.attachments, :delete_url => (authorize_for('issues', 'destroy_attachment') ? {:controller => 'issues', :action => 'destroy_attachment', :id => @issue} : nil) %>
97 <%= link_to_attachments @issue.attachments, :delete_url => (authorize_for('issues', 'destroy_attachment') ? {:controller => 'issues', :action => 'destroy_attachment', :id => @issue} : nil) %>
96
98
97 <% if authorize_for('issues', 'add_attachment') %>
99 <% if authorize_for('issues', 'add_attachment') %>
98 <p><%= toggle_link l(:label_attachment_new), "add_attachment_form" %></p>
100 <p><%= toggle_link l(:label_attachment_new), "add_attachment_form" %></p>
99 <% form_tag({ :controller => 'issues', :action => 'add_attachment', :id => @issue }, :multipart => true, :class => "tabular", :id => "add_attachment_form", :style => "display:none;") do %>
101 <% form_tag({ :controller => 'issues', :action => 'add_attachment', :id => @issue }, :multipart => true, :class => "tabular", :id => "add_attachment_form", :style => "display:none;") do %>
100 <%= render :partial => 'attachments/form' %>
102 <%= render :partial => 'attachments/form' %>
101 <%= submit_tag l(:button_add) %>
103 <%= submit_tag l(:button_add) %>
102 <% end %>
104 <% end %>
103 <% end %>
105 <% end %>
104 </div>
106 </div>
105
107
106 <% if authorize_for('issues', 'add_note') %>
108 <% if authorize_for('issues', 'add_note') %>
107 <div class="box">
109 <div class="box">
108 <h3><%= l(:label_add_note) %></h3>
110 <h3><%= l(:label_add_note) %></h3>
109 <% form_tag({:controller => 'issues', :action => 'add_note', :id => @issue}, :class => "tabular" ) do %>
111 <% form_tag({:controller => 'issues', :action => 'add_note', :id => @issue}, :class => "tabular" ) do %>
110 <p><label for="notes"><%=l(:field_notes)%></label>
112 <p><label for="notes"><%=l(:field_notes)%></label>
111 <%= text_area_tag 'notes', '', :cols => 60, :rows => 10, :class => 'wiki-edit' %></p>
113 <%= text_area_tag 'notes', '', :cols => 60, :rows => 10, :class => 'wiki-edit' %></p>
112 <%= wikitoolbar_for 'notes' %>
114 <%= wikitoolbar_for 'notes' %>
113 <%= submit_tag l(:button_add) %>
115 <%= submit_tag l(:button_add) %>
114 <% end %>
116 <% end %>
115 </div>
117 </div>
116 <% end %>
118 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now