diff --git a/app/controllers/calendars_controller.rb b/app/controllers/calendars_controller.rb index 4544b33..a65f39b 100644 --- a/app/controllers/calendars_controller.rb +++ b/app/controllers/calendars_controller.rb @@ -1,3 +1,20 @@ +# Redmine - project management software +# Copyright (C) 2006-2011 Jean-Philippe Lang +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + class CalendarsController < ApplicationController menu_item :calendar before_filter :find_optional_project @@ -36,9 +53,4 @@ class CalendarsController < ApplicationController render :action => 'show', :layout => false if request.xhr? end - - def update - show - end - end diff --git a/app/controllers/gantts_controller.rb b/app/controllers/gantts_controller.rb index 50fd8c1..b4eb5e6 100644 --- a/app/controllers/gantts_controller.rb +++ b/app/controllers/gantts_controller.rb @@ -1,3 +1,20 @@ +# Redmine - project management software +# Copyright (C) 2006-2011 Jean-Philippe Lang +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + class GanttsController < ApplicationController menu_item :gantt before_filter :find_optional_project @@ -28,9 +45,4 @@ class GanttsController < ApplicationController format.pdf { send_data(@gantt.to_pdf, :type => 'application/pdf', :filename => "#{basename}.pdf") } end end - - def update - show - end - end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index f7400bc..df3104b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -335,8 +335,6 @@ module ApplicationHelper page_param = options.delete(:page_param) || :page per_page_links = options.delete(:per_page_links) url_param = params.dup - # don't reuse query params if filters are present - url_param.merge!(:fields => nil, :values => nil, :operators => nil) if url_param.delete(:set_filter) html = '' if paginator.current.previous diff --git a/app/helpers/calendars_helper.rb b/app/helpers/calendars_helper.rb index 08e665d..20f1e82 100644 --- a/app/helpers/calendars_helper.rb +++ b/app/helpers/calendars_helper.rb @@ -32,9 +32,7 @@ module CalendarsHelper end def link_to_month(link_name, year, month, options={}) - project_id = options[:project].present? ? options[:project].to_param : nil - - link_target = calendar_path(:year => year, :month => month, :project_id => project_id) + link_target = url_for(params.merge(:year => year, :month => month)) link_to_remote(link_name, {:update => "content", :url => link_target, :method => :put}, diff --git a/app/helpers/gantt_helper.rb b/app/helpers/gantt_helper.rb index aa74385..03a48c4 100644 --- a/app/helpers/gantt_helper.rb +++ b/app/helpers/gantt_helper.rb @@ -1,5 +1,5 @@ -# redMine - project management software -# Copyright (C) 2006 Jean-Philippe Lang +# Redmine - project management software +# Copyright (C) 2006-2011 Jean-Philippe Lang # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -22,8 +22,8 @@ module GanttHelper when :in if gantt.zoom < 4 link_to_remote(l(:text_zoom_in), - {:url => gantt.params.merge(:zoom => (gantt.zoom+1)), :method => :get, :update => 'content'}, - {:href => url_for(gantt.params.merge(:zoom => (gantt.zoom+1))), + {:url => params.merge(gantt.params.merge(:zoom => (gantt.zoom+1))), :method => :get, :update => 'content'}, + {:href => url_for(params.merge(gantt.params.merge(:zoom => (gantt.zoom+1)))), :class => 'icon icon-zoom-in'}) else content_tag('span', l(:text_zoom_in), :class => 'icon icon-zoom-in') @@ -32,8 +32,8 @@ module GanttHelper when :out if gantt.zoom > 1 link_to_remote(l(:text_zoom_out), - {:url => gantt.params.merge(:zoom => (gantt.zoom-1)), :method => :get, :update => 'content'}, - {:href => url_for(gantt.params.merge(:zoom => (gantt.zoom-1))), + {:url => params.merge(gantt.params.merge(:zoom => (gantt.zoom-1))), :method => :get, :update => 'content'}, + {:href => url_for(params.merge(gantt.params.merge(:zoom => (gantt.zoom-1)))), :class => 'icon icon-zoom-out'}) else content_tag('span', l(:text_zoom_out), :class => 'icon icon-zoom-out') diff --git a/app/views/calendars/show.html.erb b/app/views/calendars/show.html.erb index b2d1c5c..0b9d677 100644 --- a/app/views/calendars/show.html.erb +++ b/app/views/calendars/show.html.erb @@ -1,7 +1,7 @@