diff options
Diffstat (limited to 'app/views/shared/_label_row.html.haml')
-rw-r--r-- | app/views/shared/_label_row.html.haml | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/app/views/shared/_label_row.html.haml b/app/views/shared/_label_row.html.haml index 0ae3ab8f090..c5ea15a7f63 100644 --- a/app/views/shared/_label_row.html.haml +++ b/app/views/shared/_label_row.html.haml @@ -1,14 +1,17 @@ - subject = local_assigns[:subject] - force_priority = local_assigns.fetch(:force_priority, false) -- show_label_issues_link = show_label_issuables_link?(label, :issues, project: @project) -- show_label_merge_requests_link = show_label_issuables_link?(label, :merge_requests, project: @project) +- 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) .label-name - = link_to_label(label, subject: @project, tooltip: false) + - if defined?(@project) + = link_to_label(label, subject: @project, tooltip: false) + - else + = render_colored_label(label, tooltip: false) .label-description .append-right-default.prepend-left-default - if label.description.present? - .description-text.append-bottom-10 + .description-text = markdown_field(label, :description) %ul.label-links - if show_label_issues_link @@ -19,5 +22,5 @@ %li.label-link-item.inline = link_to_label(label, subject: subject, type: :merge_request) { _('Merge requests') } - if force_priority - %li.label-link-item.js-priority-badge.inline.prepend-left-10 + %li.label-link-item.priority-badge.js-priority-badge.inline.prepend-left-10 .label-badge.label-badge-blue= _('Prioritized label') |