@@ -1,90 +1,105 | |||
|
1 | 1 | <div class="contextual"> |
|
2 | 2 | <% if !@query.new_record? && @query.editable_by?(User.current) %> |
|
3 | 3 | <%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %> |
|
4 |
<%= link_to l(:button_delete), query_path(@query), :confirm => l(:text_are_you_sure), |
|
|
4 | <%= link_to l(:button_delete), query_path(@query), :confirm => l(:text_are_you_sure), | |
|
5 | :method => :delete, :class => 'icon icon-del' %> | |
|
5 | 6 | <% end %> |
|
6 | 7 | </div> |
|
7 | 8 | |
|
8 | 9 | <h2><%= @query.new_record? ? l(:label_issue_plural) : h(@query.name) %></h2> |
|
9 | 10 | <% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %> |
|
10 | 11 | |
|
11 |
<% form_tag({ :controller => 'issues', :action => 'index', :project_id => @project }, |
|
|
12 | <% form_tag({ :controller => 'issues', :action => 'index', :project_id => @project }, | |
|
13 | :method => :get, :id => 'query_form') do %> | |
|
12 | 14 | <%= hidden_field_tag 'set_filter', '1' %> |
|
13 | 15 | <div id="query_form_content" class="hide-when-print"> |
|
14 | 16 | <fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>"> |
|
15 | 17 | <legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend> |
|
16 | 18 | <div style="<%= @query.new_record? ? "" : "display: none;" %>"> |
|
17 | 19 | <%= render :partial => 'queries/filters', :locals => {:query => @query} %> |
|
18 | 20 | </div> |
|
19 | 21 | </fieldset> |
|
20 | 22 | <fieldset class="collapsible collapsed"> |
|
21 | 23 | <legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend> |
|
22 | 24 | <div style="display: none;"> |
|
23 | 25 | <table> |
|
24 | 26 | <tr> |
|
25 | 27 | <td><%= l(:field_column_names) %></td> |
|
26 | 28 | <td><%= render :partial => 'queries/columns', :locals => {:query => @query} %></td> |
|
27 | 29 | </tr> |
|
28 | 30 | <tr> |
|
29 | 31 | <td><label for='group_by'><%= l(:field_group_by) %></label></td> |
|
30 | <td><%= select_tag('group_by', options_for_select([[]] + @query.groupable_columns.collect {|c| [c.caption, c.name.to_s]}, @query.group_by)) %></td> | |
|
32 | <td><%= select_tag('group_by', | |
|
33 | options_for_select( | |
|
34 | [[]] + @query.groupable_columns.collect {|c| [c.caption, c.name.to_s]}, | |
|
35 | @query.group_by) | |
|
36 | ) %></td> | |
|
31 | 37 | </tr> |
|
32 | 38 | </table> |
|
33 | 39 | </div> |
|
34 | 40 | </fieldset> |
|
35 | 41 | </div> |
|
36 | 42 | <p class="buttons hide-when-print"> |
|
37 | 43 | |
|
38 | 44 | <%= link_to_function l(:button_apply), 'submit_query_form("query_form")', :class => 'icon icon-checked' %> |
|
39 | 45 | <%= link_to l(:button_clear), { :set_filter => 1, :project_id => @project }, :class => 'icon icon-reload' %> |
|
40 | 46 | <% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %> |
|
41 | <%= link_to_function l(:button_save), "$('query_form').action='#{ @project ? new_project_query_path : new_query_path }'; submit_query_form('query_form')", :class => 'icon icon-save' %> | |
|
47 | <%= link_to_function l(:button_save), | |
|
48 | "$('query_form').action='#{ @project ? new_project_query_path : new_query_path }'; submit_query_form('query_form')", | |
|
49 | :class => 'icon icon-save' %> | |
|
42 | 50 | <% end %> |
|
43 | 51 | </p> |
|
44 | 52 | <% end %> |
|
45 | 53 | |
|
46 | 54 | <%= error_messages_for 'query' %> |
|
47 | 55 | <% if @query.valid? %> |
|
48 | 56 | <% if @issues.empty? %> |
|
49 | 57 | <p class="nodata"><%= l(:label_no_data) %></p> |
|
50 | 58 | <% else %> |
|
51 | 59 | <%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %> |
|
52 | 60 | <p class="pagination"><%= pagination_links_full @issue_pages, @issue_count %></p> |
|
53 | 61 | <% end %> |
|
54 | 62 | |
|
55 | 63 | <% other_formats_links do |f| %> |
|
56 | 64 | <%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %> |
|
57 | 65 | <%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '330px'); return false;" %> |
|
58 | 66 | <%= f.link_to 'PDF', :url => params %> |
|
59 | 67 | <% end %> |
|
60 | 68 | |
|
61 | 69 | <div id="csv-export-options" style="display:none;"> |
|
62 | 70 | <h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3> |
|
63 | 71 | <% form_tag(params.merge({:format => 'csv',:page=>nil}), :method => :get, :id => 'csv-export-form') do %> |
|
64 | 72 | <p> |
|
65 | 73 | <label><%= radio_button_tag 'columns', '', true %> <%= l(:description_selected_columns) %></label><br /> |
|
66 | 74 | <label><%= radio_button_tag 'columns', 'all' %> <%= l(:description_all_columns) %></label> |
|
67 | 75 | </p> |
|
68 | 76 | <p> |
|
69 | 77 | <label><%= check_box_tag 'description', '1' %> <%= l(:field_description) %></label> |
|
70 | 78 | </p> |
|
71 | 79 | <p class="buttons"> |
|
72 | 80 | <%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);" %> |
|
73 | 81 | <%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %> |
|
74 | 82 | </p> |
|
75 | 83 | <% end %> |
|
76 | 84 | </div> |
|
77 | 85 | |
|
78 | 86 | <% end %> |
|
79 | 87 | <%= call_hook(:view_issues_index_bottom, { :issues => @issues, :project => @project, :query => @query }) %> |
|
80 | 88 | |
|
81 | 89 | <% content_for :sidebar do %> |
|
82 | 90 | <%= render :partial => 'issues/sidebar' %> |
|
83 | 91 | <% end %> |
|
84 | 92 | |
|
85 | 93 | <% content_for :header_tags do %> |
|
86 | <%= auto_discovery_link_tag(:atom, {:query_id => @query, :format => 'atom', :page => nil, :key => User.current.rss_key}, :title => l(:label_issue_plural)) %> | |
|
87 | <%= auto_discovery_link_tag(:atom, {:controller => 'journals', :action => 'index', :query_id => @query, :format => 'atom', :page => nil, :key => User.current.rss_key}, :title => l(:label_changes_details)) %> | |
|
94 | <%= auto_discovery_link_tag(:atom, | |
|
95 | {:query_id => @query, :format => 'atom', | |
|
96 | :page => nil, :key => User.current.rss_key}, | |
|
97 | :title => l(:label_issue_plural)) %> | |
|
98 | <%= auto_discovery_link_tag(:atom, | |
|
99 | {:controller => 'journals', :action => 'index', | |
|
100 | :query_id => @query, :format => 'atom', | |
|
101 | :page => nil, :key => User.current.rss_key}, | |
|
102 | :title => l(:label_changes_details)) %> | |
|
88 | 103 | <% end %> |
|
89 | 104 | |
|
90 | 105 | <%= context_menu issues_context_menu_path %> |
General Comments 0
You need to be logged in to leave comments.
Login now