diff options
Diffstat (limited to 'app/helpers/todos_helper.rb')
-rw-r--r-- | app/helpers/todos_helper.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index 9865f7dfbef..7b0e0df8998 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -16,6 +16,7 @@ module TodosHelper def todo_action_name(todo) case todo.action when Todo::ASSIGNED then todo.self_added? ? 'assigned' : 'assigned you' + when Todo::REVIEW_REQUESTED then 'requested a review of' when Todo::MENTIONED then "mentioned #{todo_action_subject(todo)} on" when Todo::BUILD_FAILED then 'The build failed for' when Todo::MARKED then 'added a todo for' @@ -26,6 +27,13 @@ module TodosHelper end end + def todo_self_addressing(todo) + case todo.action + when Todo::ASSIGNED then 'to yourself' + when Todo::REVIEW_REQUESTED then 'from yourself' + end + end + def todo_target_link(todo) text = raw(todo_target_type_name(todo) + ' ') + if todo.for_commit? @@ -141,6 +149,7 @@ module TodosHelper [ { id: '', text: 'Any Action' }, { id: Todo::ASSIGNED, text: 'Assigned' }, + { id: Todo::REVIEW_REQUESTED, text: 'Review requested' }, { id: Todo::MENTIONED, text: 'Mentioned' }, { id: Todo::MARKED, text: 'Added' }, { id: Todo::BUILD_FAILED, text: 'Pipelines' }, |