Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-19 16:31:08 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-19 19:58:28 +0300
commit355389d065216739a2b8e8150a1a569c410f4ff6 (patch)
tree109be64911e0b99f220a2cee530ab3d05f15129c /app/views
parentaa78148901cd3877936bc2afcea9c329077bf951 (diff)
Disable subscribing to group-level labels
Diffstat (limited to 'app/views')
-rw-r--r--app/views/shared/_label.html.haml8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/views/shared/_label.html.haml b/app/views/shared/_label.html.haml
index 5cdd18d24f0..40c8d2af226 100644
--- a/app/views/shared/_label.html.haml
+++ b/app/views/shared/_label.html.haml
@@ -18,7 +18,7 @@
= link_to_label(label, subject: @project) do
= pluralize open_issues_count, 'open issue'
- if current_user
- %li.label-subscription{ data: { url: toggle_subscription_label_path(label) } }
+ %li.label-subscription{ data: toggle_subscription_data(label) }
%a.js-subscribe-button.label-subscribe-button.subscription-status{ role: "button", href: "#", data: { toggle: "tooltip", status: label_subscription_status(label) } }
%span= label_subscription_toggle_button_text(label)
- if can?(current_user, :admin_label, label)
@@ -34,10 +34,10 @@
= pluralize open_issues_count, 'open issue'
- if current_user
- .label-subscription.inline{ data: { url: toggle_subscription_label_path(label) } }
+ .label-subscription.inline{ data: toggle_subscription_data(label) }
%button.js-subscribe-button.label-subscribe-button.btn.btn-transparent.btn-action.subscription-status{ type: "button", title: label_subscription_toggle_button_text(label), data: { toggle: "tooltip", status: label_subscription_status(label) } }
%span.sr-only= label_subscription_toggle_button_text(label)
- = icon('eye', class: 'label-subscribe-button-icon')
+ = icon('eye', class: 'label-subscribe-button-icon', disabled: label.is_a?(GroupLabel))
= icon('spinner spin', class: 'label-subscribe-button-loading')
- if can?(current_user, :admin_label, label)
@@ -48,6 +48,6 @@
%span.sr-only Delete
= icon('trash-o')
- - if current_user
+ - if current_user && label.is_a?(ProjectLabel)
:javascript
new Subscription('##{dom_id(label)} .label-subscription');