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:
authorDarby <darbsies@gmail.com>2015-09-15 02:37:11 +0300
committerDarby <darbsies@gmail.com>2015-09-15 02:37:11 +0300
commit84508c40b7a132b775717d2aeef313d4e370a2b9 (patch)
treed8ce8d5e739abf5d9f7f605e2c2043640fe4ae9b /app/helpers/notifications_helper.rb
parenta81ce718c772672706da33848670149dd577ae79 (diff)
PAtrially working notification button
Diffstat (limited to 'app/helpers/notifications_helper.rb')
-rw-r--r--app/helpers/notifications_helper.rb31
1 files changed, 31 insertions, 0 deletions
diff --git a/app/helpers/notifications_helper.rb b/app/helpers/notifications_helper.rb
index 2f8e64c375f..db6fe3b29ed 100644
--- a/app/helpers/notifications_helper.rb
+++ b/app/helpers/notifications_helper.rb
@@ -12,4 +12,35 @@ module NotificationsHelper
icon('circle-o', class: 'ns-default')
end
end
+
+ def notification_list_item(notification_level)
+ case notification_level
+ when Notification::N_DISABLED
+ content_tag(:li) do
+ icon('microphone-slash') do
+ 'Disabled'
+ end
+ end
+ when Notification::N_PARTICIPATING
+ content_tag(:li) do
+ icon('volume-up') do
+ 'Participating'
+ end
+ end
+ when Notification::N_WATCH
+ content_tag(:li) do
+ icon('globe') do
+ 'Watch'
+ end
+ end
+ when Notification::N_MENTION
+ content_tag(:li) do
+ icon('at') do
+ 'Mention'
+ end
+ end
+ else
+ # do nothing
+ end
+ end
end