%= error_messages_for 'contact', 'note' %>
<% html_title "#{l(:label_contact)} ##{@contact.id}: #{@contact.name}" %>
<%= call_hook(:view_contacts_before_actions, :contact => @contact, :project => @project) %>
<%= link_to l(:button_edit), {:controller => 'contacts', :action => 'edit', :project_id => @project, :id => @contact}, :class => 'icon icon-edit' if @contact.editable? %>
<%= watcher_link(@contact, User.current) %>
<%= actions_dropdown do %>
<%= link_to l(:button_delete), {:controller => 'contacts', :action => 'destroy', :project_id => @project, :id => @contact}, :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :class => 'icon icon-del' if @contact.deletable? %>
<%= call_hook(:view_contacts_after_actions, :contact => @contact, :project => @project) %>
<% end %>
<%= !@contact.is_company ? l(:label_contact) : l(:label_crm_company) %> #<%= @contact.id %>
<%= call_hook(:view_contacts_show_details_bottom, :contact => @contact) %>
<%= render_contact_tabs contact_tabs(@contact) %>
<% content_for :sidebar do %>
<%= render :partial => 'attributes' %>
<%= call_hook(:view_contacts_sidebar_after_attributes, :contact => @contact) %>
<%= render partial: 'common/related_issues', locals: { issues: @contact_issues } %>
<%= call_hook(:view_contacts_sidebar_after_tasks, :contact => @contact) %>
<% if !@contact.background.blank? %>
<%= l(:label_crm_background_info) %>
<%= textilizable(@contact, :background) %>
<% end %>
<%= render :partial => 'contacts_projects/related' %>
<% end %>
<% content_for :header_tags do %>
<%= javascript_include_tag :contacts, :plugin => 'redmine_contacts' %>
<%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.atom_key}, :title => "#{@contact.name} - ##{@contact.id}") %>
<% end %>