To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / .svn / pristine / ca / caa1ddd4c159daa3892ce812a7b8945e9e584642.svn-base @ 1297:0a574315af3e
History | View | Annotate | Download (4.32 KB)
| 1 |
<div class="contextual"> |
|---|---|
| 2 |
<% if !@query.new_record? && @query.editable_by?(User.current) %> |
| 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), :method => :delete, :class => 'icon icon-del' %> |
| 5 |
<% end %> |
| 6 |
</div> |
| 7 |
|
| 8 |
<h2><%= @query.new_record? ? l(:label_issue_plural) : h(@query.name) %></h2> |
| 9 |
<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %> |
| 10 |
|
| 11 |
<% form_tag({ :controller => 'issues', :action => 'index', :project_id => @project }, :method => :get, :id => 'query_form') do %>
|
| 12 |
<%= hidden_field_tag 'set_filter', '1' %> |
| 13 |
<div id="query_form_content" class="hide-when-print"> |
| 14 |
<fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>"> |
| 15 |
<legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend> |
| 16 |
<div style="<%= @query.new_record? ? "" : "display: none;" %>"> |
| 17 |
<%= render :partial => 'queries/filters', :locals => {:query => @query} %>
|
| 18 |
</div> |
| 19 |
</fieldset> |
| 20 |
<fieldset class="collapsible collapsed"> |
| 21 |
<legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend> |
| 22 |
<div style="display: none;"> |
| 23 |
<table> |
| 24 |
<tr> |
| 25 |
<td><%= l(:field_column_names) %></td> |
| 26 |
<td><%= render :partial => 'queries/columns', :locals => {:query => @query} %></td>
|
| 27 |
</tr> |
| 28 |
<tr> |
| 29 |
<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>
|
| 31 |
</tr> |
| 32 |
</table> |
| 33 |
</div> |
| 34 |
</fieldset> |
| 35 |
</div> |
| 36 |
<p class="buttons hide-when-print"> |
| 37 |
|
| 38 |
<%= link_to_function l(:button_apply), 'submit_query_form("query_form")', :class => 'icon icon-checked' %>
|
| 39 |
<%= link_to l(:button_clear), { :set_filter => 1, :project_id => @project }, :class => 'icon icon-reload' %>
|
| 40 |
<% 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' %>
|
| 42 |
<% end %> |
| 43 |
</p> |
| 44 |
<% end %> |
| 45 |
|
| 46 |
<%= error_messages_for 'query' %> |
| 47 |
<% if @query.valid? %> |
| 48 |
<% if @issues.empty? %> |
| 49 |
<p class="nodata"><%= l(:label_no_data) %></p> |
| 50 |
<% else %> |
| 51 |
<%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %>
|
| 52 |
<p class="pagination"><%= pagination_links_full @issue_pages, @issue_count %></p> |
| 53 |
<% end %> |
| 54 |
|
| 55 |
<% other_formats_links do |f| %> |
| 56 |
<%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %> |
| 57 |
<%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '330px'); return false;" %>
|
| 58 |
<%= f.link_to 'PDF', :url => params %> |
| 59 |
<% end %> |
| 60 |
|
| 61 |
<div id="csv-export-options" style="display:none;"> |
| 62 |
<h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3> |
| 63 |
<% form_tag(params.merge({:format => 'csv',:page=>nil}), :method => :get, :id => 'csv-export-form') do %>
|
| 64 |
<p> |
| 65 |
<label><%= radio_button_tag 'columns', '', true %> <%= l(:description_selected_columns) %></label><br /> |
| 66 |
<label><%= radio_button_tag 'columns', 'all' %> <%= l(:description_all_columns) %></label> |
| 67 |
</p> |
| 68 |
<p> |
| 69 |
<label><%= check_box_tag 'description', '1' %> <%= l(:field_description) %></label> |
| 70 |
</p> |
| 71 |
<p class="buttons"> |
| 72 |
<%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);" %> |
| 73 |
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %> |
| 74 |
</p> |
| 75 |
<% end %> |
| 76 |
</div> |
| 77 |
|
| 78 |
<% end %> |
| 79 |
<%= call_hook(:view_issues_index_bottom, { :issues => @issues, :project => @project, :query => @query }) %>
|
| 80 |
|
| 81 |
<% content_for :sidebar do %> |
| 82 |
<%= render :partial => 'issues/sidebar' %> |
| 83 |
<% end %> |
| 84 |
|
| 85 |
<% 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)) %>
|
| 88 |
<% end %> |
| 89 |
|
| 90 |
<%= context_menu issues_context_menu_path %> |