Commit 43c575ac authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Merge branch '26982-improve-pipeline-status-icon-linking-in-widgets' into 'master'

Improve pipeline status icon linking in widgets

Closes #26982

See merge request !8705
parents d1ab9ad6 b61b45a7
...@@ -58,3 +58,9 @@ ...@@ -58,3 +58,9 @@
fill: $gl-text-color; fill: $gl-text-color;
} }
} }
.icon-link {
&:hover {
text-decoration: none;
}
}
...@@ -63,9 +63,10 @@ ...@@ -63,9 +63,10 @@
- if @commit.status - if @commit.status
.well-segment.pipeline-info .well-segment.pipeline-info
%div{ class: "icon-container ci-status-icon-#{@commit.status}" } %div{ class: "icon-container ci-status-icon-#{@commit.status}" }
= ci_icon_for_status(@commit.status) = link_to namespace_project_pipeline_path(@project.namespace, @project, @commit.pipelines.last.id) do
= ci_icon_for_status(@commit.status)
Pipeline Pipeline
= link_to "##{@commit.pipelines.last.id}", pipelines_namespace_project_commit_path(@project.namespace, @project, @commit.id), class: "monospace" = link_to "##{@commit.pipelines.last.id}", namespace_project_pipeline_path(@project.namespace, @project, @commit.pipelines.last.id), class: "monospace"
for for
= link_to @commit.short_id, namespace_project_commit_path(@project.namespace, @project, @commit), class: "monospace" = link_to @commit.short_id, namespace_project_commit_path(@project.namespace, @project, @commit), class: "monospace"
%span.ci-status-label %span.ci-status-label
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
.mr-widget-heading .mr-widget-heading
- %w[success success_with_warnings skipped canceled failed running pending].each do |status| - %w[success success_with_warnings skipped canceled failed running pending].each do |status|
.ci_widget{ class: "ci-#{status} ci-status-icon-#{status}", style: ("display:none" unless @pipeline.status == status) } .ci_widget{ class: "ci-#{status} ci-status-icon-#{status}", style: ("display:none" unless @pipeline.status == status) }
= ci_icon_for_status(status) = link_to namespace_project_pipeline_path(@pipeline.project.namespace, @pipeline.project, @pipeline.id), class: 'icon-link' do
= ci_icon_for_status(status)
%span %span
Pipeline Pipeline
= link_to "##{@pipeline.id}", namespace_project_pipeline_path(@pipeline.project.namespace, @pipeline.project, @pipeline.id), class: 'pipeline' = link_to "##{@pipeline.id}", namespace_project_pipeline_path(@pipeline.project.namespace, @pipeline.project, @pipeline.id), class: 'pipeline'
......
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
.info-well .info-well
- if @commit.status - if @commit.status
.well-segment.pipeline-info .well-segment.pipeline-info
%div{ class: "icon-container ci-status-icon-#{@commit.status}" } .icon-container
= ci_icon_for_status(@commit.status) = icon('clock-o')
= pluralize @pipeline.statuses.count(:id), "build" = pluralize @pipeline.statuses.count(:id), "build"
- if @pipeline.ref - if @pipeline.ref
from from
......
---
title: Improve pipeline status icon linking in widgets
merge_request:
author:
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