<%= l(:label_export_to) %><%= link_to 'PDF', {:action => 'export_pdf', :id => @issue}, :class => 'icon icon-pdf' %>

<%= @issue.tracker.name %> #<%= @issue.id %> - <%=h @issue.subject %>

<% n = 0 for custom_value in @custom_values %> <% n = n + 1 if (n > 1) n = 0 %> <%end end %>
<%=l(:field_status)%> :<%= @issue.status.name %> <%=l(:field_priority)%> :<%= @issue.priority.name %>
<%=l(:field_assigned_to)%> :<%= @issue.assigned_to ? link_to_user(@issue.assigned_to) : "-" %> <%=l(:field_category)%> :<%=h @issue.category ? @issue.category.name : "-" %>
<%=l(:field_author)%> :<%= link_to_user @issue.author %> <%=l(:field_start_date)%> :<%= format_date(@issue.start_date) %>
<%=l(:field_created_on)%> :<%= format_date(@issue.created_on) %> <%=l(:field_due_date)%> :<%= format_date(@issue.due_date) %>
<%=l(:field_updated_on)%> :<%= format_date(@issue.updated_on) %> <%=l(:field_done_ratio)%> :<%= @issue.done_ratio %> %
<%=l(:field_fixed_version)%> :<%= @issue.fixed_version ? @issue.fixed_version.name : "-" %> <%=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') : "-" %>
<%= custom_value.custom_field.name %> :<%= h(show_value(custom_value)) %>


<%=l(:field_description)%> :

<%= textilizable @issue.description %>
<%= link_to_if_authorized l(:button_edit), {:controller => 'issues', :action => 'edit', :id => @issue}, :class => 'icon icon-edit' %> <%= link_to_if_authorized l(:button_log_time), {:controller => 'timelog', :action => 'edit', :issue_id => @issue}, :class => 'icon icon-time' %> <%= 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' %>
<% 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 %>  

<%=l(:label_history)%> <% if @journals_count > @journals.length %>(<%= l(:label_last_changes, @journals.length) %>)<% end %>

<%= render :partial => 'history', :locals => { :journals => @journals } %> <% if @journals_count > @journals.length %>

<%= link_to l(:label_change_view_all), :action => 'history', :id => @issue %>

<% end %>

<%=l(:label_attachment_plural)%>

<% for attachment in @issue.attachments %> <% end %>
<%= link_to attachment.filename, { :action => 'download', :id => @issue, :attachment_id => attachment }, :class => 'icon icon-attachment' %> (<%= number_to_human_size(attachment.filesize) %>) <%= format_date(attachment.created_on) %> <%= attachment.author.display_name %>
<%= 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' %>

<% if authorize_for('issues', 'add_attachment') %> <% form_tag({ :controller => 'issues', :action => 'add_attachment', :id => @issue }, :multipart => true, :class => "tabular") do %>

<%= file_field_tag 'attachments[]', :size => 30 %> (<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)

<%= submit_tag l(:button_add) %> <% end %> <% end %>
<% if authorize_for('issues', 'add_note') %>

<%= l(:label_add_note) %>

<% form_tag ({:controller => 'issues', :action => 'add_note', :id => @issue}, :class => "tabular" ) do %>

<%= text_area_tag 'notes', '', :cols => 60, :rows => 10, :class => 'wiki-edit' %>

<%= submit_tag l(:button_add) %> <% end %>
<% end %>