<%= call_hook(:view_contacts_context_menu_start, {:contacts => @contacts, :can => @can, :back => @back }) %>
<% unless @contact.nil? %>
- <%= context_menu_link l(:button_edit), { controller: 'contacts', action: 'edit', id: @contact, project_id: @project},
class: 'icon icon-edit', disabled: !@can[:edit] %>
<% if User.current.logged? %>
- <%= watcher_link(@contact, User.current) %>
<% end %>
<% if !@project.nil? %>
<% if @contact.is_company? %>
- <%= context_menu_link l(:label_crm_add_contact), { controller: 'contacts', action: 'new', project_id: @project, contact: { company: @contact.name } },
class: 'icon icon-company-contact', disabled: !@can[:create] %>
<% end %>
<% end %>
<% else %>
<% end %>
<%= call_hook(:view_contacts_context_menu_before_delete, {:contacts => @contacts, :can => @can, :back => @back }) %>
- <%= context_menu_link l(:button_delete), { controller: 'contacts', action: 'bulk_destroy', ids: @contacts.collect(&:id), project_id: @project },
method: :delete, data: { confirm: l(:text_are_you_sure) },
class: 'icon icon-del', disabled: !@can[:delete] %>
<% if !@contact && Redmine::VERSION.to_s >= '3.3' %>
-
<%= context_menu_link l(:button_filter), _project_contacts_path(@project, set_filter: 1, ids: @contacts.map(&:id).join('|')), class: 'icon icon-list' %>
<% end %>
<%= call_hook(:view_contacts_context_menu_end, { contacts: @contacts, can: @can, back: @back }) %>