summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-11-09 17:53:30 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-11-09 17:53:30 +0000
commitd63746ab3e4143b7fc957466f699571155b22138 (patch)
tree00cd77d7b31cd2f00a5bd86c6a67ddfc7dd3d632 /app
parent7619c286cc27ed048f216f60972c50cea1564914 (diff)
downloadredmine-d63746ab3e4143b7fc957466f699571155b22138.tar.gz
redmine-d63746ab3e4143b7fc957466f699571155b22138.zip
Fixes activity date param.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2001 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/controllers/projects_controller.rb2
-rw-r--r--app/views/projects/activity.rhtml8
2 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index fc33336a0..a7efa4695 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -221,7 +221,7 @@ class ProjectsController < ApplicationController
@days = Setting.activity_days_default.to_i
if params[:from]
- begin; @date_to = params[:from].to_date; rescue; end
+ begin; @date_to = params[:from].to_date + 1; rescue; end
end
@date_to ||= Date.today + 1
diff --git a/app/views/projects/activity.rhtml b/app/views/projects/activity.rhtml
index 01f7a3e59..5157dda7a 100644
--- a/app/views/projects/activity.rhtml
+++ b/app/views/projects/activity.rhtml
@@ -22,14 +22,14 @@
<div style="float:left;">
<%= link_to_remote(('&#171; ' + l(:label_previous)),
- {:update => "content", :url => params.merge(:from => @date_to - @days), :complete => 'window.scrollTo(0,0)'},
- {:href => url_for(params.merge(:from => @date_to - @days)),
+ {:update => "content", :url => params.merge(:from => @date_to - @days - 1), :complete => 'window.scrollTo(0,0)'},
+ {:href => url_for(params.merge(:from => @date_to - @days - 1)),
:title => "#{l(:label_date_from)} #{format_date(@date_to - 2*@days)} #{l(:label_date_to).downcase} #{format_date(@date_to - @days - 1)}"}) %>
</div>
<div style="float:right;">
<%= link_to_remote((l(:label_next) + ' &#187;'),
- {:update => "content", :url => params.merge(:from => @date_to + @days), :complete => 'window.scrollTo(0,0)'},
- {:href => url_for(params.merge(:from => @date_to + @days)),
+ {:update => "content", :url => params.merge(:from => @date_to + @days - 1), :complete => 'window.scrollTo(0,0)'},
+ {:href => url_for(params.merge(:from => @date_to + @days - 1)),
: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 %>
</div>
&nbsp;