diff options
Diffstat (limited to 'app/helpers/notes_helper.rb')
-rw-r--r-- | app/helpers/notes_helper.rb | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb index 901052edec6..92ecb2abe4d 100644 --- a/app/helpers/notes_helper.rb +++ b/app/helpers/notes_helper.rb @@ -1,5 +1,5 @@ module NotesHelper - # Helps to distinguish e.g. commit notes in mr notes list + # Helps to distinguish e.g. commit notes in mr notes list def note_for_main_target?(note) (@noteable.class.name == note.noteable_type && !note.for_diff_line?) end @@ -11,7 +11,11 @@ module NotesHelper def link_to_commit_diff_line_note(note) if note.for_commit_diff_line? - link_to "#{note.diff_file_name}:L#{note.diff_new_line}", project_commit_path(@project, note.noteable, anchor: note.line_code) + link_to( + "#{note.diff_file_name}:L#{note.diff_new_line}", + namespace_project_commit_path(@project.namespace, @project, + note.noteable, anchor: note.line_code) + ) end end @@ -20,8 +24,10 @@ module NotesHelper ts = "#{time_ago_with_tooltip(note.created_at, 'bottom', 'note_created_ago')}" if note.updated_at != note.created_at ts << capture_haml do - haml_tag :small do - haml_concat " (Edited #{time_ago_with_tooltip(note.updated_at, 'bottom', 'note_edited_ago')})" + haml_tag :span do + haml_concat '·' + haml_concat icon('edit', title: 'edited') + haml_concat time_ago_with_tooltip(note.updated_at, 'bottom', 'note_edited_ago') end end end @@ -52,8 +58,11 @@ module NotesHelper discussion_id: discussion_id } - button_tag '', class: 'btn add-diff-note js-add-diff-note-button', - data: data, title: 'Add a comment to this line' + button_tag(class: 'btn add-diff-note js-add-diff-note-button', + data: data, + title: 'Add a comment to this line') do + icon('comment-o') + end end def link_to_reply_diff(note) @@ -69,7 +78,7 @@ module NotesHelper button_tag class: 'btn reply-btn js-discussion-reply-button', data: data, title: 'Add a reply' do - link_text = content_tag(:i, nil, class: 'fa fa-comment') + link_text = icon('comment') link_text << ' Reply' end end |