show.rhtml 4.12 KB
Newer Older
1
<h2><%= @issue.tracker.name %> #<%= @issue.id %> - <%= @issue.subject %></h2>
jplang's avatar
jplang committed
2 3

<div class="box">
4 5 6 7 8 9 10 11 12 13 14
<p>
<b><%=l(:field_status)%> :</b> <%= @issue.status.name %> &nbsp &nbsp
<b><%=l(:field_priority)%> :</b> <%= @issue.priority.name %> &nbsp &nbsp
<b><%=l(:field_assigned_to)%> :</b> <%= @issue.assigned_to ? @issue.assigned_to.display_name : "-" %> &nbsp &nbsp
<b><%=l(:field_category)%> :</b> <%= @issue.category ? @issue.category.name : "-"  %>
</p>
<p><b><%=l(:field_author)%> :</b> <%= @issue.author.display_name %></p>
<p><b><%=l(:field_subject)%> :</b> <%= @issue.subject %></p>
<p><b><%=l(:field_description)%> :</b> <%= simple_format auto_link @issue.description %></p>
<p><b><%=l(:field_due_date)%> :</b> <%= format_date(@issue.due_date) %></p>
<p><b><%=l(:field_created_on)%> :</b> <%= format_date(@issue.created_on) %></p>
jplang's avatar
jplang committed
15

jplang's avatar
jplang committed
16
<% for custom_value in @custom_values %>
17
<p><b><%= custom_value.custom_field.name %></b> : <%= show_value custom_value %></p>
jplang's avatar
jplang committed
18 19
<% end %>

jplang's avatar
jplang committed
20 21
<% if authorize_for('issues', 'edit') %>
  <%= start_form_tag ({:controller => 'issues', :action => 'edit', :id => @issue}, :method => "get" ) %>
22
  <%= submit_tag l(:button_edit) %>
jplang's avatar
jplang committed
23 24 25 26 27 28
  <%= end_form_tag %>
  &nbsp;&nbsp;
<% end %>

<% if authorize_for('issues', 'change_status') and @status_options and !@status_options.empty? %>
  <%= start_form_tag ({:controller => 'issues', :action => 'change_status', :id => @issue}) %>
29
  <label for="history_status_id"><%=l(:label_change_status)%> :</label>
jplang's avatar
jplang committed
30 31 32
  <select name="history[status_id]">
  <%= options_from_collection_for_select @status_options, "id", "name" %>
  </select>
33
  <%= submit_tag l(:button_change) %>
jplang's avatar
jplang committed
34 35 36 37
  <%= end_form_tag %>
  &nbsp;&nbsp;
<% end %>

38 39 40 41 42 43 44 45
<% if authorize_for('projects', 'move_issues') %>
  <%= start_form_tag ({:controller => 'projects', :action => 'move_issues', :id => @project} ) %>
  <%= hidden_field_tag "issue_ids[]", @issue.id %>
  <%= submit_tag l(:button_move) %>
  <%= end_form_tag %>
  &nbsp;&nbsp;
<% end %>

jplang's avatar
jplang committed
46 47
<% if authorize_for('issues', 'destroy') %>
  <%= start_form_tag ({:controller => 'issues', :action => 'destroy', :id => @issue} ) %>
48
  <%= submit_tag l(:button_delete) %>
jplang's avatar
jplang committed
49 50 51 52 53
  <%= end_form_tag %>
  &nbsp;&nbsp;
<% end %>
</div>

jplang's avatar
jplang committed
54 55 56 57 58 59 60 61 62 63
<% if authorize_for('issues', 'add_note') %>
  <div class="box">
  <h3><%= l(:label_add_note) %></h3>
  <%= start_form_tag ({:controller => 'issues', :action => 'add_note', :id => @issue}, :class => "tabular" ) %>
  <p><label for="history_notes"><%=l(:field_notes)%></label>
    <%= text_area 'history', 'notes', :cols => 60, :rows => 10  %></p>
  <%= submit_tag l(:button_add) %>
  <%= end_form_tag %>
  </div>
<% end %>
jplang's avatar
jplang committed
64 65 66

<div class="splitcontentleft">
<div class="box">
67
<h3><%=l(:label_history)%></h3>
jplang's avatar
jplang committed
68
<table width="100%">
jplang's avatar
jplang committed
69
<% for history in @issue.histories.find(:all, :include => [:author, :status]) %>
jplang's avatar
jplang committed
70 71 72 73 74 75
<tr>
<td><%= format_date(history.created_on) %></td>
<td><%= history.author.display_name %></td>
<td><b><%= history.status.name %></b></td>
</tr>
<% if history.notes? %>
jplang's avatar
jplang committed
76
	<tr><td colspan=3><%= simple_format auto_link history.notes %></td></tr>
jplang's avatar
jplang committed
77 78 79 80 81 82 83 84
<% end %>
<% end %>
</table>
</div>
</div>

<div class="splitcontentright">
<div class="box">
85
<h3><%=l(:label_attachment_plural)%></h3>
jplang's avatar
jplang committed
86 87 88
<table width="100%">
<% for attachment in @issue.attachments %>
<tr>
jplang's avatar
jplang committed
89
<td><%= link_to attachment.filename, :action => 'download', :id => @issue, :attachment_id => attachment %> (<%= human_size(attachment.filesize) %>)</td>
jplang's avatar
jplang committed
90 91 92 93 94
<td><%= format_date(attachment.created_on) %></td>
<td><%= attachment.author.display_name %></td>
<% if authorize_for('issues', 'destroy_attachment') %>
  <td>
  <%= start_form_tag :action => 'destroy_attachment', :id => @issue, :attachment_id => attachment %>
95
  <%= submit_tag l(:button_delete), :class => "button-small" %>
jplang's avatar
jplang committed
96 97 98 99 100 101 102 103 104
  <%= end_form_tag %>
  </td>
<% end %>
</tr>
<% end %>
</table>
<br />
<% if authorize_for('issues', 'add_attachment') %>
  <%= start_form_tag ({ :controller => 'issues', :action => 'add_attachment', :id => @issue }, :multipart => true) %>
105 106
  <%=l(:label_attachment_new)%>: <%= file_field 'attachment', 'file'  %>
  <%= submit_tag l(:button_add) %>
jplang's avatar
jplang committed
107 108 109 110 111
  <%= end_form_tag %> 
<% end %>
</div>
</div>