<%= show_and_goto_link(l(:label_add_note), 'add-note', :class => 'icon icon-note') if authorize_for('issues', 'add_note') %>
<%= link_to_if_authorized l(:button_edit), {:controller => 'issues', :action => 'edit', :id => @issue}, :class => 'icon icon-edit', :accesskey => accesskey(:edit) %>
<%= link_to_if_authorized l(:button_log_time), {:controller => 'timelog', :action => 'edit', :issue_id => @issue}, :class => 'icon icon-time' %>
<%= watcher_tag(@issue, User.current) %>
<%= link_to_if_authorized l(:button_move), {:controller => 'projects', :action => 'move_issues', :id => @project, "issue_ids[]" => @issue.id }, :class => 'icon icon-move' %>
<%= 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' %>
<%= @issue.tracker.name %> #<%= @issue.id %>
<%=h @issue.subject %>
<%= authoring @issue.created_on, @issue.author %>.
<%= l(:label_updated_time, distance_of_time_in_words(Time.now, @issue.updated_on)) if @issue.created_on != @issue.updated_on %>.
<%=l(:field_status)%> : | <%= @issue.status.name %> |
<%=l(:field_start_date)%> : | <%= format_date(@issue.start_date) %> |
<%=l(:field_priority)%> : | <%= @issue.priority.name %> |
<%=l(:field_due_date)%> : | <%= format_date(@issue.due_date) %> |
<%=l(:field_assigned_to)%> : | <%= @issue.assigned_to ? link_to_user(@issue.assigned_to) : "-" %> |
<%=l(:field_done_ratio)%> : | <%= @issue.done_ratio %> % |
<%=l(:field_category)%> : | <%=h @issue.category ? @issue.category.name : "-" %> |
<% if User.current.allowed_to?(:view_time_entries, @project) %>
<%=l(:label_spent_time)%> : |
<%= @issue.spent_hours > 0 ? (link_to lwr(:label_f_hour, @issue.spent_hours), {:controller => 'timelog', :action => 'details', :issue_id => @issue}, :class => 'icon icon-time') : "-" %> |
<% end %>
<%=l(:field_fixed_version)%> : | <%= @issue.fixed_version ? link_to_version(@issue.fixed_version) : "-" %> |
<% if @issue.estimated_hours %>
<%=l(:field_estimated_hours)%> : | <%= lwr(:label_f_hour, @issue.estimated_hours) %> |
<% end %>
<% n = 0
for custom_value in @custom_values %>
<%= custom_value.custom_field.name %> : | <%= simple_format(h(show_value(custom_value))) %> |
<% n = n + 1
if (n > 1)
n = 0 %>
<%end
end %>
<% if @issue.changesets.any? %>
<%= l(:label_revision_plural) %>: <%= @issue.changesets.collect{|changeset| link_to(changeset.revision, :controller => 'repositories', :action => 'revision', :id => @project, :rev => changeset.revision)}.join(", ") %>
<% end %>
<%=l(:field_description)%>
<%= textilizable @issue.description, :attachments => @issue.attachments %>
<% if @issue.attachments.any? %>
<%= link_to_attachments @issue.attachments, :delete_url => (authorize_for('issues', 'destroy_attachment') ? {:controller => 'issues', :action => 'destroy_attachment', :id => @issue} : nil) %>
<% end %>
<% if authorize_for('issue_relations', 'new') || @issue.relations.any? %>
<%= render :partial => 'relations' %>
<% end %>
<% if authorize_for('issues', 'change_status') and @status_options and !@status_options.empty? %>
<% form_tag({:controller => 'issues', :action => 'change_status', :id => @issue}) do %>
<%=l(:label_change_status)%> :
<%= submit_tag l(:button_change) %>
<% end %>
<% end %>
<% if @journals.any? %>
<%=l(:label_history)%>
<%= render :partial => 'history', :locals => { :journals => @journals } %>
<% end %>
<% if authorize_for('issues', 'add_note') %>
<%= l(:label_add_note) %>
<% form_tag({:controller => 'issues', :action => 'add_note', :id => @issue}, :class => "tabular", :multipart => true) do %>
<%= text_area_tag 'notes', '', :cols => 60, :rows => 10, :class => 'wiki-edit' %>
<%= wikitoolbar_for 'notes' %>
<%= render :partial => 'attachments/form' %>
<%= submit_tag l(:button_add) %>
<%= toggle_link l(:button_cancel), 'add-note' %>
<% end %>
<% end %>
<%= l(:label_export_to) %><%= link_to 'PDF', {:action => 'export_pdf', :id => @issue}, :class => 'icon icon-pdf' %>
<% set_html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>
<% content_for :sidebar do %>
<%= render :partial => 'issues/sidebar' %>
<% end %>