From d63746ab3e4143b7fc957466f699571155b22138 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 9 Nov 2008 17:53:30 +0000 Subject: [PATCH] Fixes activity date param. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2001 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/projects_controller.rb | 2 +- app/views/projects/activity.rhtml | 8 ++++---- 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 @@
<%= link_to_remote(('« ' + 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)}"}) %>
<%= link_to_remote((l(:label_next) + ' »'), - {: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 %>
  -- 2.39.5