% if User.current.allowed_to?(:view_helpdesk_tickets, @project) && @issue.is_ticket? %>
<%= link_to l(:label_helpdesk_public_link), public_ticket_path(@issue.helpdesk_ticket, :hash => @issue.helpdesk_ticket.token), :class => "icon icon-public-link" if RedmineHelpdesk.public_tickets? && !@issue.is_private %>
<%# link_to l(:label_helpdesk_spam),
{:controller => 'helpdesk',
:action => 'delete_spam',
:project_id => @project,
:issue_id => @issue},
:method => :delete,
:data => {:confirm => l(:text_are_you_sure)},
:class => "icon icon-email-spam" if @issue.helpdesk_ticket.source == HelpdeskTicket::HELPDESK_EMAIL_SOURCE && @issue.customer.primary_email && User.current.allowed_to?(:send_response, @project) && User.current.allowed_to?(:delete_issues, @project) && User.current.allowed_to?(:delete_contacts, @project) %>
<%= @issue.helpdesk_ticket.is_incoming? ? l(:label_helpdesk_from) : l(:label_sent_to) %>
<%= contact_tag(@issue.customer, :type => "plain") %>
<%= "(#{@issue.helpdesk_ticket.from_address})" if @issue.helpdesk_ticket.from_address.present? %>
<% if attachment = @issue.helpdesk_ticket.message_file %>
<%= link_to_attachment attachment, :text => l(:label_helpdesk_original), :download => true, :class => 'icon icon-attachment' -%>
<%= h(" - #{attachment.description}") unless attachment.description.blank? %>
(<%= number_to_human_size attachment.filesize %>)
<%= link_to_if_authorized image_tag('magnifier.png', :plugin => "redmine_contacts_helpdesk"),
:controller => 'helpdesk', :action => 'show_original',
:id => attachment, :project_id => @project %>
<% end %>
<% if @issue.helpdesk_ticket.viewed? %>
<%= format_time(@issue.helpdesk_ticket.ticket_date) %>
<% else %>
<%= format_time(@issue.helpdesk_ticket.ticket_date) %>
<% end %>
<% unless @issue.helpdesk_ticket.cc_address.blank? %>
<%= l(:label_helpdesk_cc) %>: <%= @issue.helpdesk_ticket.cc_address.split(',').join(', ') %>
<% end %>
<% if Redmine::VERSION.to_s > '3.2' %>
<% else %>