gitlab-org--gitlab-foss/app/views/shared/notifications/_custom_notifications.html.haml

31 lines
2 KiB
Text
Raw Normal View History

.modal.fade{ tabindex: "-1", role: "dialog", id: notifications_menu_identifier("modal", notification_setting), "aria-labelledby": "custom-notifications-title" }
2016-06-13 15:51:35 -04:00
.modal-dialog
.modal-content
.modal-header
%h4#custom-notifications-title.modal-title
2017-06-07 16:13:44 -04:00
#{ _('Custom notification events') }
%button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') }
%span{ "aria-hidden": true } ×
2016-06-13 15:51:35 -04:00
.modal-body
.container-fluid
= form_for notification_setting, html: { class: "custom-notifications-form" } do |f|
= hidden_setting_source_input(notification_setting)
2016-06-13 15:51:35 -04:00
.row
.col-lg-4
2017-06-07 16:13:44 -04:00
%h4.prepend-top-0= _('Notification events')
%p
2017-06-07 16:13:44 -04:00
- notification_link = link_to _('notification emails'), help_page_path('workflow/notifications'), target: '_blank'
- paragraph = _('Custom notification levels are the same as participating levels. With custom notification levels you will also receive notifications for select events. To find out more, check out %{notification_link}.') % { notification_link: notification_link.html_safe }
#{ paragraph.html_safe }
.col-lg-8
- NotificationSetting::EMAIL_EVENTS.each_with_index do |event, index|
- field_id = "#{notifications_menu_identifier("modal", notification_setting)}_notification_setting[#{event}]"
2016-06-13 15:51:35 -04:00
.form-group
.form-check{ class: ("prepend-top-0" if index == 0) }
2018-05-31 15:20:46 -04:00
= check_box("notification_setting", event, id: field_id, class: "js-custom-notification-event form-check-input", checked: notification_setting.public_send(event))
%label.form-check-label{ for: field_id }
2016-06-13 15:51:35 -04:00
%strong
= notification_event_name(event)
2016-06-13 15:51:35 -04:00
= icon("spinner spin", class: "custom-notification-event-loading")