Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-02-20 23:01:50 +0300
committerDouwe Maan <douwe@selenight.nl>2016-02-20 23:01:55 +0300
commit42cbcb23478f7b07c0c49e0020a8d3c834322e87 (patch)
tree58abbccf9dc9d40c147658ea293c6f3aed4a82e7 /app/helpers/todos_helper.rb
parentd53ae7f14d7c24ee590ba57632d267ec01706aa4 (diff)
"X assigned you Y" instead of "X assigned Y"
Diffstat (limited to 'app/helpers/todos_helper.rb')
-rw-r--r--app/helpers/todos_helper.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb
index 9bcfbd2da35..4b745a5b969 100644
--- a/app/helpers/todos_helper.rb
+++ b/app/helpers/todos_helper.rb
@@ -7,6 +7,13 @@ module TodosHelper
current_user.todos.done.count
end
+ def todo_action_name(todo)
+ case todo.action
+ when Todo::ASSIGNED then 'assigned you'
+ when Todo::MENTIONED then 'mentioned you on'
+ end
+ end
+
def todo_target_link(todo)
target = todo.target_type.titleize.downcase
link_to "#{target} #{todo.target.to_reference}", todo_target_path(todo)