diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-06-17 19:57:59 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-06-17 19:57:59 -0300 |
commit | 4b204f071e4b626d4034fe431cebc902ae6caa78 (patch) | |
tree | d13e7ee9adcb19fa2a3e2cd8eb08d8e9f0707c52 /app/views/shared | |
parent | e5aa902860fcc2380fd25a6a4f0736dae159eba3 (diff) | |
download | gitlab-ce-4b204f071e4b626d4034fe431cebc902ae6caa78.tar.gz |
Small frontend code fixes and restore 8a2d88f commit
Diffstat (limited to 'app/views/shared')
-rw-r--r-- | app/views/shared/notifications/_custom_notifications.html.haml | 14 | ||||
-rw-r--r-- | app/views/shared/notifications/_notification_dropdown.html.haml | 4 |
2 files changed, 11 insertions, 7 deletions
diff --git a/app/views/shared/notifications/_custom_notifications.html.haml b/app/views/shared/notifications/_custom_notifications.html.haml index 29ba3305b3a..b704981e3db 100644 --- a/app/views/shared/notifications/_custom_notifications.html.haml +++ b/app/views/shared/notifications/_custom_notifications.html.haml @@ -12,16 +12,20 @@ = form_for notification_setting, html: { class: "custom-notifications-form" } do |f| = hidden_setting_source_input(notification_setting) .row - .col-lg-3 + .col-lg-4 %h4.prepend-top-0 Notification events - .col-lg-9 + %p + Custom notification levels are the same as participating levels. With custom notification levels you will also receive notifications for select events. To find out more, check out + = succeed "." do + %a{ href: "http://docs.gitlab.com/ce/workflow/notifications.html", target: "_blank"} notification emails + .col-lg-8 - NotificationSetting::EMAIL_EVENTS.each_with_index do |event, index| + - field_id = "#{notifications_menu_identifier("modal", notification_setting)}_notification_setting[#{event}]" .form-group .checkbox{ class: ("prepend-top-0" if index == 0) } - %label{ for: "notification_setting[#{event}]" } - = check_box("", event, { name: "notification_setting[#{event}]", id: "notification_setting[#{event}]", class: "js-custom-notification-event", checked: notification_setting.events[event] }) - + %label{ for: field_id } + = check_box("notification_setting", event, id: field_id, class: "js-custom-notification-event", checked: notification_setting.events[event]) %strong = event.to_s.humanize = icon("spinner spin", class: "custom-notification-event-loading") diff --git a/app/views/shared/notifications/_notification_dropdown.html.haml b/app/views/shared/notifications/_notification_dropdown.html.haml index 5c19876e971..d3258ee64cb 100644 --- a/app/views/shared/notifications/_notification_dropdown.html.haml +++ b/app/views/shared/notifications/_notification_dropdown.html.haml @@ -1,5 +1,5 @@ - left_align = local_assigns[:left_align] -%ul.dropdown-menu.dropdown-menu-no-wrap.dropdown-menu-selectable.dropdown-menu-large{ role: "menu", class: [notifications_menu_identifier("dropdown", notification_setting), ("dropdown-menu-align-right" if left_align.nil?)] } +%ul.dropdown-menu.dropdown-menu-no-wrap.dropdown-menu-selectable.dropdown-menu-large{ role: "menu", class: [notifications_menu_identifier("dropdown", notification_setting), ("dropdown-menu-align-right" unless left_align)] } - NotificationSetting.levels.each_key do |level| - next if level == "custom" - next if level == "global" && notification_setting.source.nil? @@ -8,6 +8,6 @@ %li.divider %li - %a.update-notification{ href: "#", role: "button", class: ("is-active" if notification_setting.level == "custom"), data: { toggle: "modal", target: "#" + notifications_menu_identifier("modal", notification_setting), notification_level: "custom", notification_title: "Custom" } } + %a.update-notification{ href: "#", role: "button", class: ("is-active" if notification_setting.custom?), data: { toggle: "modal", target: "#" + notifications_menu_identifier("modal", notification_setting), notification_level: "custom", notification_title: "Custom" } } %strong.dropdown-menu-inner-title Custom %span.dropdown-menu-inner-content= notification_description("custom") |