gitlab-org--gitlab-foss/app/views/profiles/notifications/show.html.haml
Wei-Meng Lee 1a402d888c Send notifications to group-specific email address
- Select notification email by walking up group/subgroup path
- Add settings UI to set group email notification address
- Add tests
2019-05-31 20:49:27 +08:00

53 lines
2.1 KiB
Text

- page_title _('Notifications')
- @content_class = "limit-container-width" unless fluid_layout
%div
- if @user.errors.any?
.alert.alert-danger
%ul
- @user.errors.full_messages.each do |msg|
%li= msg
= hidden_field_tag :notification_type, 'global'
.row.prepend-top-default
.col-lg-4.profile-settings-sidebar
%h4.prepend-top-0
= page_title
%p
= _('You can specify notification level per group or per project.')
%p
= _('By default, all projects and groups will use the global notifications setting.')
.col-lg-8
%h5.prepend-top-0
= _('Global notification settings')
= form_for @user, url: profile_notifications_path, method: :put, html: { class: 'update-notifications prepend-top-default' } do |f|
= render_if_exists 'profiles/notifications/email_settings', form: f
= label_tag :global_notification_level, "Global notification level", class: "label-bold"
%br
.clearfix
.form-group.float-left.global-notification-setting
= render 'shared/notifications/button', notification_setting: @global_notification_setting
.clearfix
= form_for @user, url: profile_notifications_path, method: :put do |f|
%label{ for: 'user_notified_of_own_activity' }
= f.check_box :notified_of_own_activity
%span= _('Receive notifications about your own activity')
%hr
%h5
= _('Groups (%{count})') % { count: @group_notifications.count }
%div
- @group_notifications.each do |setting|
= render 'group_settings', setting: setting, group: setting.source
%h5
= _('Projects (%{count})') % { count: @project_notifications.count }
%p.account-well
= _('To specify the notification level per project of a group you belong to, you need to visit project page and change notification level there.')
.append-bottom-default
%ul.bordered-list
- @project_notifications.each do |setting|
= render 'project_settings', setting: setting, project: setting.source