Mercurial > hg > soundsoftware-site
comparison app/controllers/activities_controller.rb @ 1115:433d4f72a19b redmine-2.2
Update to Redmine SVN revision 11137 on 2.2-stable branch
author | Chris Cannam |
---|---|
date | Mon, 07 Jan 2013 12:01:42 +0000 |
parents | 0c939c159af4 |
children | bb32da3bea34 622f24f53b42 |
comparison
equal
deleted
inserted
replaced
929:5f33065ddc4b | 1115:433d4f72a19b |
---|---|
1 # Redmine - project management software | 1 # Redmine - project management software |
2 # Copyright (C) 2006-2011 Jean-Philippe Lang | 2 # Copyright (C) 2006-2012 Jean-Philippe Lang |
3 # | 3 # |
4 # This program is free software; you can redistribute it and/or | 4 # This program is free software; you can redistribute it and/or |
5 # modify it under the terms of the GNU General Public License | 5 # modify it under the terms of the GNU General Public License |
6 # as published by the Free Software Foundation; either version 2 | 6 # as published by the Free Software Foundation; either version 2 |
7 # of the License, or (at your option) any later version. | 7 # of the License, or (at your option) any later version. |
38 @activity.scope_select {|t| !params["show_#{t}"].nil?} | 38 @activity.scope_select {|t| !params["show_#{t}"].nil?} |
39 @activity.scope = (@author.nil? ? :default : :all) if @activity.scope.empty? | 39 @activity.scope = (@author.nil? ? :default : :all) if @activity.scope.empty? |
40 | 40 |
41 events = @activity.events(@date_from, @date_to) | 41 events = @activity.events(@date_from, @date_to) |
42 | 42 |
43 if events.empty? || stale?(:etag => [@activity.scope, @date_to, @date_from, @with_subprojects, @author, events.first, User.current, current_language]) | 43 if events.empty? || stale?(:etag => [@activity.scope, @date_to, @date_from, @with_subprojects, @author, events.first, events.size, User.current, current_language]) |
44 respond_to do |format| | 44 respond_to do |format| |
45 format.html { | 45 format.html { |
46 @events_by_day = events.group_by(&:event_date) | 46 @events_by_day = events.group_by {|event| User.current.time_to_date(event.event_datetime)} |
47 render :layout => false if request.xhr? | 47 render :layout => false if request.xhr? |
48 } | 48 } |
49 format.atom { | 49 format.atom { |
50 title = l(:label_activity) | 50 title = l(:label_activity) |
51 if @author | 51 if @author |