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