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:
authorArun Kumar Mohan <arunmohandm@gmail.com>2019-06-27 08:56:08 +0300
committerArun Kumar Mohan <arunmohandm@gmail.com>2019-08-28 04:09:24 +0300
commit4ca32c2b55519aa2b7852c879ad700e8fa290f80 (patch)
treef1c44ff088bebbdf9e1ad355b11cf00aca45517e /app/helpers/todos_helper.rb
parent8308469fdd031a1f7baa6e95966dfc467eb5df51 (diff)
Add Issue and Merge Request titles to Todo items
Only displays the todo body if the todo has a note. This is to avoid redundant Issue or Merge Request titles displayed both in the Todo title and body.
Diffstat (limited to 'app/helpers/todos_helper.rb')
-rw-r--r--app/helpers/todos_helper.rb18
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)