From 21dfaa000d0117fcf70ecd0578d4431362d5c2a1 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 23 Sep 2015 12:18:16 +0200 Subject: Show CI status on all pages where commits list is rendered Signed-off-by: Dmitriy Zaporozhets --- app/views/projects/commits/_commit.html.haml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'app/views/projects/commits') diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml index 74f8d8b15cf..efad4cb1473 100644 --- a/app/views/projects/commits/_commit.html.haml +++ b/app/views/projects/commits/_commit.html.haml @@ -4,7 +4,11 @@ - notes = commit.notes - note_count = notes.user.count -= cache [project.id, commit.id, note_count] do +- ci_commit = project.ci_commit(commit.sha) +- cache_key = [project.id, commit.id, note_count] +- cache_key.push(ci_commit.status) if ci_commit + += cache(cache_key) do %li.commit.js-toggle-container .commit-row-title %strong.str-truncated @@ -13,6 +17,10 @@ %a.text-expander.js-toggle-button ... .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) +   = link_to commit.short_id, namespace_project_commit_path(project.namespace, project, commit), class: "commit_short_id" .notes_count -- cgit v1.2.1