gitlab-org--gitlab-foss/app/views/shared/_label_row.html.haml

27 lines
1.2 KiB
Text
Raw Normal View History

2018-01-19 16:40:18 -05:00
- 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)
2018-01-19 16:40:18 -05:00
2018-04-18 22:02:38 -04:00
.label-name
- if defined?(@project)
= link_to_label(label, subject: @project, tooltip: false)
- else
= render_colored_label(label, tooltip: false)
2018-04-18 22:02:38 -04:00
.label-description
2018-06-05 05:47:43 -04:00
.append-right-default.prepend-left-default
- if label.description.present?
.description-text
= markdown_field(label, :description)
2018-04-18 19:09:44 -04:00
%ul.label-links
- if show_label_issues_link
2018-04-18 19:09:44 -04:00
%li.label-link-item.inline
= link_to_label(label, subject: subject) { 'Issues' }
- if show_label_merge_requests_link
·
2018-04-18 19:09:44 -04:00
%li.label-link-item.inline
2018-05-16 22:03:09 -04:00
= 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
2018-05-29 07:11:20 -04:00
.label-badge.label-badge-blue= _('Prioritized label')