##// END OF EJS Templates
Fixes activity date param....
Jean-Philippe Lang -
r1999:d63746ab3e41
parent child
Show More
@@ -221,7 +221,7 class ProjectsController < ApplicationController
221 @days = Setting.activity_days_default.to_i
221 @days = Setting.activity_days_default.to_i
222
222
223 if params[:from]
223 if params[:from]
224 begin; @date_to = params[:from].to_date; rescue; end
224 begin; @date_to = params[:from].to_date + 1; rescue; end
225 end
225 end
226
226
227 @date_to ||= Date.today + 1
227 @date_to ||= Date.today + 1
@@ -22,14 +22,14
22
22
23 <div style="float:left;">
23 <div style="float:left;">
24 <%= link_to_remote(('&#171; ' + l(:label_previous)),
24 <%= link_to_remote(('&#171; ' + l(:label_previous)),
25 {:update => "content", :url => params.merge(:from => @date_to - @days), :complete => 'window.scrollTo(0,0)'},
25 {:update => "content", :url => params.merge(:from => @date_to - @days - 1), :complete => 'window.scrollTo(0,0)'},
26 {:href => url_for(params.merge(:from => @date_to - @days)),
26 {:href => url_for(params.merge(:from => @date_to - @days - 1)),
27 :title => "#{l(:label_date_from)} #{format_date(@date_to - 2*@days)} #{l(:label_date_to).downcase} #{format_date(@date_to - @days - 1)}"}) %>
27 :title => "#{l(:label_date_from)} #{format_date(@date_to - 2*@days)} #{l(:label_date_to).downcase} #{format_date(@date_to - @days - 1)}"}) %>
28 </div>
28 </div>
29 <div style="float:right;">
29 <div style="float:right;">
30 <%= link_to_remote((l(:label_next) + ' &#187;'),
30 <%= link_to_remote((l(:label_next) + ' &#187;'),
31 {:update => "content", :url => params.merge(:from => @date_to + @days), :complete => 'window.scrollTo(0,0)'},
31 {:update => "content", :url => params.merge(:from => @date_to + @days - 1), :complete => 'window.scrollTo(0,0)'},
32 {:href => url_for(params.merge(:from => @date_to + @days)),
32 {:href => url_for(params.merge(:from => @date_to + @days - 1)),
33 :title => "#{l(:label_date_from)} #{format_date(@date_to)} #{l(:label_date_to).downcase} #{format_date(@date_to + @days - 1)}"}) unless @date_to >= Date.today %>
33 :title => "#{l(:label_date_from)} #{format_date(@date_to)} #{l(:label_date_to).downcase} #{format_date(@date_to + @days - 1)}"}) unless @date_to >= Date.today %>
34 </div>
34 </div>
35 &nbsp;
35 &nbsp;
General Comments 0
You need to be logged in to leave comments. Login now