@@ -245,7 +245,7 module IssuesHelper | |||
|
245 | 245 | when :in |
|
246 | 246 | if gantt.zoom < 4 |
|
247 | 247 | link_to_remote(l(:text_zoom_in) + image_tag('zoom_in.png', img_attributes.merge(:alt => l(:text_zoom_in))), |
|
248 | {:url => gantt.params.merge(:zoom => (gantt.zoom+1)), :update => 'content'}, | |
|
248 | {:url => gantt.params.merge(:zoom => (gantt.zoom+1)), :method => :get, :update => 'content'}, | |
|
249 | 249 | {:href => url_for(gantt.params.merge(:zoom => (gantt.zoom+1)))}) |
|
250 | 250 | else |
|
251 | 251 | l(:text_zoom_in) + |
@@ -255,7 +255,7 module IssuesHelper | |||
|
255 | 255 | when :out |
|
256 | 256 | if gantt.zoom > 1 |
|
257 | 257 | link_to_remote(l(:text_zoom_out) + image_tag('zoom_out.png', img_attributes.merge(:alt => l(:text_zoom_out))), |
|
258 | {:url => gantt.params.merge(:zoom => (gantt.zoom-1)), :update => 'content'}, | |
|
258 | {:url => gantt.params.merge(:zoom => (gantt.zoom-1)), :method => :get, :update => 'content'}, | |
|
259 | 259 | {:href => url_for(gantt.params.merge(:zoom => (gantt.zoom-1)))}) |
|
260 | 260 | else |
|
261 | 261 | l(:text_zoom_out) + |
@@ -169,8 +169,8 if Date.today >= @gantt.date_from and Date.today <= @gantt.date_to %> | |||
|
169 | 169 | |
|
170 | 170 | <table width="100%"> |
|
171 | 171 | <tr> |
|
172 | <td align="left"><%= link_to_remote ('« ' + l(:label_previous)), {:url => @gantt.params_previous, :update => 'content', :complete => 'window.scrollTo(0,0)'}, {:href => url_for(@gantt.params_previous)} %></td> | |
|
173 | <td align="right"><%= link_to_remote (l(:label_next) + ' »'), {:url => @gantt.params_next, :update => 'content', :complete => 'window.scrollTo(0,0)'}, {:href => url_for(@gantt.params_next)} %></td> | |
|
172 | <td align="left"><%= link_to_remote ('« ' + l(:label_previous)), {:url => @gantt.params_previous, :method => :get, :update => 'content', :complete => 'window.scrollTo(0,0)'}, {:href => url_for(@gantt.params_previous)} %></td> | |
|
173 | <td align="right"><%= link_to_remote (l(:label_next) + ' »'), {:url => @gantt.params_next, :method => :get, :update => 'content', :complete => 'window.scrollTo(0,0)'}, {:href => url_for(@gantt.params_next)} %></td> | |
|
174 | 174 | </tr> |
|
175 | 175 | </table> |
|
176 | 176 |
@@ -68,17 +68,21 module Redmine | |||
|
68 | 68 | @date_from = Date.civil(@year_from, @month_from, 1) |
|
69 | 69 | @date_to = (@date_from >> @months) - 1 |
|
70 | 70 | end |
|
71 | ||
|
72 | def common_params | |
|
73 | { :controller => 'gantts', :action => 'show', :project_id => @project } | |
|
74 | end | |
|
71 | 75 | |
|
72 | 76 | def params |
|
73 | { :zoom => zoom, :year => year_from, :month => month_from, :months => months } | |
|
77 | common_params.merge({ :zoom => zoom, :year => year_from, :month => month_from, :months => months }) | |
|
74 | 78 | end |
|
75 | 79 | |
|
76 | 80 | def params_previous |
|
77 |
{ |
|
|
81 | common_params.merge({:year => (date_from << months).year, :month => (date_from << months).month, :zoom => zoom, :months => months }) | |
|
78 | 82 | end |
|
79 | 83 | |
|
80 | 84 | def params_next |
|
81 |
{ |
|
|
85 | common_params.merge({:year => (date_from >> months).year, :month => (date_from >> months).month, :zoom => zoom, :months => months }) | |
|
82 | 86 | end |
|
83 | 87 | |
|
84 | 88 | ### Extracted from the HTML view/helpers |
General Comments 0
You need to be logged in to leave comments.
Login now