Module: NotificationsHelper

Defined in:
app/helpers/notifications_helper.rb

Instance Method Summary collapse

Instance Method Details

#background_for_notification(notification) ⇒ Object



2
3
4
# File 'app/helpers/notifications_helper.rb', line 2

def background_for_notification(notification)
  notification.read? ? '' : 'bg-light'
end

#notification_preview_item(icon, name, url, **translation_params) ⇒ Object



6
7
8
# File 'app/helpers/notifications_helper.rb', line 6

def notification_preview_item(icon, name, url, **translation_params)
  menu_item icon, name, url, 'mu-notification-preview', translation_params
end

#notification_text_preview_item(icon, text, url) ⇒ Object



10
11
12
# File 'app/helpers/notifications_helper.rb', line 10

def notification_text_preview_item(icon, text, url)
  menu_text_item(icon, text, url, 'mu-notification-preview')
end