2007-11-05 21:38:42 +03:00
|
|
|
<% if @query.new_record? %>
|
|
|
|
<h2><%=l(:label_issue_plural)%></h2>
|
2008-01-03 01:41:53 +03:00
|
|
|
<% html_title(l(:label_issue_plural)) %>
|
2007-08-31 21:02:44 +04:00
|
|
|
|
2007-11-09 16:32:14 +03:00
|
|
|
<% form_tag({ :controller => 'queries', :action => 'new' }, :id => 'query_form') do %>
|
|
|
|
<%= hidden_field_tag('project_id', @project.id) if @project %>
|
2008-03-16 17:31:17 +03:00
|
|
|
<fieldset id="filters"><legend><%= l(:label_filter_plural) %></legend>
|
2007-11-05 21:38:42 +03:00
|
|
|
<%= render :partial => 'queries/filters', :locals => {:query => @query} %>
|
2008-03-22 00:08:00 +03:00
|
|
|
<p class="buttons">
|
2007-11-05 21:38:42 +03:00
|
|
|
<%= link_to_remote l(:button_apply),
|
|
|
|
{ :url => { :set_filter => 1 },
|
|
|
|
:update => "content",
|
|
|
|
:with => "Form.serialize('query_form')"
|
2007-11-17 20:45:21 +03:00
|
|
|
}, :class => 'icon icon-checked' %>
|
2007-11-05 21:38:42 +03:00
|
|
|
|
|
|
|
<%= link_to_remote l(:button_clear),
|
|
|
|
{ :url => { :set_filter => 1 },
|
|
|
|
:update => "content",
|
|
|
|
}, :class => 'icon icon-reload' %>
|
|
|
|
|
2008-03-30 18:20:07 +04:00
|
|
|
<% if User.current.allowed_to?(:save_queries, @project, :global => true) %>
|
2007-11-05 21:38:42 +03:00
|
|
|
<%= link_to l(:button_save), {}, :onclick => "$('query_form').submit(); return false;", :class => 'icon icon-save' %>
|
|
|
|
<% end %>
|
2008-03-22 00:08:00 +03:00
|
|
|
</p>
|
2008-03-16 17:31:17 +03:00
|
|
|
</fieldset>
|
2007-11-05 21:38:42 +03:00
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<div class="contextual">
|
|
|
|
<% if @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>
|
2008-01-03 01:41:53 +03:00
|
|
|
<h2><%=h @query.name %></h2>
|
2007-11-05 21:38:42 +03:00
|
|
|
<div id="query_form"></div>
|
2008-01-03 01:41:53 +03:00
|
|
|
<% html_title @query.name %>
|
2007-08-31 21:02:44 +04:00
|
|
|
<% end %>
|
|
|
|
<%= 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>
|
2008-03-05 11:25:22 +03:00
|
|
|
|
|
|
|
<p class="other-formats">
|
|
|
|
<%= l(:label_export_to) %>
|
2008-06-06 19:20:08 +04:00
|
|
|
<span><%= link_to 'Atom', {:query_id => @query, :format => 'atom', :key => User.current.rss_key}, :class => 'feed' %></span>
|
2008-03-05 11:25:22 +03:00
|
|
|
<span><%= link_to 'CSV', {:format => 'csv'}, :class => 'csv' %></span>
|
|
|
|
<span><%= link_to 'PDF', {:format => 'pdf'}, :class => 'pdf' %></span>
|
|
|
|
</p>
|
2007-08-31 21:02:44 +04:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
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)) %>
|
|
|
|
<%= auto_discovery_link_tag(:atom, {:action => 'changes', :query_id => @query, :format => 'atom', :page => nil, :key => User.current.rss_key}, :title => l(:label_changes_details)) %>
|
2008-02-11 20:59:41 +03:00
|
|
|
<%= javascript_include_tag 'context_menu' %>
|
|
|
|
<%= stylesheet_link_tag 'context_menu' %>
|
2007-09-01 00:22:36 +04:00
|
|
|
<% end %>
|
2008-02-11 20:59:41 +03:00
|
|
|
|
|
|
|
<div id="context-menu" style="display: none;"></div>
|
|
|
|
<%= javascript_tag "new ContextMenu('#{url_for(:controller => 'issues', :action => 'context_menu')}')" %>
|