##// END OF EJS Templates
remove trailing white-spaces and an empty line from activities controller source....
Toshi MARUYAMA -
r5715:5d4e4f241c61
parent child
Show More
@@ -5,7 +5,7 class ActivitiesController < ApplicationController
5 5
6 6 def index
7 7 @days = Setting.activity_days_default.to_i
8
8
9 9 if params[:from]
10 10 begin; @date_to = params[:from].to_date + 1; rescue; end
11 11 end
@@ -14,18 +14,18 class ActivitiesController < ApplicationController
14 14 @date_from = @date_to - @days
15 15 @with_subprojects = params[:with_subprojects].nil? ? Setting.display_subprojects_issues? : (params[:with_subprojects] == '1')
16 16 @author = (params[:user_id].blank? ? nil : User.active.find(params[:user_id]))
17
18 @activity = Redmine::Activity::Fetcher.new(User.current, :project => @project,
17
18 @activity = Redmine::Activity::Fetcher.new(User.current, :project => @project,
19 19 :with_subprojects => @with_subprojects,
20 20 :author => @author)
21 21 @activity.scope_select {|t| !params["show_#{t}"].nil?}
22 22 @activity.scope = (@author.nil? ? :default : :all) if @activity.scope.empty?
23 23
24 24 events = @activity.events(@date_from, @date_to)
25
25
26 26 if events.empty? || stale?(:etag => [@activity.scope, @date_to, @date_from, @with_subprojects, @author, events.first, User.current, current_language])
27 27 respond_to do |format|
28 format.html {
28 format.html {
29 29 @events_by_day = events.group_by(&:event_date)
30 30 render :layout => false if request.xhr?
31 31 }
@@ -40,7 +40,7 class ActivitiesController < ApplicationController
40 40 }
41 41 end
42 42 end
43
43
44 44 rescue ActiveRecord::RecordNotFound
45 45 render_404
46 46 end
@@ -55,5 +55,4 class ActivitiesController < ApplicationController
55 55 rescue ActiveRecord::RecordNotFound
56 56 render_404
57 57 end
58
59 58 end
General Comments 0
You need to be logged in to leave comments. Login now