101 lines
4.1 KiB
Plaintext
101 lines
4.1 KiB
Plaintext
|
|
<% 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' %>
|
||
|
|
<meta name = "format-detection" content = "telephone=no">
|
||
|
|
<% 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 %>
|
||
|
|
|
||
|
|
<div class="contextual">
|
||
|
|
<%= link_to_if_authorized l(:label_deal_new), {:controller => 'deals', :action => 'new', :project_id => @project}, :class => 'icon icon-add' %>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="filters">
|
||
|
|
<% 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?) %>
|
||
|
|
|
||
|
|
<h2 class="contacts_header">
|
||
|
|
<span id='scope_header' class="scope_title">
|
||
|
|
<%= l(:label_deal_plural) %>
|
||
|
|
</span>
|
||
|
|
|
||
|
|
<span class="live_search">
|
||
|
|
<%= 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');}" ) %>
|
||
|
|
<!-- , :onfocus => "if (this.value == 'Поиск') {this.value = '';}", :onblur => "if (this.value == '') {this.value ='Поиск'; this.style.color='#aaa'}" -->
|
||
|
|
<%= observe_field("search",
|
||
|
|
:frequency => 2,
|
||
|
|
:update => 'contact_list',
|
||
|
|
:url => {:controller => 'deals', :action => 'index', :project_id => @project },
|
||
|
|
:with => "Form.serialize('query_form')") %>
|
||
|
|
</span>
|
||
|
|
|
||
|
|
</h2>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<fieldset id="filters" class="collapsible <%= 'collapsed' if no_filters %>">
|
||
|
|
<legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
|
||
|
|
<div style="<%= 'display: none;' if no_filters %>">
|
||
|
|
<p>
|
||
|
|
<% if !deal_statuses.empty? %>
|
||
|
|
<span class="filter-condition">
|
||
|
|
<%= 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]) %>
|
||
|
|
</span>
|
||
|
|
<% end %>
|
||
|
|
<span class="filter-condition">
|
||
|
|
<%= label_tag l(:label_created_on) + " "%>
|
||
|
|
<%= select_tag 'period', options_for_period_select(params[:period]) %>
|
||
|
|
</span>
|
||
|
|
<% if @project && !@project.deal_categories.empty? %>
|
||
|
|
<span class="filter-condition">
|
||
|
|
<%= 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]) %>
|
||
|
|
</span>
|
||
|
|
<% end %>
|
||
|
|
<span class="filter-condition">
|
||
|
|
<%= 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]) %>
|
||
|
|
</span>
|
||
|
|
|
||
|
|
<!-- <%= render :partial => 'custom_field_filter' %> -->
|
||
|
|
|
||
|
|
</p>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</fieldset>
|
||
|
|
<p class="buttons hide-when-print">
|
||
|
|
|
||
|
|
<%= 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' %>
|
||
|
|
</p>
|
||
|
|
<% end %>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
<div id="contact_list">
|
||
|
|
<%= render :partial => 'list' %>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<% html_title l(:label_deal_plural) %>
|
||
|
|
|