diff options
author | Patricio Cano <suprnova32@gmail.com> | 2015-09-16 19:46:24 -0500 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2015-09-16 19:46:24 -0500 |
commit | 4c98357f16b1acfa793d8a5b28c7147e21f20356 (patch) | |
tree | 4fac132cf08e07b89a44c5cc253727c4c2552924 /app/models/notification.rb | |
parent | de1ffce7391a9e6adf07a8be60cd36bbc95ef2f3 (diff) | |
download | gitlab-ce-4c98357f16b1acfa793d8a5b28c7147e21f20356.tar.gz |
Added Global to the drop downs and updated the label of the button to show the current level instead of `Notifications`
Diffstat (limited to 'app/models/notification.rb')
-rw-r--r-- | app/models/notification.rb | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/app/models/notification.rb b/app/models/notification.rb index 828378655ce..171b8df45c2 100644 --- a/app/models/notification.rb +++ b/app/models/notification.rb @@ -26,7 +26,7 @@ class Notification end def project_notification_levels - [N_DISABLED, N_PARTICIPATING, N_WATCH, N_GLOBAL, N_MENTION] + [N_DISABLED, N_MENTION, N_PARTICIPATING, N_WATCH, N_GLOBAL] end end @@ -57,4 +57,21 @@ class Notification def level target.notification_level end + + def to_s + case level + when N_DISABLED + 'Disabled' + when N_PARTICIPATING + 'Participating' + when N_WATCH + 'Watching' + when N_MENTION + 'On mention' + when N_GLOBAL + 'Global' + else + # do nothing + end + end end |