kanbanworkflowstimelinescrumrubyroadmapproject-planningproject-managementopenprojectangularissue-trackerifcgantt-chartganttbug-trackerboardsbcf
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
3.1 KiB
81 lines
3.1 KiB
<div class="contextual">
|
|
<% 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 %>
|
|
</div>
|
|
|
|
<h2><%= @query.new_record? ? l(:label_cost_report) : h(@query.name) %></h2>
|
|
<% html_title( @query.new_record? ? l(:label_cost_report) : @query.name ) %>
|
|
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
function toggle_options(select, options, state) {
|
|
for (i=0; i<select.options.length; i++) {
|
|
var option = select.options[i];
|
|
if (options.indexOf(option.value) >= 0) {
|
|
if (state == "disable") {
|
|
option.writeAttribute("disabled", "disabled");
|
|
} else {
|
|
option.writeAttribute("disabled", null);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
//]]>
|
|
</script>
|
|
|
|
|
|
<% form_for @query, :url => {:controller => 'cost_report', :action => 'new' }, :html => {:id => 'query_form', :method => :post} do |query_form| %>
|
|
<div id="query_from_content">
|
|
<fieldset id="filters" class="collapsible <%= "collapsed" unless @query.new_record? %>">
|
|
<legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
|
|
<div <%= 'style="display:none;"' unless @query.new_record? %>><%= render :partial => 'filters', :locals => {:query_form => query_form} %></div>
|
|
</fieldset>
|
|
|
|
<fieldset id="group-by" class="collapsible">
|
|
<legend onclick="toggleFieldset(this);"><%= l(:label_group_by) %></legend>
|
|
<div><%= render :partial => 'group_by', :locals => {:query_form => query_form} %></div>
|
|
</fieldset>
|
|
|
|
<fieldset id="filter-options" class="collapsible">
|
|
<legend onclick="toggleFieldset(this):"><%= l(:label_option_plural) %></legend>
|
|
<div><%= render :partial => 'options', :locals => {:query_form => query_form} %></div>
|
|
</fieldset>
|
|
|
|
<p class="buttons">
|
|
<%= 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 %>
|
|
</p>
|
|
</div>
|
|
<% end %>
|
|
|
|
<%= javascript_tag "original_filters = Form.serialize('filters');" %>
|
|
|
|
<%= error_messages_for 'query' %>
|
|
|
|
<% if @query.valid? %>
|
|
<%= render :partial => 'list', :locals => {:entries => @entries, :query => @query} %>
|
|
<% 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 %>
|
|
|
|
|