<% if !@tag %> <%= form_tag(params, :id => "query_form", :method => :get) do %> <%= hidden_field_tag('project_id', @project.to_param) if @project %>

<%= l(:label_crm_contact_all_note_plural) %> <%= text_field_tag(:search_note, params[:search_note], :autocomplete => "off", :class => "live_search_field", :placeholder => l(:label_crm_contact_search) ) %> <%# observe_field("search_note", :frequency => 1, :update => 'contacts_notes', :method => :get, :url => {:controller => 'contacts', :action => 'contacts_notes', :project_id => @project }, :with => "Form.serialize('query_form')") %>

<% if false %>

<%= link_to l(:button_apply), { :url => {}, :remote => true, :update => "deal_list", :with => "Form.serialize('query_form')" }, :class => 'icon icon-checked' %> <%= link_to l(:button_clear), {:project_id => @project }, :method => :get, :update => "deal_list", :class => 'icon icon-reload' %>

<% end %> <% end %> <% else %>

<%= "#{l(:label_crm_contact_tag)}(#{@notes_pages.item_count}): #{tag_links(@tag)}".html_safe %>

<% end %>
<%= render :partial => 'notes/notes_list' %>
<% other_formats_links do |f| %> <%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %> <%= f.link_to 'CSV', :url => params %> <% end %> <% content_for :sidebar do %> <%= render :partial => 'common/sidebar' %>

<%= l(:label_crm_note_plural) %>

<% collection_for_note_types_select.each do |note_type| %> <%= radio_button_tag "note_type", note_type[1], params[:type_id].to_s == note_type[1].to_s, {:onchange => "document.location='#{url_for(params.merge(:type_id => note_type[1]))}';", :id => "note_type_#{note_type[1]}" }%> <%= label_tag "note_type_#{note_type[1]}", note_type[0] %>
<% end %>

<%= l(:label_crm_tags_plural) %>

<%= @tags.map{|tag| content_tag(:span, link_to(tag.name, {:controller => "contacts", :action => "contacts_notes", :project_id => @project, :tag => tag.name}), {:class => "tag-label-color"}.merge(RedmineContacts.settings[:monochrome_tags].to_i > 0 ? {} : {:style => "background-color: #{tag_color(tag.name)}"}))}.join(' ').html_safe %>
<%= 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' %> <% end %>