2017-03-31 15:51:49 +00:00
|
|
|
module SystemNoteHelper
|
|
|
|
def icon_for_system_note(note)
|
|
|
|
|
|
|
|
icon_name =
|
|
|
|
case note.system_note_metadata.action
|
|
|
|
when 'commit'
|
|
|
|
'icon_commit'
|
|
|
|
when 'merge'
|
|
|
|
'icon_merge'
|
|
|
|
when 'merged'
|
|
|
|
'icon_merged'
|
|
|
|
when 'opened'
|
2017-04-06 17:25:22 +00:00
|
|
|
'icon_status_open'
|
2017-03-31 15:51:49 +00:00
|
|
|
when 'closed'
|
2017-04-06 17:25:22 +00:00
|
|
|
'icon_status_closed'
|
2017-03-31 15:51:49 +00:00
|
|
|
when 'time_tracking'
|
|
|
|
'icon_timer'
|
|
|
|
when 'assignee'
|
|
|
|
'icon_user'
|
|
|
|
when 'title'
|
|
|
|
'icon_pencil'
|
2017-04-06 17:25:22 +00:00
|
|
|
when 'task'
|
|
|
|
'icon_check_square_o'
|
|
|
|
when 'label'
|
|
|
|
'icon_tags'
|
|
|
|
when 'cross_reference'
|
|
|
|
'icon_random'
|
|
|
|
when 'branch'
|
|
|
|
'icon_code_fork'
|
|
|
|
when 'confidential'
|
|
|
|
'icon_eye_slash'
|
|
|
|
when 'visible'
|
|
|
|
'icon_eye'
|
|
|
|
when 'milestone'
|
|
|
|
'icon_clock_o'
|
2017-04-06 17:31:34 +00:00
|
|
|
when 'discussion'
|
|
|
|
'icon_comment_o'
|
2017-04-06 17:25:22 +00:00
|
|
|
when 'moved'
|
|
|
|
'icon_arrow-circle-o-right'
|
2017-03-31 15:51:49 +00:00
|
|
|
else
|
2017-04-06 17:25:22 +00:00
|
|
|
'icon_diamond'
|
2017-03-31 15:51:49 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
custom_icon(icon_name)
|
|
|
|
end
|
|
|
|
end
|