Skip to content
Snippets Groups Projects
Verified Commit 696a7084 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Move rendering CI status to helper

parent 7b06c83c
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -42,4 +42,11 @@ module CiStatusHelper
 
icon(icon_name)
end
def render_ci_status(ci_commit)
link_to ci_status_path(ci_commit), class: "c#{ci_status_color(ci_commit)}",
title: "Build status: #{ci_commit.status}", data: {toggle: 'tooltip', placement: 'left'} do
ci_status_icon(ci_commit)
end
end
end
Loading
Loading
@@ -18,8 +18,7 @@
 
.pull-right
- if ci_commit
= link_to ci_status_path(ci_commit), class: "c#{ci_status_color(ci_commit)}" do
= ci_status_icon(ci_commit)
= render_ci_status(ci_commit)
 
= link_to commit.short_id, namespace_project_commit_path(project.namespace, project, commit), class: "commit_short_id"
 
Loading
Loading
Loading
Loading
@@ -8,9 +8,7 @@
= link_to_label(label, project: merge_request.project)
.pull-right.light
- if ci_commit
= link_to ci_status_path(ci_commit), class: "c#{ci_status_color(ci_commit)}",
title: "Build status: #{ci_commit.status}", data: {toggle: 'tooltip', placement: 'left'} do
= ci_status_icon(ci_commit)
= render_ci_status(ci_commit)
- if merge_request.merged?
%span
%i.fa.fa-check
Loading
Loading
Loading
Loading
@@ -21,9 +21,7 @@
.project-controls
- if ci && !project.empty_repo? && project.commit
- if ci_commit = project.ci_commit(project.commit.sha)
= link_to ci_status_path(ci_commit), class: "c#{ci_status_color(ci_commit)}",
title: "Build status: #{ci_commit.status}", data: {toggle: 'tooltip', placement: 'left'} do
= ci_status_icon(ci_commit)
= render_ci_status(ci_commit)
 
- if stars
%span
Loading
Loading
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