gitlab-org--gitlab-foss/app/views/profiles/notifications/show.html.haml

51 lines
1.8 KiB
Text
Raw Normal View History

2015-04-30 13:06:18 -04:00
- page_title "Notifications"
%div
- if @user.errors.any?
%div.alert.alert-danger
%ul
- @user.errors.full_messages.each do |msg|
%li= msg
= hidden_field_tag :notification_type, 'global'
.row
.col-lg-3.profile-settings-sidebar
%h4
= 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-9
%h5
Global notification settings
2013-03-27 13:04:29 -04:00
= form_for @user, url: profile_notifications_path, method: :put, html: { class: 'update-notifications prepend-top-default' } do |f|
.form-group
= f.label :notification_email, class: "label-light"
= f.select :notification_email, @user.all_emails, { include_blank: false }, class: "select2"
= label_tag :global_notification_level, "Global notification level", class: "label-light"
%br
.clearfix
.form-group.pull-left
2016-06-17 11:38:49 -04:00
= render 'shared/notifications/button', notification_setting: @global_notification_setting, left_align: true
.clearfix
%hr
%h5
Groups (#{@group_notifications.count})
%div
%ul.bordered-list
- @group_notifications.each do |setting|
= render 'group_settings', setting: setting, group: setting.source
%h5
Projects (#{@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