debian-mirror-gitlab/app/helpers/notifications_helper.rb

16 lines
387 B
Ruby
Raw Normal View History

2014-09-02 18:07:02 +05:30
module NotificationsHelper
2015-09-11 14:41:01 +05:30
include IconsHelper
2014-09-02 18:07:02 +05:30
def notification_icon(notification)
if notification.disabled?
2015-04-26 12:48:37 +05:30
icon('volume-off', class: 'ns-mute')
2014-09-02 18:07:02 +05:30
elsif notification.participating?
2015-04-26 12:48:37 +05:30
icon('volume-down', class: 'ns-part')
2014-09-02 18:07:02 +05:30
elsif notification.watch?
2015-04-26 12:48:37 +05:30
icon('volume-up', class: 'ns-watch')
2014-09-02 18:07:02 +05:30
else
2015-04-26 12:48:37 +05:30
icon('circle-o', class: 'ns-default')
2014-09-02 18:07:02 +05:30
end
end
end