2019-05-28 17:01:48 +00:00
|
|
|
- page_title _('Notifications')
|
2017-06-22 14:47:50 +00:00
|
|
|
- @content_class = "limit-container-width" unless fluid_layout
|
2015-09-09 21:05:47 +00:00
|
|
|
|
2016-03-29 16:59:03 +00:00
|
|
|
%div
|
|
|
|
- if @user.errors.any?
|
2020-11-23 15:09:37 +00:00
|
|
|
.gl-alert.gl-alert-danger.gl-my-5
|
|
|
|
%button.js-close.gl-alert-dismiss{ type: 'button', 'aria-label' => _('Dismiss') }
|
|
|
|
= sprite_icon('close', css_class: 'gl-icon')
|
|
|
|
= sprite_icon('error', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title')
|
|
|
|
.gl-alert-body
|
|
|
|
%ul
|
|
|
|
- @user.errors.full_messages.each do |msg|
|
|
|
|
%li= msg
|
2015-02-06 23:23:58 +00:00
|
|
|
|
2014-02-17 16:06:24 +00:00
|
|
|
= hidden_field_tag :notification_type, 'global'
|
2020-06-26 06:09:03 +00:00
|
|
|
.row.gl-mt-3
|
2017-06-22 14:47:50 +00:00
|
|
|
.col-lg-4.profile-settings-sidebar
|
2020-05-21 18:08:27 +00:00
|
|
|
%h4.gl-mt-0
|
2016-02-29 16:01:11 +00:00
|
|
|
= page_title
|
|
|
|
%p
|
2019-05-28 17:01:48 +00:00
|
|
|
= _('You can specify notification level per group or per project.')
|
2016-02-29 16:01:11 +00:00
|
|
|
%p
|
2019-05-28 17:01:48 +00:00
|
|
|
= _('By default, all projects and groups will use the global notifications setting.')
|
2017-06-22 14:47:50 +00:00
|
|
|
.col-lg-8
|
2020-05-21 18:08:27 +00:00
|
|
|
%h5.gl-mt-0
|
2019-05-28 17:01:48 +00:00
|
|
|
= _('Global notification settings')
|
2013-03-27 17:04:29 +00:00
|
|
|
|
2020-06-26 06:09:03 +00:00
|
|
|
= form_for @user, url: profile_notifications_path, method: :put, html: { class: 'update-notifications gl-mt-3' } do |f|
|
2019-03-20 10:36:22 +00:00
|
|
|
= render_if_exists 'profiles/notifications/email_settings', form: f
|
2016-03-29 16:59:03 +00:00
|
|
|
|
2018-07-19 22:11:31 +00:00
|
|
|
= label_tag :global_notification_level, "Global notification level", class: "label-bold"
|
2016-06-17 15:26:32 +00:00
|
|
|
%br
|
|
|
|
.clearfix
|
2018-04-09 17:36:21 +00:00
|
|
|
.form-group.float-left.global-notification-setting
|
2021-03-01 09:11:01 +00:00
|
|
|
- if @global_notification_setting
|
|
|
|
.js-vue-notification-dropdown{ data: { dropdown_items: notification_dropdown_items(@global_notification_setting).to_json, notification_level: @global_notification_setting.level, help_page_path: help_page_path('user/profile/notifications'), show_label: 'true' } }
|
2016-06-14 18:36:36 +00:00
|
|
|
|
|
|
|
.clearfix
|
|
|
|
|
2017-03-17 03:18:57 +00:00
|
|
|
= 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
|
2019-05-28 17:01:48 +00:00
|
|
|
%span= _('Receive notifications about your own activity')
|
2017-03-17 03:18:57 +00:00
|
|
|
|
2016-02-29 16:01:11 +00:00
|
|
|
%hr
|
|
|
|
%h5
|
2020-08-28 15:10:21 +00:00
|
|
|
= _('Groups (%{count})') % { count: @user_groups.total_count }
|
2016-02-29 16:01:11 +00:00
|
|
|
%div
|
2019-02-15 17:56:13 +00:00
|
|
|
- @group_notifications.each do |setting|
|
|
|
|
= render 'group_settings', setting: setting, group: setting.source
|
2020-08-28 15:10:21 +00:00
|
|
|
= paginate @user_groups, theme: 'gitlab'
|
2016-02-29 16:01:11 +00:00
|
|
|
%h5
|
2020-01-15 21:08:48 +00:00
|
|
|
= _('Projects (%{count})') % { count: @project_notifications.size }
|
2016-02-29 16:01:11 +00:00
|
|
|
%p.account-well
|
2019-05-28 17:01:48 +00:00
|
|
|
= _('To specify the notification level per project of a group you belong to, you need to visit project page and change notification level there.')
|
2020-06-22 15:09:27 +00:00
|
|
|
.gl-mb-3
|
2016-02-29 16:01:11 +00:00
|
|
|
%ul.bordered-list
|
2016-03-28 16:17:42 +00:00
|
|
|
- @project_notifications.each do |setting|
|
2016-03-29 16:59:03 +00:00
|
|
|
= render 'project_settings', setting: setting, project: setting.source
|