Skip to content
Snippets Groups Projects
Commit 2dbca61d authored by Maxim Rydkin's avatar Maxim Rydkin
Browse files

adds tooltips into several places

parent 4684d7e3
No related branches found
No related tags found
Loading
This commit is part of merge request !9362. Comments created here will be created in the context of that merge request.
......@@ -121,4 +121,8 @@ def detailed_status?(status)
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment