summaryrefslogtreecommitdiff
path: root/app/helpers/system_note_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/system_note_helper.rb')
-rw-r--r--app/helpers/system_note_helper.rb28
1 files changed, 28 insertions, 0 deletions
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