<%= error_messages_for 'contact', 'note' %> <% html_title "#{l(:label_contact)} ##{@contact.id}: #{@contact.name}" %>
<% replace_watcher ||= 'watcher' %> <%= link_to l(:label_profile), user_path(@contact.redmine_user), :class => 'icon icon-user' unless @contact.redmine_user.blank? %> <%= link_to(l(:button_create), {:controller => 'users', :action => 'new_from_contact', :contact_id => @contact.id, :id => 'current'}, :class => 'icon icon-user') if (User.current.admin? && @contact.redmine_user.blank? && !@contact.email.blank?) %> <%= link_to_if_authorized l(:label_crm_send_mail), {:controller => 'contacts', :action => 'edit_mails', :ids => [@contact.id], :project_id => @project}, :class => 'icon icon-email' unless @contact.primary_email.blank? %> <%= watcher_link(@contact, User.current) %> <%= link_to l(:button_edit), {:controller => 'contacts', :action => 'edit', :project_id => @project, :id => @contact}, :class => 'icon icon-edit' if @contact.editable? %> <%= link_to l(:button_delete), {:controller => 'contacts', :action => 'destroy', :project_id => @project, :id => @contact}, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' if @contact.deletable? %>

<%= !@contact.is_company ? l(:label_contact) : l(:label_crm_company) %> #<%= @contact.id %>

<% if @contact.phones.any? || @contact.emails.any? %> <% end %>
<%= avatar_to(@contact, :size => "64", :full_size => true) %>

<%= h @contact.name %>

<% if !@contact.is_company %>

<%= h @contact.job_title %> <%= " #{l(:label_crm_at_company)} " unless (@contact.job_title.blank? or @contact.company.blank?) %> <% if @contact.contact_company %> <%= link_to @contact.contact_company.name, {:controller => 'contacts', :action => 'show', :project_id => @contact.contact_company.project(@project), :id => @contact.contact_company.id } %> <% else %> <%= h @contact.company %> <% end %>

<% end %> <%= render :partial => 'form_tags', :object => @contact.tags, :locals => {:editable => true} %>
    <% if @contact.phones.any? %>
  • <%= @contact.phones.first %>
  • <% end %> <% if @contact.emails.any? %> <% end %>
<%= call_hook(:view_contacts_show_details_bottom, :contact => @contact) %>
<%= render_contact_tabs contact_tabs(@contact) %> <% content_for :sidebar do %> <%= render :partial => 'common/sidebar' %> <%= render :partial => 'attributes' %> <%= call_hook(:view_contacts_sidebar_after_attributes, :contact => @contact) %> <%= render :partial => 'contacts_issues/issues', :locals => {:contact => @contact, :issues => @contact_issues} %> <%= call_hook(:view_contacts_sidebar_after_tasks, :contact => @contact) %> <%= render :partial => 'common/notes_attachments', :object => @contact.notes_attachments %> <%= call_hook(:view_contacts_sidebar_after_notes_attachments, :contact => @contact) %> <% if !@contact.background.blank? %>

<%= l(:label_crm_background_info) %>

<%= textilizable(@contact, :background) %>
<% end %>
<%= render :partial => 'contacts_projects/related' %>
<%= render :partial => 'common/recently_viewed' %> <% end %> <% content_for :header_tags do %> <%= javascript_include_tag :contacts, :plugin => 'redmine_contacts' %> <%= stylesheet_link_tag :contacts_sidebar, :plugin => 'redmine_contacts' %> <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@contact.name} - ##{@contact.id}") %> <% end %>