_settings.html.haml 1.53 KB
Newer Older
1 2
%li
  .row
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
3
    .col-sm-4
4
      %span
5 6
        = notification_icon(notification)

7 8 9 10
        - if membership.kind_of? UsersGroup
          = link_to membership.group.name, membership.group
        - else
          = link_to_project(membership.project)
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
11
    .col-sm-8
12 13 14 15
      = form_tag profile_notifications_path, method: :put, remote: true, class: 'update-notifications' do
        = hidden_field_tag :notification_type, type, id: dom_id(membership, 'notification_type')
        = hidden_field_tag :notification_id, membership.id, id: dom_id(membership, 'notification_id')

16
        = label_tag nil, class: 'radio-inline' do
17 18 19
          = radio_button_tag :notification_level, Notification::N_GLOBAL, notification.global?, id: dom_id(membership, 'notification_level'), class: 'trigger-submit'
          %span Use global setting

20
        = label_tag nil, class: 'radio-inline' do
21 22 23
          = radio_button_tag :notification_level, Notification::N_DISABLED, notification.disabled?, id: dom_id(membership, 'notification_level'), class: 'trigger-submit'
          %span Disabled

24
        = label_tag nil, class: 'radio-inline' do
25 26 27
          = radio_button_tag :notification_level, Notification::N_PARTICIPATING, notification.participating?, id: dom_id(membership, 'notification_level'), class: 'trigger-submit'
          %span Participating

28
        = label_tag nil, class: 'radio-inline' do
29 30 31
          = radio_button_tag :notification_level, Notification::N_WATCH, notification.watch?, id: dom_id(membership, 'notification_level'), class: 'trigger-submit'
          %span Watch