2016-06-14 14:36:36 -04:00
|
|
|
- if notification_setting
|
2016-12-18 15:07:06 -05:00
|
|
|
.js-notification-dropdown.notification-dropdown.project-action-button.dropdown.inline
|
2016-06-17 11:26:32 -04:00
|
|
|
= form_for notification_setting, remote: true, html: { class: "inline notification-form" } do |f|
|
2016-06-14 14:36:36 -04:00
|
|
|
= hidden_setting_source_input(notification_setting)
|
|
|
|
= f.hidden_field :level, class: "notification_setting_level"
|
|
|
|
.js-notification-toggle-btns
|
2016-06-17 09:28:40 -04:00
|
|
|
%div{ class: ("btn-group" if notification_setting.custom?) }
|
2016-06-16 23:17:20 -04:00
|
|
|
- if notification_setting.custom?
|
2017-06-06 11:05:13 -04:00
|
|
|
%button.dropdown-new.btn.btn-default.has-tooltip.notifications-btn#notifications-button{ type: "button", title: "Notification setting", "aria-label" => "Notification setting: #{notification_title(notification_setting.level)}", data: { container: "body", toggle: "modal", target: "#" + notifications_menu_identifier("modal", notification_setting) } }
|
2016-06-14 14:36:36 -04:00
|
|
|
= icon("bell", class: "js-notification-loading")
|
|
|
|
= notification_title(notification_setting.level)
|
2016-06-16 23:17:20 -04:00
|
|
|
%button.btn.dropdown-toggle{ data: { toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting) } }
|
2016-08-23 12:02:52 -04:00
|
|
|
= icon('caret-down')
|
2016-06-14 14:36:36 -04:00
|
|
|
.sr-only Toggle dropdown
|
2016-06-16 23:17:20 -04:00
|
|
|
- else
|
2017-06-06 11:05:13 -04:00
|
|
|
%button.dropdown-new.btn.btn-default.has-tooltip.notifications-btn#notifications-button{ type: "button", title: "Notification setting", "aria-label" => "Notification setting: #{notification_title(notification_setting.level)}", data: { container: "body", toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting) } }
|
2016-06-16 23:17:20 -04:00
|
|
|
= icon("bell", class: "js-notification-loading")
|
|
|
|
= notification_title(notification_setting.level)
|
|
|
|
= icon("caret-down")
|
|
|
|
|
2016-12-10 01:21:47 -05:00
|
|
|
= render "shared/notifications/notification_dropdown", notification_setting: notification_setting
|
2016-06-14 14:36:36 -04:00
|
|
|
|
|
|
|
= content_for :scripts_body do
|
|
|
|
= render "shared/notifications/custom_notifications", notification_setting: notification_setting
|