From 5e1c29523003f697b4ba88998c1c587881785820 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Fri, 10 Sep 2010 03:09:18 +0000 Subject: Fixed the zoom, previous, and next links on the Gantt chart. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4074 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/helpers/gantt.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb index 7c694022a..cec323720 100644 --- a/lib/redmine/helpers/gantt.rb +++ b/lib/redmine/helpers/gantt.rb @@ -68,17 +68,21 @@ module Redmine @date_from = Date.civil(@year_from, @month_from, 1) @date_to = (@date_from >> @months) - 1 end + + def common_params + { :controller => 'gantts', :action => 'show', :project_id => @project } + end def params - { :zoom => zoom, :year => year_from, :month => month_from, :months => months } + common_params.merge({ :zoom => zoom, :year => year_from, :month => month_from, :months => months }) end def params_previous - { :year => (date_from << months).year, :month => (date_from << months).month, :zoom => zoom, :months => months } + common_params.merge({:year => (date_from << months).year, :month => (date_from << months).month, :zoom => zoom, :months => months }) end def params_next - { :year => (date_from >> months).year, :month => (date_from >> months).month, :zoom => zoom, :months => months } + common_params.merge({:year => (date_from >> months).year, :month => (date_from >> months).month, :zoom => zoom, :months => months }) end ### Extracted from the HTML view/helpers -- cgit v1.2.3