diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-03-05 13:44:08 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-03-05 13:44:08 +0000 |
commit | bbe8ea29e8d3e6de60b96c08d60de9447bcceca9 (patch) | |
tree | 759b4deb14fe8c0476e042f18168f912cf461377 /app/views/projects/activity.rhtml | |
parent | fbcdfee622729792ab58648228209bbd3c2142b6 (diff) | |
download | redmine-bbe8ea29e8d3e6de60b96c08d60de9447bcceca9.tar.gz redmine-bbe8ea29e8d3e6de60b96c08d60de9447bcceca9.zip |
Display the last 30 days on the activity view rather than the current month.
Number of days can be configured in the application settings.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1196 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/projects/activity.rhtml')
-rw-r--r-- | app/views/projects/activity.rhtml | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/app/views/projects/activity.rhtml b/app/views/projects/activity.rhtml index aca08fd6f..95c8d485f 100644 --- a/app/views/projects/activity.rhtml +++ b/app/views/projects/activity.rhtml @@ -1,8 +1,8 @@ -<h2><%= "#{month_name(@month)} #{@year}" %></h2> +<h2><%= l(:label_activity) %></h2> <div id="activity"> -<% @events_by_day.keys.sort {|x,y| y <=> x }.each do |day| %> -<h3><%= day_name(day.cwday) %> <%= day.day %></h3> +<% @events_by_day.keys.sort.reverse.each do |day| %> +<h3><%= format_activity_day(day) %></h3> <dl> <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%> <dt class="<%= e.class.name.downcase %>"><span class="time"><%= format_time(e.event_datetime, false) %></span> @@ -19,14 +19,14 @@ <%= content_tag('p', l(:label_no_data), :class => 'nodata') if @events_by_day.empty? %> <div style="float:left;"> -<% prev_params = params.clone.update :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1) %> -<%= link_to_remote ('« ' + (@month==1 ? "#{month_name(12)} #{@year-1}" : "#{month_name(@month-1)}")), - {:update => "content", :url => prev_params}, {:href => url_for(prev_params)} %> +<%= 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))}) %> </div> <div style="float:right;"> -<% next_params = params.clone.update :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1) %> -<%= link_to_remote ((@month==12 ? "#{month_name(1)} #{@year+1}" : "#{month_name(@month+1)}") + ' »'), - {:update => "content", :url => next_params}, {:href => url_for(next_params)} %> +<%= 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))}) unless @date_to >= Date.today %> </div> <p class="other-formats"> |