show.rhtml
111 lines
| 4.9 KiB
| text/html+ruby
|
RhtmlLexer
|
r90 | <div class="contextual"> | ||
|
r154 | <%= l(:label_export_to) %><%= link_to 'PDF', {:action => 'export_pdf', :id => @issue}, :class => 'icon icon-pdf' %> | ||
|
r35 | </div> | ||
|
r90 | |||
|
r96 | <h2><%= @issue.tracker.name %> #<%= @issue.id %> - <%=h @issue.subject %></h2> | ||
|
r2 | |||
<div class="box"> | ||||
|
r36 | <table width="100%"> | ||
<tr> | ||||
|
r147 | <td style="width:15%"><b><%=l(:field_status)%> :</b></td><td style="width:35%"><%= @issue.status.name %></td> | ||
<td style="width:15%"><b><%=l(:field_priority)%> :</b></td><td style="width:35%"><%= @issue.priority.name %></td> | ||||
|
r36 | </tr> | ||
<tr> | ||||
|
r42 | <td><b><%=l(:field_assigned_to)%> :</b></td><td><%= @issue.assigned_to ? @issue.assigned_to.name : "-" %></td> | ||
|
r96 | <td><b><%=l(:field_category)%> :</b></td><td><%=h @issue.category ? @issue.category.name : "-" %></td> | ||
|
r36 | </tr> | ||
|
r42 | <tr> | ||
<td><b><%=l(:field_author)%> :</b></td><td><%= link_to_user @issue.author %></td> | ||||
<td><b><%=l(:field_start_date)%> :</b></td><td><%= format_date(@issue.start_date) %></td> | ||||
</tr> | ||||
|
r36 | <tr> | ||
<td><b><%=l(:field_created_on)%> :</b></td><td><%= format_date(@issue.created_on) %></td> | ||||
|
r42 | <td><b><%=l(:field_due_date)%> :</b></td><td><%= format_date(@issue.due_date) %></td> | ||
|
r36 | </tr> | ||
<tr> | ||||
<td><b><%=l(:field_updated_on)%> :</b></td><td><%= format_date(@issue.updated_on) %></td> | ||||
|
r42 | <td><b><%=l(:field_done_ratio)%> :</b></td><td><%= @issue.done_ratio %> %</td> | ||
|
r36 | </tr> | ||
|
r162 | <tr> | ||
<td><b><%=l(:field_fixed_version)%> :</b></td><td><%= @issue.fixed_version ? @issue.fixed_version.name : "-" %></td> | ||||
<td></td><td></td> | ||||
</tr> | ||||
|
r36 | <tr> | ||
<% n = 0 | ||||
for custom_value in @custom_values %> | ||||
|
r96 | <td><b><%= custom_value.custom_field.name %> :</b></td><td><%=h show_value custom_value %></td> | ||
|
r36 | <% n = n + 1 | ||
if (n > 1) | ||||
n = 0 %> | ||||
</tr><tr> | ||||
<%end | ||||
end %> | ||||
</tr> | ||||
</table> | ||||
<hr /> | ||||
<br /> | ||||
|
r2 | |||
|
r36 | <b><%=l(:field_description)%> :</b><br /><br /> | ||
|
r42 | <%= textilizable @issue.description %> | ||
|
r52 | <br /> | ||
|
r90 | |||
<div class="contextual"> | ||||
|
r154 | <%= link_to_if_authorized l(:button_edit), {:controller => 'issues', :action => 'edit', :id => @issue}, :class => 'icon icon-edit' %> | ||
<%= link_to_if_authorized l(:button_move), {:controller => 'projects', :action => 'move_issues', :id => @project, "issue_ids[]" => @issue.id }, :class => 'icon icon-move' %> | ||||
|
r188 | <%= 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' %> | ||
|
r90 | </div> | ||
|
r2 | |||
<% if authorize_for('issues', 'change_status') and @status_options and !@status_options.empty? %> | ||||
|
r181 | <% form_tag ({:controller => 'issues', :action => 'change_status', :id => @issue}) do %> | ||
|
r35 | <%=l(:label_change_status)%> : | ||
|
r52 | <select name="new_status_id"> | ||
|
r2 | <%= options_from_collection_for_select @status_options, "id", "name" %> | ||
</select> | ||||
|
r12 | <%= submit_tag l(:button_change) %> | ||
|
r181 | <% end %> | ||
|
r2 | <% end %> | ||
|
r97 | | ||
|
r2 | </div> | ||
|
r52 | <div id="history" class="box"> | ||
<h3><%=l(:label_history)%> | ||||
<% if @journals_count > @journals.length %>(<%= l(:label_last_changes, @journals.length) %>)<% end %></h3> | ||||
<%= render :partial => 'history', :locals => { :journals => @journals } %> | ||||
<% if @journals_count > @journals.length %> | ||||
<p><center><small>[ <%= link_to l(:label_change_view_all), :action => 'history', :id => @issue %> ]</small></center></p> | ||||
|
r2 | <% end %> | ||
</div> | ||||
<div class="box"> | ||||
|
r12 | <h3><%=l(:label_attachment_plural)%></h3> | ||
|
r2 | <table width="100%"> | ||
<% for attachment in @issue.attachments %> | ||||
<tr> | ||||
|
r182 | <td><%= link_to attachment.filename, { :action => 'download', :id => @issue, :attachment_id => attachment }, :class => 'icon icon-attachment' %> (<%= number_to_human_size(attachment.filesize) %>)</td> | ||
|
r2 | <td><%= format_date(attachment.created_on) %></td> | ||
<td><%= attachment.author.display_name %></td> | ||||
|
r188 | <td><div class="contextual"><%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy_attachment', :id => @issue, :attachment_id => attachment }, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %></div></td> | ||
|
r2 | </tr> | ||
<% end %> | ||||
</table> | ||||
<br /> | ||||
<% if authorize_for('issues', 'add_attachment') %> | ||||
|
r181 | <% form_tag ({ :controller => 'issues', :action => 'add_attachment', :id => @issue }, :multipart => true, :class => "tabular") do %> | ||
|
r154 | <p id="attachments_p"><label><%=l(:label_attachment_new)%> | ||
<%= image_to_function "add.png", "addFileField();return false" %></label> | ||||
|
r182 | <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p> | ||
|
r12 | <%= submit_tag l(:button_add) %> | ||
|
r181 | <% end %> | ||
|
r2 | <% end %> | ||
</div> | ||||
|
r38 | <% if authorize_for('issues', 'add_note') %> | ||
<div class="box"> | ||||
<h3><%= l(:label_add_note) %></h3> | ||||
|
r181 | <% form_tag ({:controller => 'issues', :action => 'add_note', :id => @issue}, :class => "tabular" ) do %> | ||
|
r52 | <p><label for="notes"><%=l(:field_notes)%></label> | ||
<%= text_area_tag 'notes', '', :cols => 60, :rows => 10 %></p> | ||||
|
r38 | <%= submit_tag l(:button_add) %> | ||
|
r181 | <% end %> | ||
|
r38 | </div> | ||
<% end %> | ||||