diff app/views/gantts/.svn/text-base/show.html.erb.svn-base @ 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 051f544170fe
children
line wrap: on
line diff
--- a/app/views/gantts/.svn/text-base/show.html.erb.svn-base	Thu Mar 03 11:42:28 2011 +0000
+++ b/app/views/gantts/.svn/text-base/show.html.erb.svn-base	Mon Jun 06 14:24:13 2011 +0100
@@ -1,8 +1,8 @@
 <% @gantt.view = self %>
 <h2><%= @query.new_record? ? l(:label_gantt) : h(@query.name) %></h2>
 
-<% form_tag(gantt_path(:month => params[:month], :year => params[:year], :months => params[:months]), :method => :put, :id => 'query_form') do %>
-  <%= hidden_field_tag('project_id', @project.to_param) if @project%>
+<% form_tag({:controller => 'gantts', :action => 'show', :project_id => @project, :month => params[:month], :year => params[:year], :months => params[:months]}, :method => :get, :id => 'query_form') do %>
+<%= hidden_field_tag 'set_filter', '1' %>
 <fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
   <legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
 	<div style="<%= @query.new_record? ? "" : "display: none;" %>">
@@ -22,17 +22,8 @@
 <%= select_year(@gantt.year_from, :prefix => "year", :discard_type => true) %>
 <%= hidden_field_tag 'zoom', @gantt.zoom %>
 
-<%= link_to_remote l(:button_apply), 
-                   { :url => { :set_filter => 1 },
-                     :update => "content",
-                     :with => "Form.serialize('query_form')"
-                   }, :class => 'icon icon-checked' %>
-                   
-<%= link_to_remote l(:button_clear),
-                   { :url => { :project_id => @project, :set_filter => 1 }, 
-                   	 :method => :put,
-                     :update => "content",
-                   }, :class => 'icon icon-reload' %>
+<%= link_to_function l(:button_apply), '$("query_form").submit()', :class => 'icon icon-checked' %>
+<%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 }, :class => 'icon icon-reload' %>
 </p>
 <% end %>
 
@@ -178,14 +169,14 @@
 
 <table width="100%">
 <tr>
-<td align="left"><%= link_to_remote ('&#171; ' + l(:label_previous)), {:url => @gantt.params_previous, :method => :get, :update => 'content', :complete => 'window.scrollTo(0,0)'}, {:href => url_for(@gantt.params_previous)} %></td>
-<td align="right"><%= link_to_remote (l(:label_next) + ' &#187;'), {:url => @gantt.params_next, :method => :get, :update => 'content', :complete => 'window.scrollTo(0,0)'}, {:href => url_for(@gantt.params_next)} %></td>
+<td align="left"><%= link_to_content_update('&#171; ' + l(:label_previous), params.merge(@gantt.params_previous)) %></td>
+<td align="right"><%= link_to_content_update(l(:label_next) + ' &#187;', params.merge(@gantt.params_next)) %></td>
 </tr>
 </table>
 
 <% other_formats_links do |f| %>
-	<%= f.link_to 'PDF', :url => @gantt.params %>
-	<%= f.link_to('PNG', :url => @gantt.params) if @gantt.respond_to?('to_image') %>
+	<%= f.link_to 'PDF', :url => params.merge(@gantt.params) %>
+	<%= f.link_to('PNG', :url => params.merge(@gantt.params)) if @gantt.respond_to?('to_image') %>
 <% end %>
 <% end # query.valid? %>