Merge branch 'icons-profile-icons' into 'master'
Updated Profile Events Helper to use SVG Sprite Icons See merge request gitlab-org/gitlab-ce!14577
This commit is contained in:
commit
70b64c8dd5
1 changed files with 11 additions and 9 deletions
|
@ -1,13 +1,15 @@
|
|||
module EventsHelper
|
||||
ICON_NAMES_BY_EVENT_TYPE = {
|
||||
'pushed to' => 'icon_commit',
|
||||
'pushed new' => 'icon_commit',
|
||||
'created' => 'icon_status_open',
|
||||
'opened' => 'icon_status_open',
|
||||
'closed' => 'icon_status_closed',
|
||||
'accepted' => 'icon_code_fork',
|
||||
'commented on' => 'icon_comment_o',
|
||||
'deleted' => 'icon_trash_o'
|
||||
'pushed to' => 'commit',
|
||||
'pushed new' => 'commit',
|
||||
'created' => 'status_open',
|
||||
'opened' => 'status_open',
|
||||
'closed' => 'status_closed',
|
||||
'accepted' => 'fork',
|
||||
'commented on' => 'comment',
|
||||
'deleted' => 'remove',
|
||||
'imported' => 'import',
|
||||
'joined' => 'users'
|
||||
}.freeze
|
||||
|
||||
def link_to_author(event, self_added: false)
|
||||
|
@ -197,7 +199,7 @@ module EventsHelper
|
|||
|
||||
def icon_for_event(note)
|
||||
icon_name = ICON_NAMES_BY_EVENT_TYPE[note]
|
||||
custom_icon(icon_name) if icon_name
|
||||
sprite_icon(icon_name) if icon_name
|
||||
end
|
||||
|
||||
def icon_for_profile_event(event)
|
||||
|
|
Loading…
Reference in a new issue