From 32e4a0f3513c846da376f70706d8d0ea60ba8b6e Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Gray Date: Fri, 31 Mar 2017 10:51:49 -0500 Subject: Add system notes icon helper; add icons --- app/helpers/system_note_helper.rb | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 app/helpers/system_note_helper.rb (limited to 'app/helpers') diff --git a/app/helpers/system_note_helper.rb b/app/helpers/system_note_helper.rb new file mode 100644 index 00000000000..e4dcf5343bc --- /dev/null +++ b/app/helpers/system_note_helper.rb @@ -0,0 +1,28 @@ +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' + 'icon_opened' + when 'closed' + 'icon_closed' + when 'time_tracking' + 'icon_timer' + when 'assignee' + 'icon_user' + when 'title' + 'icon_pencil' + else + 'icon_status_canceled' + end + + custom_icon(icon_name) + end +end -- cgit v1.2.1