Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/system_note_helper.rb')
-rw-r--r--app/helpers/system_note_helper.rb15
1 files changed, 14 insertions, 1 deletions
diff --git a/app/helpers/system_note_helper.rb b/app/helpers/system_note_helper.rb
index 91673ea5036..efe661a646a 100644
--- a/app/helpers/system_note_helper.rb
+++ b/app/helpers/system_note_helper.rb
@@ -1,7 +1,8 @@
module SystemNoteHelper
ICON_NAMES_BY_ACTION = {
'commit' => 'icon_commit',
- 'push' => 'icon_commit',
+ 'pushed to' => 'icon_commit',
+ 'pushed new' => 'icon_commit',
'merge' => 'icon_merge',
'merged' => 'icon_merged',
'opened' => 'icon_status_open',
@@ -28,4 +29,16 @@ module SystemNoteHelper
icon_name = ICON_NAMES_BY_ACTION[note]
custom_icon(icon_name) if icon_name
end
+
+ def icon_for_profile_event(event)
+ if current_path?('users#show')
+ content_tag :div, class: "system-note-image #{event.action_name}-icon" do
+ icon_for_system_note(event.action_name)
+ end
+ else
+ content_tag :div, class: 'system-note-image user-avatar' do
+ author_avatar(event, size: 32)
+ end
+ end
+ end
end