##// END OF EJS Templates
Fixed clearing the Issue filters in the issue list, broken by #2317...
Eric Davis -
r2323:0bbebedada02
parent child
Show More
@@ -1,67 +1,68
1 <% if @query.new_record? %>
1 <% if @query.new_record? %>
2 <h2><%=l(:label_issue_plural)%></h2>
2 <h2><%=l(:label_issue_plural)%></h2>
3 <% html_title(l(:label_issue_plural)) %>
3 <% html_title(l(:label_issue_plural)) %>
4
4
5 <% form_tag({ :controller => 'queries', :action => 'new' }, :id => 'query_form') do %>
5 <% form_tag({ :controller => 'queries', :action => 'new' }, :id => 'query_form') do %>
6 <%= hidden_field_tag('project_id', @project.id) if @project %>
6 <%= hidden_field_tag('project_id', @project.id) if @project %>
7 <fieldset id="filters"><legend><%= l(:label_filter_plural) %></legend>
7 <fieldset id="filters"><legend><%= l(:label_filter_plural) %></legend>
8 <%= render :partial => 'queries/filters', :locals => {:query => @query} %>
8 <%= render :partial => 'queries/filters', :locals => {:query => @query} %>
9 <p class="buttons">
9 <p class="buttons">
10 <%= link_to_remote l(:button_apply),
10 <%= link_to_remote l(:button_apply),
11 { :url => { :set_filter => 1 },
11 { :url => { :set_filter => 1 },
12 :update => "content",
12 :update => "content",
13 :with => "Form.serialize('query_form')"
13 :with => "Form.serialize('query_form')"
14 }, :class => 'icon icon-checked' %>
14 }, :class => 'icon icon-checked' %>
15
15
16 <%= link_to_remote l(:button_clear),
16 <%= link_to_remote l(:button_clear),
17 { :url => { :set_filter => 1 },
17 { :url => { :set_filter => 1, :project_id => (@project.nil? ? nil : @project.id) },
18 :method => :get,
18 :update => "content",
19 :update => "content",
19 }, :class => 'icon icon-reload' %>
20 }, :class => 'icon icon-reload' %>
20
21
21 <% if User.current.allowed_to?(:save_queries, @project, :global => true) %>
22 <% if User.current.allowed_to?(:save_queries, @project, :global => true) %>
22 <%= link_to l(:button_save), {}, :onclick => "$('query_form').submit(); return false;", :class => 'icon icon-save' %>
23 <%= link_to l(:button_save), {}, :onclick => "$('query_form').submit(); return false;", :class => 'icon icon-save' %>
23 <% end %>
24 <% end %>
24 </p>
25 </p>
25 </fieldset>
26 </fieldset>
26 <% end %>
27 <% end %>
27 <% else %>
28 <% else %>
28 <div class="contextual">
29 <div class="contextual">
29 <% if @query.editable_by?(User.current) %>
30 <% if @query.editable_by?(User.current) %>
30 <%= link_to l(:button_edit), {:controller => 'queries', :action => 'edit', :id => @query}, :class => 'icon icon-edit' %>
31 <%= link_to l(:button_edit), {:controller => 'queries', :action => 'edit', :id => @query}, :class => 'icon icon-edit' %>
31 <%= link_to l(:button_delete), {:controller => 'queries', :action => 'destroy', :id => @query}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
32 <%= link_to l(:button_delete), {:controller => 'queries', :action => 'destroy', :id => @query}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
32 <% end %>
33 <% end %>
33 </div>
34 </div>
34 <h2><%=h @query.name %></h2>
35 <h2><%=h @query.name %></h2>
35 <div id="query_form"></div>
36 <div id="query_form"></div>
36 <% html_title @query.name %>
37 <% html_title @query.name %>
37 <% end %>
38 <% end %>
38 <%= error_messages_for 'query' %>
39 <%= error_messages_for 'query' %>
39 <% if @query.valid? %>
40 <% if @query.valid? %>
40 <% if @issues.empty? %>
41 <% if @issues.empty? %>
41 <p class="nodata"><%= l(:label_no_data) %></p>
42 <p class="nodata"><%= l(:label_no_data) %></p>
42 <% else %>
43 <% else %>
43 <%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %>
44 <%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %>
44 <p class="pagination"><%= pagination_links_full @issue_pages, @issue_count %></p>
45 <p class="pagination"><%= pagination_links_full @issue_pages, @issue_count %></p>
45
46
46 <p class="other-formats">
47 <p class="other-formats">
47 <%= l(:label_export_to) %>
48 <%= l(:label_export_to) %>
48 <span><%= link_to 'Atom', {:query_id => @query, :format => 'atom', :key => User.current.rss_key}, :class => 'feed' %></span>
49 <span><%= link_to 'Atom', {:query_id => @query, :format => 'atom', :key => User.current.rss_key}, :class => 'feed' %></span>
49 <span><%= link_to 'CSV', {:format => 'csv'}, :class => 'csv' %></span>
50 <span><%= link_to 'CSV', {:format => 'csv'}, :class => 'csv' %></span>
50 <span><%= link_to 'PDF', {:format => 'pdf'}, :class => 'pdf' %></span>
51 <span><%= link_to 'PDF', {:format => 'pdf'}, :class => 'pdf' %></span>
51 </p>
52 </p>
52 <% end %>
53 <% end %>
53 <% end %>
54 <% end %>
54
55
55 <% content_for :sidebar do %>
56 <% content_for :sidebar do %>
56 <%= render :partial => 'issues/sidebar' %>
57 <%= render :partial => 'issues/sidebar' %>
57 <% end %>
58 <% end %>
58
59
59 <% content_for :header_tags do %>
60 <% content_for :header_tags do %>
60 <%= auto_discovery_link_tag(:atom, {:query_id => @query, :format => 'atom', :page => nil, :key => User.current.rss_key}, :title => l(:label_issue_plural)) %>
61 <%= auto_discovery_link_tag(:atom, {:query_id => @query, :format => 'atom', :page => nil, :key => User.current.rss_key}, :title => l(:label_issue_plural)) %>
61 <%= auto_discovery_link_tag(:atom, {:action => 'changes', :query_id => @query, :format => 'atom', :page => nil, :key => User.current.rss_key}, :title => l(:label_changes_details)) %>
62 <%= auto_discovery_link_tag(:atom, {:action => 'changes', :query_id => @query, :format => 'atom', :page => nil, :key => User.current.rss_key}, :title => l(:label_changes_details)) %>
62 <%= javascript_include_tag 'context_menu' %>
63 <%= javascript_include_tag 'context_menu' %>
63 <%= stylesheet_link_tag 'context_menu' %>
64 <%= stylesheet_link_tag 'context_menu' %>
64 <% end %>
65 <% end %>
65
66
66 <div id="context-menu" style="display: none;"></div>
67 <div id="context-menu" style="display: none;"></div>
67 <%= javascript_tag "new ContextMenu('#{url_for(:controller => 'issues', :action => 'context_menu')}')" %>
68 <%= javascript_tag "new ContextMenu('#{url_for(:controller => 'issues', :action => 'context_menu')}')" %>
General Comments 0
You need to be logged in to leave comments. Login now