2009-09-20 11:39:53 +04:00
|
|
|
<div class="contextual">
|
|
|
|
<% if !@query.new_record? && @query.editable_by?(User.current) %>
|
|
|
|
<%= link_to l(:button_edit), {:controller => 'queries', :action => 'edit', :id => @query}, :class => 'icon icon-edit' %>
|
|
|
|
<%= link_to l(:button_delete), {:controller => 'queries', :action => 'destroy', :id => @query}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<h2><%= @query.new_record? ? l(:label_issue_plural) : h(@query.name) %></h2>
|
|
|
|
<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
|
|
|
|
|
2011-04-01 18:34:44 +04:00
|
|
|
<% form_tag({ :controller => 'issues', :action => 'index', :project_id => @project }, :method => :get, :id => 'query_form') do %>
|
|
|
|
<%= hidden_field_tag 'set_filter', '1' %>
|
2010-06-20 01:53:58 +04:00
|
|
|
<div id="query_form_content" class="hide-when-print">
|
2010-03-03 23:09:39 +03:00
|
|
|
<fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
|
2009-09-20 11:24:16 +04:00
|
|
|
<legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
|
2010-03-03 23:09:39 +03:00
|
|
|
<div style="<%= @query.new_record? ? "" : "display: none;" %>">
|
2009-09-20 11:24:16 +04:00
|
|
|
<%= render :partial => 'queries/filters', :locals => {:query => @query} %>
|
|
|
|
</div>
|
2009-04-26 17:09:14 +04:00
|
|
|
</fieldset>
|
2009-09-20 11:24:16 +04:00
|
|
|
<fieldset class="collapsible collapsed">
|
2009-10-22 21:46:54 +04:00
|
|
|
<legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend>
|
2009-09-20 11:24:16 +04:00
|
|
|
<div style="display: none;">
|
2009-11-28 14:34:12 +03:00
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<td><%= l(:field_column_names) %></td>
|
|
|
|
<td><%= render :partial => 'queries/columns', :locals => {:query => @query} %></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td><%= l(:field_group_by) %></td>
|
|
|
|
<td><%= select_tag('group_by', options_for_select([[]] + @query.groupable_columns.collect {|c| [c.caption, c.name.to_s]}, @query.group_by)) %></td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2009-09-20 11:24:16 +04:00
|
|
|
</div>
|
|
|
|
</fieldset>
|
2009-04-26 17:09:14 +04:00
|
|
|
</div>
|
2010-06-20 01:53:58 +04:00
|
|
|
<p class="buttons hide-when-print">
|
2009-04-26 17:09:14 +04:00
|
|
|
|
2011-04-01 18:34:44 +04:00
|
|
|
<%= link_to_function l(:button_apply), 'submit_query_form("query_form")', :class => 'icon icon-checked' %>
|
|
|
|
<%= link_to l(:button_clear), { :set_filter => 1, :project_id => @project }, :class => 'icon icon-reload' %>
|
2009-09-20 11:39:53 +04:00
|
|
|
<% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %>
|
2011-04-01 18:34:44 +04:00
|
|
|
<%= link_to_function l(:button_save), "$('query_form').action='#{ url_for :controller => 'queries', :action => 'new', :project_id => @project }'; submit_query_form('query_form')", :class => 'icon icon-save' %>
|
2007-11-05 21:38:42 +03:00
|
|
|
<% end %>
|
2008-03-22 00:08:00 +03:00
|
|
|
</p>
|
2007-08-31 21:02:44 +04:00
|
|
|
<% end %>
|
2009-04-26 17:09:14 +04:00
|
|
|
|
2007-08-31 21:02:44 +04:00
|
|
|
<%= error_messages_for 'query' %>
|
|
|
|
<% if @query.valid? %>
|
|
|
|
<% if @issues.empty? %>
|
2007-11-05 21:38:42 +03:00
|
|
|
<p class="nodata"><%= l(:label_no_data) %></p>
|
2007-08-31 21:02:44 +04:00
|
|
|
<% else %>
|
2007-10-01 12:44:17 +04:00
|
|
|
<%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %>
|
2007-12-29 14:36:30 +03:00
|
|
|
<p class="pagination"><%= pagination_links_full @issue_pages, @issue_count %></p>
|
2009-02-21 01:45:16 +03:00
|
|
|
<% end %>
|
2008-03-05 11:25:22 +03:00
|
|
|
|
2009-01-29 16:53:17 +03:00
|
|
|
<% other_formats_links do |f| %>
|
2011-04-01 18:34:44 +04:00
|
|
|
<%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %>
|
|
|
|
<%= f.link_to 'CSV', :url => params %>
|
|
|
|
<%= f.link_to 'PDF', :url => params %>
|
2009-01-29 16:53:17 +03:00
|
|
|
<% end %>
|
|
|
|
|
2007-08-31 21:02:44 +04:00
|
|
|
<% end %>
|
2010-07-16 07:16:29 +04:00
|
|
|
<%= call_hook(:view_issues_index_bottom, { :issues => @issues, :project => @project, :query => @query }) %>
|
2007-11-05 21:38:42 +03:00
|
|
|
|
|
|
|
<% content_for :sidebar do %>
|
|
|
|
<%= render :partial => 'issues/sidebar' %>
|
2008-03-30 16:29:07 +04:00
|
|
|
<% end %>
|
2007-09-01 00:22:36 +04:00
|
|
|
|
|
|
|
<% content_for :header_tags do %>
|
2007-11-05 21:38:42 +03:00
|
|
|
<%= auto_discovery_link_tag(:atom, {:query_id => @query, :format => 'atom', :page => nil, :key => User.current.rss_key}, :title => l(:label_issue_plural)) %>
|
2010-08-23 19:04:36 +04:00
|
|
|
<%= 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)) %>
|
2007-09-01 00:22:36 +04:00
|
|
|
<% end %>
|
2008-02-11 20:59:41 +03:00
|
|
|
|
2010-08-19 22:16:54 +04:00
|
|
|
<%= context_menu issues_context_menu_path %>
|