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

75 lines
2.8 KiB
Text
Raw Normal View History

2015-09-11 14:41:01 +05:30
- page_title "Notifications"
2015-09-25 12:07:36 +05:30
- header_title page_title, profile_notifications_path
.prepend-top-default
2015-04-26 12:48:37 +05:30
= form_for @user, url: profile_notifications_path, method: :put, html: { class: 'update-notifications form-horizontal global-notifications-form' } do |f|
-if @user.errors.any?
%div.alert.alert-danger
%ul
- @user.errors.full_messages.each do |msg|
%li= msg
2014-09-02 18:07:02 +05:30
= hidden_field_tag :notification_type, 'global'
2015-04-26 12:48:37 +05:30
.form-group
= f.label :notification_email, class: "control-label"
.col-sm-10
= f.select :notification_email, @user.all_emails, { include_blank: false }, class: "form-control"
.form-group
= f.label :notification_level, class: 'control-label'
.col-sm-10
.radio
= f.label :notification_level, value: Notification::N_DISABLED do
= f.radio_button :notification_level, Notification::N_DISABLED
.level-title
Disabled
%p You will not get any notifications via email
.radio
= f.label :notification_level, value: Notification::N_MENTION do
= f.radio_button :notification_level, Notification::N_MENTION
.level-title
2015-09-25 12:07:36 +05:30
On Mention
2015-04-26 12:48:37 +05:30
%p You will receive notifications only for comments in which you were @mentioned
.radio
= f.label :notification_level, value: Notification::N_PARTICIPATING do
= f.radio_button :notification_level, Notification::N_PARTICIPATING
.level-title
Participating
%p You will only receive notifications from related resources (e.g. from your commits or assigned issues)
.radio
= f.label :notification_level, value: Notification::N_WATCH do
= f.radio_button :notification_level, Notification::N_WATCH
.level-title
Watch
2015-09-25 12:07:36 +05:30
%p You will receive notifications for any activity
2015-04-26 12:48:37 +05:30
2015-12-23 02:04:40 +05:30
.gray-content-block
2015-04-26 12:48:37 +05:30
= f.submit 'Save changes', class: "btn btn-create"
2014-09-02 18:07:02 +05:30
2015-12-23 02:04:40 +05:30
.row.all-notifications.prepend-top-default
2014-09-02 18:07:02 +05:30
.col-md-6
2015-04-26 12:48:37 +05:30
%p
You can also specify notification level per group or per project.
%br
By default, all projects and groups will use the notification level set above.
2014-09-02 18:07:02 +05:30
%h4 Groups:
%ul.bordered-list
2015-04-26 12:48:37 +05:30
- @group_members.each do |group_member|
- notification = Notification.new(group_member)
= render 'settings', type: 'group', membership: group_member, notification: notification
2014-09-02 18:07:02 +05:30
.col-md-6
2015-04-26 12:48:37 +05:30
%p
To specify the notification level per project of a group you belong to,
%br
you need to be a member of the project itself, not only its group.
2014-09-02 18:07:02 +05:30
%h4 Projects:
%ul.bordered-list
2015-04-26 12:48:37 +05:30
- @project_members.each do |project_member|
- notification = Notification.new(project_member)
= render 'settings', type: 'project', membership: project_member, notification: notification