diff app/views/issues/index.rhtml @ 441:cbce1fd3b1b7 redmine-1.2

Update to Redmine 1.2-stable branch (Redmine SVN rev 6000)
author Chris Cannam
date Mon, 06 Jun 2011 14:24:13 +0100
parents 40f7cfd4df19
children
line wrap: on
line diff
--- a/app/views/issues/index.rhtml	Thu Mar 03 11:42:28 2011 +0000
+++ b/app/views/issues/index.rhtml	Mon Jun 06 14:24:13 2011 +0100
@@ -8,8 +8,8 @@
 <h2><%= @query.new_record? ? l(:label_issue_plural) : h(@query.name) %></h2>
 <% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
 
-<% form_tag({ :controller => 'queries', :action => 'new' }, :id => 'query_form') do %>
-    <%= hidden_field_tag('project_id', @project.to_param) if @project %>
+<% form_tag({ :controller => 'issues', :action => 'index', :project_id => @project }, :method => :get, :id => 'query_form') do %>
+    <%= hidden_field_tag 'set_filter', '1' %>
 		<div id="query_form_content" class="hide-when-print">
     <fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
     	<legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
@@ -35,22 +35,10 @@
 		</div>
     <p class="buttons hide-when-print">
 
-    <%= link_to_remote l(:button_apply), 
-                       { :url => { :set_filter => 1 },
-                         :before => 'selectAllOptions("selected_columns");',
-                         :update => "content",
-                         :complete => "apply_filters_observer()",
-                         :with => "Form.serialize('query_form')"
-                       }, :class => 'icon icon-checked' %>
-                       
-    <%= link_to_remote l(:button_clear),
-                       { :url => { :set_filter => 1, :project_id => @project },
-                         :method => :get,
-                         :update => "content",
-                       }, :class => 'icon icon-reload'  %>
-                       
+    <%= 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'  %>
     <% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %>
-    <%= link_to l(:button_save), {}, :onclick => "selectAllOptions('selected_columns'); $('query_form').submit(); return false;", :class => 'icon icon-save' %>
+    <%= 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' %>
     <% end %>
     </p>
 <% end %>
@@ -65,9 +53,9 @@
 <% end %>
 
 <% other_formats_links do |f| %>
-	<%= f.link_to 'Atom', :url => { :project_id => @project, :query_id => (@query.new_record? ? nil : @query), :key => User.current.rss_key } %>
-	<%= f.link_to 'CSV', :url => { :project_id => @project } %>
-	<%= f.link_to 'PDF', :url => { :project_id => @project } %>
+	<%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %>
+	<%= f.link_to 'CSV', :url => params %>
+	<%= f.link_to 'PDF', :url => params %>
 <% end %>
 
 <% end %>