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