2013-07-31 10:05:22 -04:00
|
|
|
%h3.page-title
|
2015-02-23 13:40:06 -05:00
|
|
|
Notifications Settings
|
2013-07-31 10:39:57 -04:00
|
|
|
%p.light
|
2015-02-06 18:23:58 -05:00
|
|
|
These are your global notification settings.
|
2013-07-31 10:39:57 -04:00
|
|
|
%hr
|
2015-02-06 18:23:58 -05:00
|
|
|
|
|
|
|
= 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-02-17 11:06:24 -05:00
|
|
|
= hidden_field_tag :notification_type, 'global'
|
2013-03-27 13:04:29 -04:00
|
|
|
|
2015-02-06 18:23:58 -05:00
|
|
|
.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
|
|
|
|
Mention
|
|
|
|
%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
|
|
|
|
%p You will receive all notifications from projects in which you participate
|
|
|
|
|
|
|
|
.form-actions
|
2015-02-23 18:48:00 -05:00
|
|
|
= f.submit 'Save changes', class: "btn btn-create"
|
2013-04-04 15:11:51 -04:00
|
|
|
|
2014-02-17 11:06:24 -05:00
|
|
|
.clearfix
|
2013-07-31 10:05:22 -04:00
|
|
|
%hr
|
2014-02-17 11:06:24 -05:00
|
|
|
.row.all-notifications
|
|
|
|
.col-md-6
|
2014-10-14 06:02:05 -04:00
|
|
|
%p
|
2014-10-14 06:28:30 -04:00
|
|
|
You can also specify notification level per group or per project.
|
2014-10-14 06:02:05 -04:00
|
|
|
%br
|
2015-02-23 13:40:06 -05:00
|
|
|
By default, all projects and groups will use the notification level set above.
|
2014-02-17 11:06:24 -05:00
|
|
|
%h4 Groups:
|
|
|
|
%ul.bordered-list
|
2014-09-14 12:51:54 -04:00
|
|
|
- @group_members.each do |users_group|
|
2014-02-17 11:06:24 -05:00
|
|
|
- notification = Notification.new(users_group)
|
|
|
|
= render 'settings', type: 'group', membership: users_group, notification: notification
|
2013-06-21 16:17:58 -04:00
|
|
|
|
2014-02-17 11:06:24 -05:00
|
|
|
.col-md-6
|
2014-10-14 06:02:05 -04:00
|
|
|
%p
|
2015-02-23 13:40:06 -05:00
|
|
|
To specify the notification level per project of a group you belong to,
|
2014-10-14 06:02:05 -04:00
|
|
|
%br
|
2014-10-14 06:28:30 -04:00
|
|
|
you need to be a member of the project itself, not only its group.
|
2014-02-17 11:06:24 -05:00
|
|
|
%h4 Projects:
|
|
|
|
%ul.bordered-list
|
2014-09-15 03:57:02 -04:00
|
|
|
- @project_members.each do |project_member|
|
|
|
|
- notification = Notification.new(project_member)
|
|
|
|
= render 'settings', type: 'project', membership: project_member, notification: notification
|