Include 'issue'/'merge request' in link

This commit is contained in:
Douwe Maan 2016-02-20 11:53:15 -08:00
parent 0e9775816a
commit 57d16552ff
2 changed files with 5 additions and 10 deletions

View File

@ -7,14 +7,9 @@ module TodosHelper
current_user.todos.done.count
end
def todo_action_name(todo)
target = todo.target_type.titleize.downcase
[todo.action_name, target].join(" ")
end
def todo_target_link_html(todo)
link_to "##{todo.target_iid}", todo_target_path(todo)
def todo_target_link(todo)
target = todo.target_type.titleize.downcase
link_to "#{target} #{todo.target.to_reference}", todo_target_path(todo)
end
def todo_target_path(todo)

View File

@ -6,8 +6,8 @@
%span.author_name
= link_to_author todo
%span.todo_label
= todo_action_name(todo)
= todo_target_link_html(todo)
= todo.action_name
= todo_target_link(todo)
· #{time_ago_with_tooltip(todo.created_at)}