Commit d63746ab authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Fixes activity date param.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2001 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 7619c286
...@@ -221,7 +221,7 @@ class ProjectsController < ApplicationController ...@@ -221,7 +221,7 @@ class ProjectsController < ApplicationController
@days = Setting.activity_days_default.to_i @days = Setting.activity_days_default.to_i
if params[:from] if params[:from]
begin; @date_to = params[:from].to_date; rescue; end begin; @date_to = params[:from].to_date + 1; rescue; end
end end
@date_to ||= Date.today + 1 @date_to ||= Date.today + 1
......
...@@ -22,14 +22,14 @@ ...@@ -22,14 +22,14 @@
<div style="float:left;"> <div style="float:left;">
<%= link_to_remote(('&#171; ' + l(:label_previous)), <%= link_to_remote(('&#171; ' + l(:label_previous)),
{:update => "content", :url => params.merge(:from => @date_to - @days), :complete => 'window.scrollTo(0,0)'}, {:update => "content", :url => params.merge(:from => @date_to - @days - 1), :complete => 'window.scrollTo(0,0)'},
{:href => url_for(params.merge(:from => @date_to - @days)), {: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)}"}) %> :title => "#{l(:label_date_from)} #{format_date(@date_to - 2*@days)} #{l(:label_date_to).downcase} #{format_date(@date_to - @days - 1)}"}) %>
</div> </div>
<div style="float:right;"> <div style="float:right;">
<%= link_to_remote((l(:label_next) + ' &#187;'), <%= link_to_remote((l(:label_next) + ' &#187;'),
{:update => "content", :url => params.merge(:from => @date_to + @days), :complete => 'window.scrollTo(0,0)'}, {:update => "content", :url => params.merge(:from => @date_to + @days - 1), :complete => 'window.scrollTo(0,0)'},
{:href => url_for(params.merge(:from => @date_to + @days)), {: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 %> :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> </div>
&nbsp; &nbsp;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment