diff options
author | Go MAEDA <maeda@farend.jp> | 2021-02-21 01:45:16 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2021-02-21 01:45:16 +0000 |
commit | a8072b0d0f201754cfc6f0867b642fdb43af6054 (patch) | |
tree | 017985ca1118605da3c0fb51897bd9bea7f2596a /app/helpers/activities_helper.rb | |
parent | f8d96bb3598f4d3ffcdb0c4b8325e80ad9541128 (diff) | |
download | redmine-a8072b0d0f201754cfc6f0867b642fdb43af6054.tar.gz redmine-a8072b0d0f201754cfc6f0867b642fdb43af6054.zip |
Add an interface to filter activities by user (#33602).
Patch by Mizuki ISHIKAWA.
git-svn-id: http://svn.redmine.org/redmine/trunk@20752 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/activities_helper.rb')
-rw-r--r-- | app/helpers/activities_helper.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/helpers/activities_helper.rb b/app/helpers/activities_helper.rb index 49074b561..8f3e92362 100644 --- a/app/helpers/activities_helper.rb +++ b/app/helpers/activities_helper.rb @@ -30,4 +30,11 @@ module ActivitiesHelper end sorted_events end + + def activity_authors_options_for_select(project, selected) + options = [] + options += [["<< #{l(:label_me)} >>", User.current.id]] if User.current.logged? + options += Query.new(project: project).users.select{|user| user.active?}.map{|user| [user.name, user.id]} + options_for_select(options, selected) + end end |