Commit 531d27e7 authored by Phil Hughes's avatar Phil Hughes

Fixed alignment of notification dropdown menu

parent 33c61bd4
- left_align = local_assigns[:left_align]
- if notification_setting
.dropdown.notification-dropdown.pull-right
= 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
%div{ class: ("btn-group" if notification_setting.custom?) }
- if notification_setting.custom?
%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")
......@@ -18,7 +19,7 @@
= notification_title(notification_setting.level)
= icon("caret-down")
= render "shared/notifications/notification_dropdown", notification_setting: notification_setting
= render "shared/notifications/notification_dropdown", notification_setting: notification_setting, left_align: left_align
= content_for :scripts_body do
= render "shared/notifications/custom_notifications", notification_setting: notification_setting
......@@ -29,7 +29,7 @@
%br
.clearfix
.form-group.pull-left
= render 'notifications/buttons/notifications', notification_setting: @global_notification_setting
= render 'notifications/buttons/notifications', notification_setting: @global_notification_setting, left_align: true
.clearfix
......
%ul.dropdown-menu.dropdown-menu-no-wrap.dropdown-menu-align-right.dropdown-menu-selectable.dropdown-menu-large{ role: "menu", class: notifications_menu_identifier("dropdown", notification_setting) }
- left_align = local_assigns[:left_align]
%ul.dropdown-menu.dropdown-menu-no-wrap.dropdown-menu-selectable.dropdown-menu-large{ role: "menu", class: [notifications_menu_identifier("dropdown", notification_setting), ("dropdown-menu-align-right" if left_align.nil?)] }
- NotificationSetting.levels.each_key do |level|
- next if level == "custom"
- next if level == "global" && notification_setting.source.nil?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment