Feature #1605 » activity-store-user-selection.diff
| app/controllers/activities_controller.rb (working copy) | ||
|---|---|---|
|
@activity = Redmine::Activity::Fetcher.new(User.current, :project => @project,
|
||
|
:with_subprojects => @with_subprojects,
|
||
|
:author => @author)
|
||
|
pref = User.current.pref
|
||
|
@activity.scope_select {|t| !params["show_#{t}"].nil?}
|
||
|
@activity.scope = (@author.nil? ? :default : :all) if @activity.scope.empty?
|
||
|
if @activity.scope.present?
|
||
|
pref['activity_scope'] = @activity.scope
|
||
|
pref.save
|
||
|
else
|
||
|
if @author.nil?
|
||
|
scope = pref['activity_scope'].to_a & @activity.event_types
|
||
|
@activity.scope = scope.present? ? scope : :default
|
||
|
else
|
||
|
@activity.scope = :all
|
||
|
end
|
||
|
end
|
||
|
events = @activity.events(@date_from, @date_to)
|
||