Commit 2d7bc695 authored by Rydkin Maxim's avatar Rydkin Maxim

adds tooltips into several places

parent aa4a9b9b
......@@ -121,4 +121,8 @@ module CiStatusHelper
status.respond_to?(:label) &&
status.respond_to?(:icon)
end
def status_title(pipeline)
"This pipeline is redundant as a newer pipeline exists (canceled by ##{pipeline.auto_canceled_by_id} pipeline)" if pipeline.auto_canceled_by_id? && pipeline.canceled?
end
end
- status = local_assigns.fetch(:status)
- link = local_assigns.fetch(:link, true)
- css_classes = "ci-status ci-#{status.group}"
- link = local_assigns.fetch(:link, true)
- title = local_assigns.fetch(:title, nil)
- css_classes = "ci-status ci-#{status.group} #{'has-tooltip' if title.present? }"
- if link && status.has_details?
= link_to status.details_path, class: css_classes do
= link_to status.details_path, class: css_classes, title: title do
= custom_icon(status.icon)
= status.text
- else
%span{ class: css_classes }
%span{ class: css_classes, title: title }
= custom_icon(status.icon)
= status.text
.content-block.build-header.top-area
.header-content
= render 'ci/status/badge', status: @build.detailed_status(current_user), link: false
= render 'ci/status/badge', status: @build.detailed_status(current_user), link: false, title: status_title(@build.pipeline)
Job
%strong.js-build-id ##{@build.id}
in pipeline
......
......@@ -9,7 +9,7 @@
%tr.build.commit{ class: ('retried' if retried) }
%td.status
= render "ci/status/badge", status: build.detailed_status(current_user)
= render "ci/status/badge", status: build.detailed_status(current_user), title: status_title(build.pipeline)
%td.branch-commit
- if can?(current_user, :read_build, build)
......
.page-content-header
.header-main-content
= render 'ci/status/badge', status: @pipeline.detailed_status(current_user)
= render 'ci/status/badge', status: @pipeline.detailed_status(current_user), title: status_title(@pipeline)
%strong Pipeline ##{@pipeline.id}
triggered #{time_ago_with_tooltip(@pipeline.created_at)}
- if @pipeline.user
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment