@@ -1,62 +1,62 | |||
|
1 | 1 | <%= hidden_field_tag 'set_filter', '1' %> |
|
2 | 2 | <%= hidden_field_tag 'type', @query.type, :disabled => true, :id => 'query_type' %> |
|
3 | 3 | |
|
4 | 4 | <div id="query_form_with_buttons" class="hide-when-print"> |
|
5 | 5 | <div id="query_form_content"> |
|
6 | 6 | <fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>"> |
|
7 | 7 | <legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend> |
|
8 | 8 | <div style="<%= @query.new_record? ? "" : "display: none;" %>"> |
|
9 | 9 | <%= render :partial => 'queries/filters', :locals => {:query => @query} %> |
|
10 | 10 | </div> |
|
11 | 11 | </fieldset> |
|
12 | 12 | |
|
13 | 13 | <fieldset id="options" class="collapsible collapsed"> |
|
14 | 14 | <legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend> |
|
15 | 15 | <div style="display: none;"> |
|
16 | 16 | <table> |
|
17 | 17 | <tr> |
|
18 | 18 | <td class="field"><%= l(:field_column_names) %></td> |
|
19 | 19 | <td><%= render_query_columns_selection(@query) %></td> |
|
20 | 20 | </tr> |
|
21 | 21 | <% if @query.groupable_columns.any? %> |
|
22 | 22 | <tr> |
|
23 | 23 | <td class="field"><label for='group_by'><%= l(:field_group_by) %></label></td> |
|
24 | 24 | <td><%= group_by_column_select_tag(@query) %></td> |
|
25 | 25 | </tr> |
|
26 | 26 | <% end %> |
|
27 | 27 | <% if @query.available_block_columns.any? %> |
|
28 | 28 | <tr> |
|
29 | 29 | <td class="field"><%= l(:button_show) %></td> |
|
30 | 30 | <td><%= available_block_columns_tags(@query) %></td> |
|
31 | 31 | </tr> |
|
32 | 32 | <% end %> |
|
33 | 33 | <% if @query.available_totalable_columns.any? %> |
|
34 | 34 | <tr> |
|
35 | 35 | <td><%= l(:label_total_plural) %></td> |
|
36 | 36 | <td><%= available_totalable_columns_tags(@query) %></td> |
|
37 | 37 | </tr> |
|
38 | 38 | <% end %> |
|
39 | 39 | </table> |
|
40 | 40 | </div> |
|
41 | 41 | </fieldset> |
|
42 | 42 | </div> |
|
43 | 43 | |
|
44 | 44 | <p class="buttons"> |
|
45 | 45 | <%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %> |
|
46 | <%= link_to l(:button_clear), { :set_filter => 1, :project_id => @project }, :class => 'icon icon-reload' %> | |
|
46 | <%= link_to l(:button_clear), { :set_filter => 1, :sort => '', :project_id => @project }, :class => 'icon icon-reload' %> | |
|
47 | 47 | <% if @query.new_record? %> |
|
48 | 48 | <% if User.current.allowed_to?(:save_queries, @project, :global => true) %> |
|
49 | 49 | <%= link_to_function l(:button_save), |
|
50 | 50 | "$('#query_type').prop('disabled',false);$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }').submit()", |
|
51 | 51 | :class => 'icon icon-save' %> |
|
52 | 52 | <% end %> |
|
53 | 53 | <% else %> |
|
54 | 54 | <% if @query.editable_by?(User.current) %> |
|
55 | 55 | <%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %> |
|
56 | 56 | <%= delete_link query_path(@query) %> |
|
57 | 57 | <% end %> |
|
58 | 58 | <% end %> |
|
59 | 59 | </p> |
|
60 | 60 | </div> |
|
61 | 61 | |
|
62 | 62 | <%= error_messages_for @query %> |
General Comments 0
You need to be logged in to leave comments.
Login now