diff options
author | Ryan Cobb <rcobb@gitlab.com> | 2019-05-29 10:56:38 -0600 |
---|---|---|
committer | Ryan Cobb <rcobb@gitlab.com> | 2019-05-29 10:56:38 -0600 |
commit | 0393c5059de2ce03f706fbf28056e1d80304b73a (patch) | |
tree | f47c4daaf9315c89cc6b039988d57e1fbd14c322 /app/helpers/labels_helper.rb | |
parent | 4fae62b9efa985e4cf6a09cb6bd4b9cf665e6b32 (diff) | |
parent | 70d1537dda66da8b319ceefde36195047b26a8fd (diff) | |
download | gitlab-ce-0393c5059de2ce03f706fbf28056e1d80304b73a.tar.gz |
Merge branch 'master' into 61964-unicorn-instrumentation
Diffstat (limited to 'app/helpers/labels_helper.rb')
-rw-r--r-- | app/helpers/labels_helper.rb | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/app/helpers/labels_helper.rb b/app/helpers/labels_helper.rb index 76300e791e6..acc8aeae282 100644 --- a/app/helpers/labels_helper.rb +++ b/app/helpers/labels_helper.rb @@ -5,7 +5,7 @@ module LabelsHelper include ActionView::Helpers::TagHelper def show_label_issuables_link?(label, issuables_type, current_user: nil, project: nil) - return true if label.is_a?(GroupLabel) + return true unless label.project_label? return true unless project project.feature_available?(issuables_type, current_user) @@ -159,13 +159,6 @@ module LabelsHelper label.subscribed?(current_user, project) ? 'Unsubscribe' : 'Subscribe' end - def label_deletion_confirm_text(label) - case label - when GroupLabel then _('Remove this label? This will affect all projects within the group. Are you sure?') - when ProjectLabel then _('Remove this label? Are you sure?') - end - end - def create_label_title(subject) case subject when Group @@ -200,7 +193,7 @@ module LabelsHelper end def label_status_tooltip(label, status) - type = label.is_a?(ProjectLabel) ? 'project' : 'group' + type = label.project_label? ? 'project' : 'group' level = status.unsubscribed? ? type : status.sub('-level', '') action = status.unsubscribed? ? 'Subscribe' : 'Unsubscribe' |