diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-06-09 16:33:31 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-06-10 11:49:30 -0300 |
commit | 39ead205de72461e86db07525922f2fab5fff2a9 (patch) | |
tree | 5336487bad3b89b5db461788aba9eb7d4b9c3b0f /app/helpers/notifications_helper.rb | |
parent | 8f6d43e0fea3ce62ec2e8e211755e557f19c51fd (diff) | |
download | gitlab-ce-39ead205de72461e86db07525922f2fab5fff2a9.tar.gz |
Remove notification level fild from users, improve migrations and specsissue_3359_2
Diffstat (limited to 'app/helpers/notifications_helper.rb')
-rw-r--r-- | app/helpers/notifications_helper.rb | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/app/helpers/notifications_helper.rb b/app/helpers/notifications_helper.rb index 9769458f79e..50c21fc0d49 100644 --- a/app/helpers/notifications_helper.rb +++ b/app/helpers/notifications_helper.rb @@ -71,26 +71,13 @@ module NotificationsHelper html << content_tag(:div, class: "radio") do content_tag(:label, { value: level }) do - radio_button_tag(:notification_level, level, @global_notification_setting.level.to_sym == level) + + radio_button_tag(:"global_notification_setting[level]", level, @global_notification_setting.level.to_sym == level) + content_tag(:div, level.to_s.capitalize, class: "level-title") + - content_tag(:p, notification_level_description(level)) + content_tag(:p, notification_description(level)) end end end html.html_safe end - - def notification_level_description(level) - case level - when :disabled - "You will not get any notifications via email" - when :mention - "You will receive notifications only for comments in which you were @mentioned" - when :participating - "You will only receive notifications from related resources (e.g. from your commits or assigned issues)" - when :watch - "You will receive notifications for any activity" - end - end end |