<% if !@query.new_record? && @query.editable_by?(User.current) %> <%= link_to l(:button_edit), {:controller => 'cost_report', :action => 'edit', :id => @query}, :class => 'icon icon-edit' %> <%= link_to l(:button_delete), {:controller => 'cost_report', :action => 'destroy', :id => @query}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %> <% end %>

<%= @query.new_record? ? l(:label_cost_report) : h(@query.name) %>

<% html_title( @query.new_record? ? l(:label_cost_report) : @query.name ) %> <% form_for @query, :url => {:controller => 'cost_report', :action => 'new' }, :html => {:id => 'query_form', :method => :post} do |query_form| %>
"> <%= l(:label_filter_plural) %>
><%= render :partial => 'filters', :locals => {:query_form => query_form} %>
<%= l(:label_group_by) %>
<%= render :partial => 'group_by', :locals => {:query_form => query_form} %>
<%= l(:label_option_plural) %>
<%= render :partial => 'options', :locals => {:query_form => query_form} %>

<%= link_to_remote l(:button_apply), { :url => { :set_filter => 1 }, :update => "content", :with => "Form.serialize('query_form')" }, :class => 'icon icon-checked' %> <%= link_to_remote l(:button_clear), { :url => { :set_filter => 1 }, :update => "content", }, :class => 'icon icon-reload' %> <% if User.current.allowed_to?(:save_queries, @project, :global => true) %> <%= link_to l(:button_save), {}, :onclick => "$('query_form').submit(); return false;", :class => 'icon icon-save' %> <% end %>

<% end %> <%= error_messages_for 'query' %> <% if @query.valid? %> <% if @entries.blank? %>

<%= l(:label_no_data) %>

<% else %> <%= render :partial => 'list', :locals => {:entries => @entries, :query => @query} %> <% end %> <% end %> <% content_for :sidebar do %> <%= render :partial => 'sidebar' %> <% end %> <% content_for :header_tags do %> <%= stylesheet_link_tag 'scm' %> <%= stylesheet_link_tag 'costs', :plugin => 'redmine_costs' %> <% end %>