debian-mirror-gitlab/app/views/shared/_label_row.html.haml

31 lines
1.5 KiB
Text
Raw Normal View History

2018-11-08 19:23:39 +05:30
- force_priority = local_assigns.fetch(:force_priority, false)
2019-07-31 22:56:46 +05:30
- subject_or_group_defined = defined?(@project) || defined?(@group)
2019-10-12 21:52:04 +05:30
- 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)
2018-03-17 18:26:18 +05:30
2021-01-03 14:25:43 +05:30
.label-name.gl-flex-shrink-0.gl-mt-2.gl-mr-3
2019-07-31 22:56:46 +05:30
= render_label(label, tooltip: false)
2021-01-03 14:25:43 +05:30
.label-description.gl-flex-grow-1.gl-overflow-hidden
.gl-display-flex.gl-align-items-center.gl-flex-wrap.gl-mt-2
.description-text.gl-flex-grow-1.gl-overflow-hidden
- if label.description.present?
2018-03-17 18:26:18 +05:30
= markdown_field(label, :description)
2021-01-03 14:25:43 +05:30
- elsif show_labels_full_path?(@project, @group)
= render 'shared/label_full_path', label: label
%ul.label-links.gl-m-0.gl-p-0.gl-white-space-nowrap
2018-03-17 18:26:18 +05:30
- if show_label_issues_link
2021-01-03 14:25:43 +05:30
%li.inline
= link_to_label(label, css_class: 'gl-text-blue-600!') { _('Issues') }
2018-03-17 18:26:18 +05:30
- if show_label_merge_requests_link
·
2021-01-03 14:25:43 +05:30
%li.inline
= link_to_label(label, type: :merge_request, css_class: 'gl-text-blue-600!') { _('Merge requests') }
= render_if_exists 'shared/label_row_epics_link', label: label
2018-11-08 19:23:39 +05:30
- if force_priority
2019-07-31 22:56:46 +05:30
·
2021-01-03 14:25:43 +05:30
%li.js-priority-badge.inline.gl-ml-3
.label-badge.gl-bg-blue-50= _('Prioritized label')
- if label.description.present? && show_labels_full_path?(@project, @group)
.gl-mt-3
= render 'shared/label_full_path', label: label