diff options
author | Luke Bennett <lukeeeebennettplus@gmail.com> | 2018-05-24 13:29:00 +0100 |
---|---|---|
committer | Luke Bennett <lukeeeebennettplus@gmail.com> | 2018-05-24 13:29:00 +0100 |
commit | d400c94e601df96b0a58a7e1098ee04b3e7459f5 (patch) | |
tree | 6375697783606f5337fd6826ebcd1c8006575823 /app/views/shared/_label.html.haml | |
parent | aba153a46d99977b6d05b0d6fb93a796cf551ae3 (diff) | |
download | gitlab-ce-d400c94e601df96b0a58a7e1098ee04b3e7459f5.tar.gz |
Fix accuracy of 'prioritized label' badge, when given different contexts
Diffstat (limited to 'app/views/shared/_label.html.haml')
-rw-r--r-- | app/views/shared/_label.html.haml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/views/shared/_label.html.haml b/app/views/shared/_label.html.haml index 6272189e289..6dfa1ffe9b5 100644 --- a/app/views/shared/_label.html.haml +++ b/app/views/shared/_label.html.haml @@ -1,13 +1,15 @@ - label_css_id = dom_id(label) - status = label_subscription_status(label, @project).inquiry if current_user - subject = local_assigns[:subject] +- use_label_priority = local_assigns.fetch(:use_label_priority, false) +- force_priority = local_assigns.fetch(:force_priority, use_label_priority ? label.priority? : false) - toggle_subscription_path = toggle_subscription_label_path(label, @project) if current_user - show_label_merge_requests_link = show_label_issuables_link?(label, :merge_requests, project: @project) - show_label_issues_link = show_label_issuables_link?(label, :issues, project: @project) - tooltip_title = "#{status.unsubscribed? ? 'Subscribe' : 'Unsubscribe'} at #{label.is_a?(ProjectLabel) ? 'project' : 'group'} level" %li.label-list-item{ id: label_css_id, data: { id: label.id } } - = render "shared/label_row", label: label, subject: subject + = render "shared/label_row", label: label, subject: subject, force_priority: force_priority %ul.label-actions-list - if controller.is_a?(Projects::LabelsController) %li.inline |