]> source.dussan.org Git - redmine.git/commitdiff
Fixes activity date param.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 9 Nov 2008 17:53:30 +0000 (17:53 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 9 Nov 2008 17:53:30 +0000 (17:53 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2001 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/projects_controller.rb
app/views/projects/activity.rhtml

index fc33336a06798835e6bcf45feaf672353d6a1691..a7efa469519505c4c97d413b346d1698338780c8 100644 (file)
@@ -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
index 01f7a3e59ed5a28b79b364400946c1023375bde7..5157dda7af645004997bfa76e7454d59b025f211 100644 (file)
 
 <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;