debian-mirror-gitlab/app/views/shared/notifications/_new_button.html.haml

35 lines
2.5 KiB
Text
Raw Normal View History

2019-10-12 21:52:04 +05:30
- btn_class = local_assigns.fetch(:btn_class, '')
- emails_disabled = local_assigns.fetch(:emails_disabled, false)
2019-02-15 15:39:39 +05:30
- if notification_setting
2019-10-12 21:52:04 +05:30
- if emails_disabled
- button_title = notification_description(:owner_disabled)
- btn_class << " disabled"
- else
- button_title = _("Notification setting - %{notification_title}") % { notification_title: notification_title(notification_setting.level) }
2020-07-28 23:09:34 +05:30
.js-notification-dropdown.notification-dropdown.home-panel-action-button.gl-mt-3.gl-mr-3.dropdown.inline
2019-02-15 15:39:39 +05:30
= form_for notification_setting, remote: true, html: { class: "inline notification-form no-label" } do |f|
= hidden_setting_source_input(notification_setting)
= hidden_field_tag "hide_label", true
= f.hidden_field :level, class: "notification_setting_level"
.js-notification-toggle-btns
%div{ class: ("btn-group" if notification_setting.custom?) }
- if notification_setting.custom?
2019-10-12 21:52:04 +05:30
%button.dropdown-new.btn.btn-default.has-tooltip.notifications-btn#notifications-button{ type: "button", title: button_title, class: "#{btn_class}", "aria-label" => button_title, data: { container: "body", placement: 'top', toggle: "modal", target: "#" + notifications_menu_identifier("modal", notification_setting), display: 'static' } }
2019-07-31 22:56:46 +05:30
= notification_setting_icon(notification_setting)
2019-02-15 15:39:39 +05:30
%span.js-notification-loading.fa.hidden
2019-03-02 22:35:43 +05:30
%button.btn.dropdown-toggle{ data: { toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting), flip: "false" }, class: "#{btn_class}" }
2020-03-13 15:44:24 +05:30
= sprite_icon("chevron-down", css_class: "icon mr-0")
2019-02-15 15:39:39 +05:30
.sr-only Toggle dropdown
- else
2019-10-12 21:52:04 +05:30
%button.dropdown-new.btn.btn-default.has-tooltip.notifications-btn#notifications-button{ type: "button", title: button_title, class: "#{btn_class}", "aria-label" => button_title, data: { container: "body", placement: 'top', toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting), flip: "false" } }
2019-07-31 22:56:46 +05:30
= notification_setting_icon(notification_setting)
2019-02-15 15:39:39 +05:30
%span.js-notification-loading.fa.hidden
2020-03-13 15:44:24 +05:30
= sprite_icon("chevron-down", css_class: "icon")
2019-02-15 15:39:39 +05:30
= render "shared/notifications/notification_dropdown", notification_setting: notification_setting
= content_for :scripts_body do
2019-12-26 22:10:19 +05:30
= render "shared/notifications/custom_notifications", notification_setting: notification_setting, hide_label: true