2015-04-30 13:06:18 -04:00
|
|
|
- page_title "Notifications"
|
2015-09-09 17:05:47 -04:00
|
|
|
- header_title page_title, profile_notifications_path
|
|
|
|
|
|
|
|
.gray-content-block.top-block
|
2015-02-06 18:23:58 -05:00
|
|
|
These are your global notification settings.
|
|
|
|
|
2015-09-09 17:05:47 -04:00
|
|
|
.prepend-top-default
|
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
|
2015-09-16 21:04:12 -04:00
|
|
|
On Mention
|
2015-02-06 18:23:58 -05:00
|
|
|
%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-08-26 22:29:37 -04:00
|
|
|
%p You will receive notifications for any activity
|
2015-02-06 18:23:58 -05:00
|
|
|
|
2015-12-02 08:48:06 -05:00
|
|
|
.gray-content-block
|
2015-02-23 18:48:00 -05:00
|
|
|
= f.submit 'Save changes', class: "btn btn-create"
|
2013-04-04 15:11:51 -04:00
|
|
|
|
2015-12-02 08:46:15 -05:00
|
|
|
.row.all-notifications.prepend-top-default
|
2014-02-17 11:06:24 -05:00
|
|
|
.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
|
2015-03-13 11:16:51 -04:00
|
|
|
- @group_members.each do |group_member|
|
|
|
|
- notification = Notification.new(group_member)
|
|
|
|
= render 'settings', type: 'group', membership: group_member, 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
|