summaryrefslogtreecommitdiff
path: root/app/views/projects/buttons/_notifications.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/projects/buttons/_notifications.html.haml')
-rw-r--r--app/views/projects/buttons/_notifications.html.haml11
1 files changed, 5 insertions, 6 deletions
diff --git a/app/views/projects/buttons/_notifications.html.haml b/app/views/projects/buttons/_notifications.html.haml
index 6a620e7c232..9783ff8431c 100644
--- a/app/views/projects/buttons/_notifications.html.haml
+++ b/app/views/projects/buttons/_notifications.html.haml
@@ -1,6 +1,5 @@
-- return unless [@membership, @group_member].any?
-
-- if @membership
+- case @membership
+- when ProjectMember
= form_tag profile_notifications_path, method: :put, remote: true, class: 'inline', id: 'notification-form' do
= hidden_field_tag :notification_type, 'project'
= hidden_field_tag :notification_id, @membership.id
@@ -14,8 +13,8 @@
- Notification.project_notification_levels.each do |level|
= notification_list_item(level, @membership)
-- elsif @group_member
- .btn.btn-new.disabled#notifications-button
+- when GroupMember
+ .btn.btn-new.disabled
= icon('bell')
- = notification_label(@group_member)
+ = notification_label(@membership)
= icon('angle-down')