diff options
author | Stan Hu <stanhu@gmail.com> | 2019-08-28 05:40:19 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-08-28 05:40:19 +0000 |
commit | 6262a91e365c658dc7d4ea286cd0e7201249bfa4 (patch) | |
tree | d0053359f2f102140bea2a3e91ed0c9b77fe0816 /app/helpers | |
parent | 2ad1621c7f7bb7b749f2f4f8d89d84a0f2fbc9f7 (diff) | |
parent | 4ca32c2b55519aa2b7852c879ad700e8fa290f80 (diff) | |
download | gitlab-ce-6262a91e365c658dc7d4ea286cd0e7201249bfa4.tar.gz |
Merge branch 'todos/include-issue-mr-titles' into 'master'
Add Issue and Merge Request titles to Todo items
Closes #63488
See merge request gitlab-org/gitlab-ce!30435
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/todos_helper.rb | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index 38142bc68cb..f5333bb332e 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -33,7 +33,23 @@ module TodosHelper todo.target_reference end - link_to text, todo_target_path(todo), class: 'has-tooltip', title: todo.target.title + link_to text, todo_target_path(todo) + end + + def todo_target_title(todo) + if todo.target + "\"#{todo.target.title}\"" + else + "" + end + end + + def todo_parent_path(todo) + if todo.parent.is_a?(Group) + link_to todo.parent.name, group_path(todo.parent) + else + link_to_project(todo.project) + end end def todo_target_type_name(todo) |