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

56 lines
2.3 KiB
Text
Raw Normal View History

2023-01-13 00:05:48 +05:30
- add_page_specific_style 'page_bundles/notifications'
2019-09-04 21:01:54 +05:30
- page_title _('Notifications')
2015-09-25 12:07:36 +05:30
2016-06-02 11:05:42 +05:30
%div
- if @user.errors.any?
2022-07-16 23:28:13 +05:30
= render Pajamas::AlertComponent.new(variant: :danger) do |c|
= c.body do
2022-06-21 17:19:12 +05:30
%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'
2022-11-25 23:54:43 +05:30
.row.gl-mt-3.js-search-settings-section
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
2022-06-21 17:19:12 +05:30
= gitlab_ui_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
2022-10-11 01:57:18 +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
2022-06-21 17:19:12 +05:30
= gitlab_ui_form_for @user, url: profile_notifications_path, method: :put do |f|
.form-group
= f.gitlab_ui_checkbox_component :notified_of_own_activity, _('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