From 24f5f071dcce529a3fbbc887ebce7bfc56353361 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Thu, 16 Jun 2016 15:42:54 +0100 Subject: Added description to custom option in notification dropdown Always shows the custom option in the dropdown --- app/helpers/notifications_helper.rb | 4 +++- app/views/shared/projects/_notification_dropdown.html.haml | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/helpers/notifications_helper.rb b/app/helpers/notifications_helper.rb index 50c21fc0d49..70d56e4ac08 100644 --- a/app/helpers/notifications_helper.rb +++ b/app/helpers/notifications_helper.rb @@ -34,7 +34,7 @@ module NotificationsHelper def notification_description(level) case level.to_sym when :participating - 'You will only receive notifications from related resources' + 'You will only receive notifications for threads you have participated in' when :mention 'You will receive notifications only for comments in which you were @mentioned' when :watch @@ -43,6 +43,8 @@ module NotificationsHelper 'You will not get any notifications via email' when :global 'Use your global notification setting' + when :custom + 'You will only receive notifications for the events you choose' end end diff --git a/app/views/shared/projects/_notification_dropdown.html.haml b/app/views/shared/projects/_notification_dropdown.html.haml index d7bea8b69fc..103d5f12f5c 100644 --- a/app/views/shared/projects/_notification_dropdown.html.haml +++ b/app/views/shared/projects/_notification_dropdown.html.haml @@ -2,8 +2,8 @@ - NotificationSetting.levels.each do |level| - if level.first != "custom" = notification_list_item(level.first, @notification_setting) - - unless @notification_setting.custom? - %li.divider - %li - %a.update-notification{ href: "#", role: "button", data: { toggle: "modal", target: "#custom-notifications-modal", notification_level: "custom", notification_title: "Custom" } } - Custom + %li.divider + %li + %a.update-notification{ href: "#", role: "button", data: { toggle: "modal", target: "#custom-notifications-modal", notification_level: "custom", notification_title: "Custom" } } + %strong.dropdown-menu-inner-title Custom + %span.dropdown-menu-inner-content= notification_description("custom") -- cgit v1.2.1