26 lines
1.7 KiB
Plaintext
26 lines
1.7 KiB
Plaintext
|
- if notification_setting
|
||
|
.dropdown.notification-dropdown.pull-right
|
||
|
- url = notification_setting.persisted? ? notification_setting_path(notification_setting) : notification_settings_path(notification_setting)
|
||
|
|
||
|
= form_for notification_setting, remote: true, html: { class: "inline", id: "notification-form" } do |f|
|
||
|
= hidden_setting_source_input(notification_setting)
|
||
|
= f.hidden_field :level, class: "notification_setting_level"
|
||
|
.js-notification-toggle-btns
|
||
|
.btn-group
|
||
|
- if notification_setting.level != "custom"
|
||
|
%button.dropdown-new.btn.btn-default.notifications-btn#notifications-button{ type: "button", data: { toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting) } }
|
||
|
= icon("bell", class: "js-notification-loading")
|
||
|
= notification_title(notification_setting.level)
|
||
|
= icon("caret-down")
|
||
|
- else
|
||
|
%button.dropdown-new.btn.btn-default.notifications-btn#notifications-button{ type: "button", data: { toggle: "modal", target: "#" + notifications_menu_identifier("modal", notification_setting) } }
|
||
|
= icon("bell", class: "js-notification-loading")
|
||
|
= notification_title(notification_setting.level)
|
||
|
%button.btn.btn-danger.dropdown-toggle{ data: { toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting) } }
|
||
|
%span.caret
|
||
|
.sr-only Toggle dropdown
|
||
|
= render "shared/notifications/notification_dropdown", notification_setting: notification_setting
|
||
|
|
||
|
= content_for :scripts_body do
|
||
|
= render "shared/notifications/custom_notifications", notification_setting: notification_setting
|