Commit e3a2a390 authored by Tom Quirk's avatar Tom Quirk

Use sprites for comment icons on Commits

Use `sprite_icon` in place of `icon` for comment
icons on Commits: all 3 uses are updated.

Also, add tooltip for comment counter on Commits
parent 7df008a5
......@@ -55,7 +55,7 @@ module NotesHelper
type: 'submit', name: 'button',
data: diff_view_line_data(line_code, position, line_type),
title: 'Add a comment to this line' do
icon('comment-o')
sprite_icon('comment', size: 12)
end
end
......
......@@ -22,8 +22,8 @@
.header-action-buttons
- if defined?(@notes_count) && @notes_count > 0
%span.btn.disabled.btn-grouped.d-none.d-sm-block.append-right-10
= icon('comment')
%span.btn.disabled.btn-grouped.d-none.d-sm-block.append-right-10.has-tooltip{ title: n_("%d comment on this commit", "%d comments on this commit", @notes_count) % @notes_count }
= sprite_icon('comment')
= @notes_count
= link_to project_tree_path(@project, @commit), class: "btn btn-default append-right-10 d-none d-sm-none d-md-inline" do
#{ _('Browse files') }
......
......@@ -14,7 +14,7 @@
.file-actions.d-none.d-sm-block
- if blob&.readable_text?
= link_to '#', class: 'js-toggle-diff-comments btn active has-tooltip', title: _("Toggle comments for this file"), disabled: @diff_notes_disabled do
= icon('comment')
= sprite_icon('comment', size: 16)
\
- if editable_diff?(diff_file)
- link_opts = @merge_request.persisted? ? { from_merge_request_iid: @merge_request.iid } : {}
......
---
title: Use sprites for comment icons on Commits
merge_request: 31696
author:
type: changed
......@@ -96,6 +96,11 @@ msgid_plural "%d comments"
msgstr[0] ""
msgstr[1] ""
msgid "%d comment on this commit"
msgid_plural "%d comments on this commit"
msgstr[0] ""
msgstr[1] ""
msgid "%d commit"
msgid_plural "%d commits"
msgstr[0] ""
......
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