<% filtered_params = params.respond_to?(:to_unsafe_hash) ? params.to_unsafe_hash : params %>
<%= link_to_if_authorized l(:label_crm_contact_new), {:controller => 'contacts', :action => 'new', :project_id => @project}, :class => 'icon icon-add' %> <%= actions_dropdown do %> <%= call_hook(:view_contacts_action_menu) %> <% end %>
<% html_title(@query.new_record? ? l(:label_contact_plural) : @query.name) %> <%= form_tag({ :controller => 'contacts', :action => 'index', :project_id => @project }, :method => :get, :id => 'query_form') do %>

<%= @query.new_record? ? l(:label_contact_plural) : h(@query.name) %> <%= text_field_tag(:search, params[:search], :autocomplete => "off", :class => "live_search_field", :placeholder => l(:label_crm_contact_search) ) %> <%= tag_links(@filter_tags) %>

<%= hidden_field_tag 'set_filter', '1' %> <%= hidden_field_tag 'object_type', 'contact' %> <% end %> <%= error_messages_for 'query' %> <% if @query.valid? %>
<% if @contacts.empty? %>

<%= l(:label_no_data) %>

<% else %> <%= render :partial => contacts_list_style %> <%= pagination_links_full @contacts_pages, @contacts_count %> <% end %>
<% if User.current.allowed_to?(:export_contacts, @project, :global => true) %> <% other_formats_links do |f| %> <%= f.link_to 'Atom', :url => filtered_params.merge(:key => User.current.atom_key) %> <% end %> <% end %> <% end %> <% content_for :sidebar do %> <%= render :partial => 'upgrade_to_pro' %> <%= render :partial => 'tags_cloud', :object => @tags %> <%= render :partial => 'notes/last_notes', :object => @last_notes %> <%= call_hook(:view_contacts_sidebar_contacts_list_bottom) %> <% 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 => l(:label_contact_plural)) %> <% end %> <%= context_menu %>