show.html.haml 1.95 KB
Newer Older
1
2
%h3.page-title
  Notifications settings
3
%p.light
4
  GitLab uses the email specified in your profile for notifications
5
%hr
6
7
= form_tag profile_notifications_path, method: :put, remote: true, class: 'update-notifications form-horizontal global-notifications-form' do
  = hidden_field_tag :notification_type, 'global'
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
8

9
10
11
12
  = label_tag :notification_level, 'Notification level', class: 'control-label'
  .col-sm-10
    .radio
      = label_tag nil, class: '' do
13
        = radio_button_tag :notification_level, Notification::N_DISABLED, @notification.disabled?, class: 'trigger-submit'
14
15
16
        .level-title
          Disabled
        %p You will not get any notifications via email
17

18
19
    .radio
      = label_tag nil, class: '' do
20
        = radio_button_tag :notification_level, Notification::N_PARTICIPATING, @notification.participating?, class: 'trigger-submit'
21
22
23
        .level-title
          Participating
        %p You will only receive notifications from related resources (e.g. from your commits or assigned issues)
24

25
26
    .radio
      = label_tag nil, class: '' do
27
        = radio_button_tag :notification_level, Notification::N_WATCH, @notification.watch?, class: 'trigger-submit'
28
29
30
        .level-title
          Watch
        %p You will receive all notifications from projects in which you participate
31

32
.clearfix
33
  %hr
34
35
36
37
38
39
40
41
  %p
    You can also specify notification level per group or per project
    %br
    By default all projects and groups uses notification level set above
.row.all-notifications
  .col-md-6
    %h4 Groups:
    %ul.bordered-list
42
      - @group_members.each do |users_group|
43
44
        - notification = Notification.new(users_group)
        = render 'settings', type: 'group', membership: users_group, notification: notification
45

46
47
48
  .col-md-6
    %h4 Projects:
    %ul.bordered-list
49
      - @project_members.each do |users_project|
50
51
        - notification = Notification.new(users_project)
        = render 'settings', type: 'project', membership: users_project, notification: notification