debian-mirror-gitlab/app/views/shared/_label_row.html.haml
2023-07-09 08:55:56 +05:30

27 lines
1.3 KiB
Text

- force_priority = local_assigns.fetch(:force_priority, false)
- subject_or_group_defined = defined?(@project) || defined?(@group)
- show_label_issues_link = subject_or_group_defined && show_label_issuables_link?(label, :issues)
- show_label_merge_requests_link = subject_or_group_defined && show_label_issuables_link?(label, :merge_requests)
.label-name.gl-flex-shrink-0.gl-mr-5
= render_label(label, tooltip: false)
- if show_labels_full_path?(@project, @group)
.gl-mt-2
= render 'shared/label_full_path', label: label
.label-description.gl-w-full
.gl-display-flex.gl-align-items-stretch.gl-flex-wrap
.gl-flex-basis-half.gl-flex-grow-1.gl-mr-5
- if label.description.present?
.gl-my-1
= markdown_field(label, :description)
%ul.label-links.gl-m-0.gl-p-0.gl-white-space-nowrap
- if force_priority
%li.js-priority-badge.inline.gl-mr-3.gl-mt-1
.label-badge.gl-bg-blue-50= _('Prioritized')
- if show_label_issues_link
%li.inline.gl-my-1
= link_to_label(label, css_class: 'gl-mr-5') { _('Issues') }
- if show_label_merge_requests_link
%li.inline.gl-my-1
= link_to_label(label, type: :merge_request) { _('Merge requests') }
= render_if_exists 'shared/label_row_epics_link', label: label