debian-mirror-gitlab/app/views/ci/status/_badge.html.haml

14 lines
629 B
Text
Raw Normal View History

2017-08-17 22:00:37 +05:30
- status = local_assigns.fetch(:status)
- link = local_assigns.fetch(:link, true)
- title = local_assigns.fetch(:title, nil)
2023-03-17 16:20:25 +05:30
- 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?}"
2017-08-17 22:00:37 +05:30
- if link && status.has_details?
2018-05-09 12:01:36 +05:30
= link_to status.details_path, class: css_classes, title: title, data: { html: title.present? } do
2018-03-17 18:26:18 +05:30
= sprite_icon(status.icon)
2017-08-17 22:00:37 +05:30
= status.text
- else
2018-05-09 12:01:36 +05:30
%span{ class: css_classes, title: title, data: { html: title.present? } }
2018-03-17 18:26:18 +05:30
= sprite_icon(status.icon)
2017-08-17 22:00:37 +05:30
= status.text