debian-mirror-gitlab/app/views/ci/status/_badge.html.haml
2023-03-17 16:20:25 +05:30

13 lines
629 B
Text

- status = local_assigns.fetch(:status)
- link = local_assigns.fetch(:link, true)
- title = local_assigns.fetch(:title, nil)
- css_classes = "gl-display-inline-flex gl-align-items-center gl-gap-2 gl-line-height-0 gl-px-3 gl-py-2 gl-rounded-base ci-status ci-#{status.group} #{'has-tooltip' if title.present?}"
- if link && status.has_details?
= link_to status.details_path, class: css_classes, title: title, data: { html: title.present? } do
= sprite_icon(status.icon)
= status.text
- else
%span{ class: css_classes, title: title, data: { html: title.present? } }
= sprite_icon(status.icon)
= status.text