summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2017-06-26 17:52:53 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2017-06-26 17:55:52 -0300
commit28785488e8586f6fa4bf22b4773f7fb0ad663815 (patch)
tree53d364ffa9ea51f998aaaf7e262f45ef2ba66558
parent33b61858a0564d0825bf5fc2e709f806c3282e4f (diff)
downloadgitlab-ce-fix-33991.tar.gz
Fix missing hidden class when subscribed to a group labelfix-33991
-rw-r--r--app/views/shared/_label.html.haml6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/views/shared/_label.html.haml b/app/views/shared/_label.html.haml
index 4794541c89e..b8a2c5cb87d 100644
--- a/app/views/shared/_label.html.haml
+++ b/app/views/shared/_label.html.haml
@@ -1,7 +1,7 @@
- label_css_id = dom_id(label)
- status = label_subscription_status(label, @project).inquiry if current_user
- subject = local_assigns[:subject]
-- toggle_subscription_path = toggle_subscription_label_path(label, @project)
+- toggle_subscription_path = toggle_subscription_label_path(label, @project) if current_user
%li{ id: label_css_id, data: { id: label.id } }
= render "shared/label_row", label: label
@@ -56,9 +56,9 @@
= icon('chevron-down')
%ul.dropdown-menu
%li
- %a.js-subscribe-button{ data: { url: toggle_subscription_namespace_project_label_path(@project.namespace, @project, label) } }
+ %a.js-subscribe-button{ class: ('hidden' unless status.unsubscribed?), data: { url: toggle_subscription_namespace_project_label_path(@project.namespace, @project, label) } }
Project level
- %a.js-subscribe-button{ data: { url: toggle_subscription_group_label_path(label.group, label) } }
+ %a.js-subscribe-button{ class: ('hidden' unless status.unsubscribed?), data: { url: toggle_subscription_group_label_path(label.group, label) } }
Group level
- else
%button.js-subscribe-button.label-subscribe-button.btn.btn-default{ type: 'button', data: { status: status, url: toggle_subscription_path } }