OSDN Git Service

8353b2f5f2306448c821f3a2761e2a6650415c89
[wvm/gitlab.git] / app / views / profiles / notifications / show.html.haml
1 %h3.page-title
2   Notifications settings
3 %p.light
4   GitLab uses the email specified in your profile for notifications
5 %hr
6 .alert.alert-info
7   %p
8     %i.icon-circle.cred
9     %strong Disabled
10     – You will not get any notifications via email
11   %p
12     %i.icon-circle.cblue
13     %strong Participating
14     – You will only receive notifications from related resources (e.g. from your commits or assigned issues)
15   %p
16     %i.icon-circle.cgreen
17     %strong Watch
18     – You will receive all notifications from projects in which you participate
19
20 .row
21   .span4
22     %h4
23       = notification_icon(@notification)
24       Global setting
25   .span7
26     = form_tag profile_notifications_path, method: :put, remote: true, class: 'update-notifications' do
27       = hidden_field_tag :notification_type, 'global'
28
29       = label_tag do
30         = radio_button_tag :notification_level, Notification::N_DISABLED, @notification.disabled?, class: 'trigger-submit'
31         %span Disabled
32
33       = label_tag do
34         = radio_button_tag :notification_level, Notification::N_PARTICIPATING, @notification.participating?, class: 'trigger-submit'
35         %span Participating
36
37       = label_tag do
38         = radio_button_tag :notification_level, Notification::N_WATCH, @notification.watch?, class: 'trigger-submit'
39         %span Watch
40
41 %br
42 = link_to '#', class: 'js-toggle-visibility-link' do
43   %span.btn.btn-tiny
44     %i.icon-chevron-down
45     %span Advanced notifications settings
46 .js-toggle-visibility-container.hide
47   %hr
48   %h4 Groups:
49   %ul.bordered-list
50     - @users_groups.each do |users_group|
51       - notification = Notification.new(users_group)
52       = render 'settings', type: 'group', membership: users_group, notification: notification
53
54   %h4 Projects:
55   %ul.bordered-list
56     - @users_projects.each do |users_project|
57       - notification = Notification.new(users_project)
58       = render 'settings', type: 'project', membership: users_project, notification: notification