summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-10-23 17:32:52 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-10-23 17:32:52 +0200
commit696a7084010315078c38507cccabb236bb3d794a (patch)
treebda7f54c443ca4632e7a2fde522d52cb0322a95e /app/helpers
parent7b06c83cf72d24edab7adcc00f4000830539506e (diff)
downloadgitlab-ce-696a7084010315078c38507cccabb236bb3d794a.tar.gz
Move rendering CI status to helper
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/ci_status_helper.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/helpers/ci_status_helper.rb b/app/helpers/ci_status_helper.rb
index dbd1e26fa79..ceafe5e8c91 100644
--- a/app/helpers/ci_status_helper.rb
+++ b/app/helpers/ci_status_helper.rb
@@ -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