diff options
Diffstat (limited to 'app/helpers/system_note_helper.rb')
-rw-r--r-- | app/helpers/system_note_helper.rb | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/app/helpers/system_note_helper.rb b/app/helpers/system_note_helper.rb index efe661a646a..1ea60e39386 100644 --- a/app/helpers/system_note_helper.rb +++ b/app/helpers/system_note_helper.rb @@ -1,12 +1,9 @@ module SystemNoteHelper ICON_NAMES_BY_ACTION = { 'commit' => 'icon_commit', - 'pushed to' => 'icon_commit', - 'pushed new' => 'icon_commit', 'merge' => 'icon_merge', 'merged' => 'icon_merged', 'opened' => 'icon_status_open', - 'created' => 'icon_status_open', 'closed' => 'icon_status_closed', 'time_tracking' => 'icon_stopwatch', 'assignee' => 'icon_user', @@ -15,30 +12,15 @@ module SystemNoteHelper 'label' => 'icon_tags', 'cross_reference' => 'icon_random', 'branch' => 'icon_code_fork', - 'accepted' => 'icon_code_fork', 'confidential' => 'icon_eye_slash', 'visible' => 'icon_eye', 'milestone' => 'icon_clock_o', 'discussion' => 'icon_comment_o', - 'commented on' => 'icon_comment_o', - 'moved' => 'icon_arrow_circle_o_right', - 'deleted' => 'icon_trash_o' + 'moved' => 'icon_arrow_circle_o_right' }.freeze def icon_for_system_note(note) - icon_name = ICON_NAMES_BY_ACTION[note] + icon_name = ICON_NAMES_BY_ACTION[note.system_note_metadata&.action] 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 |