show.html.haml 2 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 8 9 10 11 12 13
.alert.alert-info
  %p
    %i.icon-circle.cred
    %strong Disabled
    – You will not get any notifications via email
  %p
    %i.icon-circle.cblue
    %strong Participating
14
    – You will only receive notifications from related resources (e.g. from your commits or assigned issues)
15 16 17 18
  %p
    %i.icon-circle.cgreen
    %strong Watch
    – You will receive all notifications from projects in which you participate
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
19

20
.row
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
21
  .col-sm-4
22 23 24
    %h4
      = notification_icon(@notification)
      Global setting
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
25
  .col-sm-8
26 27 28
    = form_tag profile_notifications_path, method: :put, remote: true, class: 'update-notifications' do
      = hidden_field_tag :notification_type, 'global'

29
      = label_tag nil, class: 'radio-inline' do
30 31 32
        = radio_button_tag :notification_level, Notification::N_DISABLED, @notification.disabled?, class: 'trigger-submit'
        %span Disabled

33
      = label_tag nil, class: 'radio-inline' do
34 35 36
        = radio_button_tag :notification_level, Notification::N_PARTICIPATING, @notification.participating?, class: 'trigger-submit'
        %span Participating

37
      = label_tag nil, class: 'radio-inline' do
38 39 40
        = radio_button_tag :notification_level, Notification::N_WATCH, @notification.watch?, class: 'trigger-submit'
        %span Watch

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 48 49
  %hr
  %h4 Groups:
  %ul.bordered-list
50 51
    - @users_groups.each do |users_group|
      - notification = Notification.new(users_group)
52
      = render 'settings', type: 'group', membership: users_group, notification: notification
53

54 55
  %h4 Projects:
  %ul.bordered-list
56 57 58
    - @users_projects.each do |users_project|
      - notification = Notification.new(users_project)
      = render 'settings', type: 'project', membership: users_project, notification: notification