<% content_for(:header_tags) do %> <%= javascript_include_tag :contacts, :plugin => 'redmine_contacts' %> <%= stylesheet_link_tag :contacts, :plugin => 'redmine_contacts' %> <%= stylesheet_link_tag :contacts_sidebar, :plugin => 'redmine_contacts' %> <% end %> <% content_for :sidebar do %> <%= render :partial => 'common/sidebar' %> <%= render :partial => 'deals_statistics' %> <%= render :partial => 'notes/last_notes', :object => @last_notes %> <%= render :partial => 'common/recently_viewed' %> <% end %>
<%= link_to_if_authorized l(:label_deal_new), {:controller => 'deals', :action => 'new', :project_id => @project}, :class => 'icon icon-add' %>
<% form_tag(params, :id => "query_form") do %> <%= hidden_field_tag('project_id', @project.to_param) if @project %> <% no_filters = ((params[:status_id].blank? || params[:status_id] == 'o') && params[:period].blank? && params[:assigned_to_id].blank? && params[:category_id].blank?) %>

<%= l(:label_deal_plural) %> <%= label_tag :search, l(:label_search), :id => "search_overlabel" %> <%= text_field_tag(:search, params[:search], :autocomplete => "off", :size => "35", :class => "live_search_field", :onfocus => "Element.hide('search_overlabel'); return false;", :onblur => "if (this.value == '') {Element.show('search_overlabel');}" ) %> <%= observe_field("search", :frequency => 2, :update => 'contact_list', :url => {:controller => 'deals', :action => 'index', :project_id => @project }, :with => "Form.serialize('query_form')") %>

<%= l(:label_filter_plural) %>

<% if !deal_statuses.empty? %> <%= label_tag l(:label_deal_status) + " " %> <%= select_tag :status_id, options_for_select(collection_for_status_select.insert(0, [l(:label_open_issues), "o"]).insert(0, [l(:label_all), ""]), params[:status_id]) %> <% end %> <%= label_tag l(:label_created_on) + " "%> <%= select_tag 'period', options_for_period_select(params[:period]) %> <% if @project && !@project.deal_categories.empty? %> <%= label_tag l(:label_deal_category) + " "%> <%= select_tag 'category_id', options_for_select(@project.deal_categories.collect {|c| [c.name, c.id.to_s]}.insert(0, [""]), params[:category_id]) %> <% end %> <%= label_tag l(:label_assigned_to) + " " %> <%= select_tag :assigned_to_id, options_for_select(Deal.available_users(@project).collect{|u| [u.name, u.id.to_s]}.insert(0, [""]), params[:assigned_to_id]) %>

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

<% end %>
<%= render :partial => 'list' %>
<% html_title l(:label_deal_plural) %>