diff options
author | Tanya Pazitny <tpazitny@gitlab.com> | 2019-04-18 15:51:56 +0000 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2019-04-18 15:51:56 +0000 |
commit | db00c6c6d89135583bad1ce44fa30fa7ee7b14b1 (patch) | |
tree | 2ee5f3e4b436e6842a358e32ecfb181f7a771bb5 /app | |
parent | f1b3db3cf237daf8da481b594afeca9bc2df276f (diff) | |
download | gitlab-ce-db00c6c6d89135583bad1ce44fa30fa7ee7b14b1.tar.gz |
Fix link issues with labels
* On the project labels page, the label itself should not be clickable.
* On the group labels page, the links for Issues and Merge Requests should be shown.
Diffstat (limited to 'app')
-rw-r--r-- | app/views/shared/_label_row.html.haml | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/app/views/shared/_label_row.html.haml b/app/views/shared/_label_row.html.haml index 6651f12f6de..9d1648fbf70 100644 --- a/app/views/shared/_label_row.html.haml +++ b/app/views/shared/_label_row.html.haml @@ -1,13 +1,11 @@ - subject = local_assigns[:subject] - force_priority = local_assigns.fetch(:force_priority, false) -- show_label_issues_link = defined?(@project) && show_label_issuables_link?(label, :issues, project: @project) -- show_label_merge_requests_link = defined?(@project) && show_label_issuables_link?(label, :merge_requests, project: @project) +- subject_or_group_defined = defined?(@project) || defined?(@group) +- show_label_issues_link = subject_or_group_defined && show_label_issuables_link?(label, :issues, project: @project) +- show_label_merge_requests_link = subject_or_group_defined && show_label_issuables_link?(label, :merge_requests, project: @project) .label-name - - if defined?(@project) - = link_to_label(label, subject: @project, tooltip: false) - - else - = render_label(label, tooltip: false) + = render_label(label, tooltip: false) .label-description .append-right-default.prepend-left-default - if label.description.present? @@ -22,5 +20,6 @@ %li.label-link-item.inline = link_to_label(label, subject: subject, type: :merge_request) { _('Merge requests') } - if force_priority + · %li.label-link-item.priority-badge.js-priority-badge.inline.prepend-left-10 .label-badge.label-badge-blue= _('Prioritized label') |