Commit 6679a906 authored by Filipa Lacerda's avatar Filipa Lacerda

Use badge partial as single source of truth instead of having 2 partials doing the same

Update changelog description

Changes after review
parent 4ab83117
......@@ -91,7 +91,7 @@
%strong ##{build.id}
%td.status
= render 'ci/status/badge_link', status: build.detailed_status(current_user)
= render 'ci/status/badge', status: build.detailed_status(current_user)
%td.status
- if project
......
- status = local_assigns.fetch(:status)
- link = local_assigns.fetch(:link, true)
- css_classes = "ci-status ci-#{status.group}"
%span{ class: "ci-status ci-#{status.group}" }
= custom_icon(status.icon)
= status.text
- if link && status.has_details?
= link_to status.details_path, class: css_classes do
= custom_icon(status.icon)
= status.text
- else
%span{ class: css_classes }
= custom_icon(status.icon)
= status.text
- status = local_assigns.fetch(:status)
- css_classes = "ci-status ci-#{status.group}"
- if status.has_details?
= link_to status.details_path, class: css_classes do
= custom_icon(status.icon)
= status.text
- else
= render "ci/status/badge", status: status
.content-block.build-header
.header-content
= render 'ci/status/badge', status: @build.detailed_status(current_user)
= render 'ci/status/badge', status: @build.detailed_status(current_user), link: false
Build
%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_link", status: build.detailed_status(current_user)
= render "ci/status/badge", status: build.detailed_status(current_user)
%td.branch-commit
- if can?(current_user, :read_build, build)
......
......@@ -4,7 +4,7 @@
%tr.commit
%td.commit-link
= render 'ci/status/badge_link', status: pipeline.detailed_status(current_user)
= render 'ci/status/badge', status: pipeline.detailed_status(current_user)
%td
= link_to namespace_project_pipeline_path(pipeline.project.namespace, pipeline.project, pipeline.id) do
......
......@@ -8,7 +8,7 @@
%tr.generic_commit_status{ class: ('retried' if retried) }
%td.status
= render 'ci/status/badge_link', status: generic_commit_status.detailed_status(current_user)
= render 'ci/status/badge', status: generic_commit_status.detailed_status(current_user)
%td.generic_commit_status-link
- if can?(current_user, :read_commit_status, generic_commit_status) && generic_commit_status.target_url
......
.page-content-header
.header-main-content
= render 'ci/status/badge_link', status: @pipeline.detailed_status(current_user)
= render 'ci/status/badge', status: @pipeline.detailed_status(current_user)
%strong Pipeline ##{@commit.pipelines.last.id}
triggered #{time_ago_with_tooltip(@commit.authored_date)} by
= author_avatar(@commit, size: 24)
......
---
title: Add new ci status partial to render a badge without a link
title: Add link verification to badge partial in order to render a badge without a link
merge_request: 8740
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