<%= link_to_if_authorized l(:label_operation_new), {:controller => "operations", :action => "new", :project_id => @project}, :class => 'icon icon-add' %>
<% html_title(@query.new_record? ? l(:label_operation_plural) : @query.name) %>
<%= @query.new_record? ? l(:label_operation_plural) : h(@query.name) %>
<%= form_tag({ :controller => 'operations', :action => 'index', :project_id => @project }, :method => :get, :id => 'query_form') do %>
<%= hidden_field_tag 'set_filter', '1' %>
<%= hidden_field_tag 'object_type', 'operation' %>
<%= link_to_function l(:button_apply), 'submit_query_form("query_form")', :class => 'icon icon-checked' %>
<%= link_to l(:button_clear), { :set_filter => 1, :project_id => @project }, :class => 'icon icon-reload' %>
<% end %>
<%= error_messages_for 'query' %>
<% if @query.valid? %>
<% end %>
<%= javascript_tag "$('.operation_list tr.operation.planned-operation:last').addClass('last');" %>
<%= context_menu %>
<% content_for :sidebar do %>
<%= render :partial => 'accounts/stat' %>
<%= render_sidebar_crm_queries('operation') %>
<% end %>
<% content_for :header_tags do %>
<%= select2_assets %>
<%= stylesheet_link_tag :finance, :plugin => 'redmine_finance' %>
<%= stylesheet_link_tag :contacts, :plugin => 'redmine_contacts' %>
<%= javascript_include_tag :finance, :plugin => 'redmine_finance' %>
<% end %>