summaryrefslogtreecommitdiff
path: root/app/views/projects/commits
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-23 12:18:16 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-23 12:23:04 +0200
commit21dfaa000d0117fcf70ecd0578d4431362d5c2a1 (patch)
tree4d15b95fbb9223f20e1faa37c7609ebece154db1 /app/views/projects/commits
parent64ec7a3e0e7eedf960e02910f7086e6757ce5cc7 (diff)
downloadgitlab-ce-21dfaa000d0117fcf70ecd0578d4431362d5c2a1.tar.gz
Show CI status on all pages where commits list is rendered
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views/projects/commits')
-rw-r--r--app/views/projects/commits/_commit.html.haml10
1 files changed, 9 insertions, 1 deletions
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)
+ &nbsp;
= link_to commit.short_id, namespace_project_commit_path(project.namespace, project, commit), class: "commit_short_id"
.notes_count