BigW Consortium Gitlab

_button.html.haml 1.66 KB
Newer Older
1
- left_align = local_assigns[:left_align]
2 3
- if notification_setting
  .dropdown.notification-dropdown.pull-right
4
    = form_for notification_setting, remote: true, html: { class: "inline notification-form" } do |f|
5 6 7
      = hidden_setting_source_input(notification_setting)
      = f.hidden_field :level, class: "notification_setting_level"
      .js-notification-toggle-btns
8
        %div{ class: ("btn-group" if notification_setting.custom?) }
9
          - if notification_setting.custom?
10 11 12
            %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)
13
            %button.btn.dropdown-toggle{ data: { toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting) } }
14 15
              %span.caret
              .sr-only Toggle dropdown
16 17 18 19 20 21
          - else
            %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")

22
          = render "shared/notifications/notification_dropdown", notification_setting: notification_setting, left_align: left_align
23 24 25

          = content_for :scripts_body do
            = render "shared/notifications/custom_notifications", notification_setting: notification_setting