Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-06-10 00:24:54 +0300
committerFatih Acet <acetfatih@gmail.com>2017-07-21 22:35:24 +0300
commit76c3d2d434d3c550c3de912abc0a5b1dc1455368 (patch)
treecaf45606608993ccd660c8cab45ef387fbf9756e /app/helpers/system_note_helper.rb
parentcb2287df0ad9396d1f075bde1c4f6de481d908e6 (diff)
Add full JSON endpoints for issue notes and discussions
Diffstat (limited to 'app/helpers/system_note_helper.rb')
-rw-r--r--app/helpers/system_note_helper.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/helpers/system_note_helper.rb b/app/helpers/system_note_helper.rb
index 209bd56b78a..69366825124 100644
--- a/app/helpers/system_note_helper.rb
+++ b/app/helpers/system_note_helper.rb
@@ -21,8 +21,14 @@ module SystemNoteHelper
'outdated' => 'icon_edit'
}.freeze
+ def system_note_icon_name(note)
+ ICON_NAMES_BY_ACTION[note.system_note_metadata&.action]
+ end
+
def icon_for_system_note(note)
- icon_name = ICON_NAMES_BY_ACTION[note.system_note_metadata&.action]
+ icon_name = system_note_icon_name(note)
custom_icon(icon_name) if icon_name
end
+
+ extend self
end