summaryrefslogtreecommitdiff
path: root/app/views/projects/buttons/_notifications.html.haml
blob: 3b97dc9328f34dada6f9a7fce74cf8d797de08f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
- if @notification_setting
  = form_for @notification_setting, url: namespace_project_notification_setting_path(@project.namespace.becomes(Namespace), @project), method: :patch, remote: true, html: { class: 'inline', id: 'notification-form' } do |f|
    = f.hidden_field :level
    .dropdown
      %button.btn.btn-default.notifications-btn#notifications-button{ data: { toggle: "dropdown" }, aria: { haspopup: "true", expanded: "false" } }
        = icon('bell')
        = notification_title(@notification_setting.level)
        = icon('caret-down')
      %ul.dropdown-menu.dropdown-menu-no-wrap.dropdown-menu-align-right.dropdown-menu-selectable.dropdown-menu-large{ role: "menu" }
        - NotificationSetting.levels.each do |level|
          = notification_list_item(level.first, @notification_setting)