diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-05-11 10:47:44 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-05-12 09:55:25 -0500 |
commit | ff82acf34319fbcd3598dba7c025715874ba903c (patch) | |
tree | 3b65465b4eb455798914f933a54e893abc2b5ce9 /app/helpers/todos_helper.rb | |
parent | c266b5f57a09c13feef9c066856715f339076285 (diff) | |
download | gitlab-ce-ff82acf34319fbcd3598dba7c025715874ba903c.tar.gz |
Consistently use monospace font for commit SHAs and branch and tag names
Diffstat (limited to 'app/helpers/todos_helper.rb')
-rw-r--r-- | app/helpers/todos_helper.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index 0ff2d5ce4cd..19286fadb19 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -24,10 +24,13 @@ module TodosHelper end def todo_target_link(todo) - target = todo.target_type.titleize.downcase - link_to "#{target} #{todo.target_reference}", todo_target_path(todo), - class: 'has-tooltip', - title: todo.target.title + text = raw("#{todo.target_type.titleize.downcase} ") + + if todo.for_commit? + content_tag(:span, todo.target_reference, class: 'commit-sha') + else + todo.target_reference + end + link_to text, todo_target_path(todo), class: 'has-tooltip', title: todo.target.title end def todo_target_path(todo) |