diff options
Diffstat (limited to 'app/helpers/gitlab/notifications_helper.rb')
-rw-r--r-- | app/helpers/gitlab/notifications_helper.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/helpers/gitlab/notifications_helper.rb b/app/helpers/gitlab/notifications_helper.rb new file mode 100644 index 00000000000..b6324044ab1 --- /dev/null +++ b/app/helpers/gitlab/notifications_helper.rb @@ -0,0 +1,17 @@ +module Gitlab + module NotificationsHelper + include IconsHelper + + def notification_icon(notification) + if notification.disabled? + icon('volume-off', class: 'ns-mute') + elsif notification.participating? + icon('volume-down', class: 'ns-part') + elsif notification.watch? + icon('volume-up', class: 'ns-watch') + else + icon('circle-o', class: 'ns-default') + end + end + end +end |