Commit 57d16552 authored by Douwe Maan's avatar Douwe Maan

Include 'issue'/'merge request' in link

parent 0e977581
...@@ -7,14 +7,9 @@ module TodosHelper ...@@ -7,14 +7,9 @@ module TodosHelper
current_user.todos.done.count current_user.todos.done.count
end end
def todo_action_name(todo) def todo_target_link(todo)
target = todo.target_type.titleize.downcase target = todo.target_type.titleize.downcase
link_to "#{target} #{todo.target.to_reference}", todo_target_path(todo)
[todo.action_name, target].join(" ")
end
def todo_target_link_html(todo)
link_to "##{todo.target_iid}", todo_target_path(todo)
end end
def todo_target_path(todo) def todo_target_path(todo)
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
%span.author_name %span.author_name
= link_to_author todo = link_to_author todo
%span.todo_label %span.todo_label
= todo_action_name(todo) = todo.action_name
= todo_target_link_html(todo) = todo_target_link(todo)
· #{time_ago_with_tooltip(todo.created_at)} · #{time_ago_with_tooltip(todo.created_at)}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment