debian-mirror-gitlab/app/views/profiles/notifications/show.html.haml

62 lines
2.7 KiB
Text
Raw Normal View History

2019-09-04 21:01:54 +05:30
- page_title _('Notifications')
2017-09-10 17:25:29 +05:30
- @content_class = "limit-container-width" unless fluid_layout
2015-09-25 12:07:36 +05:30
2016-06-02 11:05:42 +05:30
%div
- if @user.errors.any?
2021-02-22 17:27:13 +05:30
.gl-alert.gl-alert-danger.gl-my-5
2021-09-04 01:27:46 +05:30
.gl-alert-container
%button.js-close.btn.gl-dismiss-btn.btn-default.btn-sm.gl-button.btn-default-tertiary.btn-icon{ 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-content
.gl-alert-body
%ul
- @user.errors.full_messages.each do |msg|
%li= msg
2015-04-26 12:48:37 +05:30
2014-09-02 18:07:02 +05:30
= hidden_field_tag :notification_type, 'global'
2020-07-28 23:09:34 +05:30
.row.gl-mt-3
2017-09-10 17:25:29 +05:30
.col-lg-4.profile-settings-sidebar
2020-06-23 00:09:42 +05:30
%h4.gl-mt-0
2016-06-02 11:05:42 +05:30
= page_title
%p
2019-09-04 21:01:54 +05:30
= _('You can specify notification level per group or per project.')
2016-06-02 11:05:42 +05:30
%p
2019-09-04 21:01:54 +05:30
= _('By default, all projects and groups will use the global notifications setting.')
2017-09-10 17:25:29 +05:30
.col-lg-8
2020-06-23 00:09:42 +05:30
%h5.gl-mt-0
2019-09-04 21:01:54 +05:30
= _('Global notification settings')
2014-09-02 18:07:02 +05:30
2020-07-28 23:09:34 +05:30
= form_for @user, url: profile_notifications_path, method: :put, html: { class: 'update-notifications gl-mt-3' } do |f|
2019-07-07 11:18:12 +05:30
= render_if_exists 'profiles/notifications/email_settings', form: f
2015-04-26 12:48:37 +05:30
2018-11-18 11:00:15 +05:30
= label_tag :global_notification_level, "Global notification level", class: "label-bold"
2016-06-22 15:30:34 +05:30
%br
.clearfix
2018-11-08 19:23:39 +05:30
.form-group.float-left.global-notification-setting
2021-04-17 20:07:23 +05:30
- 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-22 15:30:34 +05:30
.clearfix
2017-08-17 22:00:37 +05:30
= 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-09-04 21:01:54 +05:30
%span= _('Receive notifications about your own activity')
2017-08-17 22:00:37 +05:30
2016-06-02 11:05:42 +05:30
%hr
%h5
2020-11-24 15:15:51 +05:30
= _('Groups (%{count})') % { count: @user_groups.total_count }
2016-06-02 11:05:42 +05:30
%div
2019-09-04 21:01:54 +05:30
- @group_notifications.each do |setting|
= render 'group_settings', setting: setting, group: setting.source
2020-11-24 15:15:51 +05:30
= paginate @user_groups, theme: 'gitlab'
2016-06-02 11:05:42 +05:30
%h5
2020-03-13 15:44:24 +05:30
= _('Projects (%{count})') % { count: @project_notifications.size }
2016-06-02 11:05:42 +05:30
%p.account-well
2019-09-04 21:01:54 +05:30
= _('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-07-28 23:09:34 +05:30
.gl-mb-3
2016-06-02 11:05:42 +05:30
%ul.bordered-list
- @project_notifications.each do |setting|
= render 'project_settings', setting: setting, project: setting.source