show.html.haml 2.1 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'
D
Dmitriy Zaporozhets 已提交
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
.row.all-notifications
  .col-md-6
36
    %p
37
      You can also specify notification level per group or per project.
38
      %br
39
      By default all projects and groups uses notification level set above.
40 41
    %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
  .col-md-6
47 48 49
    %p
      To specify notification level per project of a group you belong to,
      %br
50
      you need to be a member of the project itself, not only its group.
51 52
    %h4 Projects:
    %ul.bordered-list
53 54 55
      - @project_members.each do |project_member|
        - notification = Notification.new(project_member)
        = render 'settings', type: 'project', membership: project_member, notification: notification