Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-12-09 00:38:29 +0300
committerDouwe Maan <douwe@gitlab.com>2015-12-09 00:38:29 +0300
commitfae08104b4f0bfb9612137a4c7313d83a8ba6d84 (patch)
tree5b9bf5629e4acc0151614d7ff7f33300420445cb /app/helpers/ci_status_helper.rb
parent065375ca2d482faac80897e42d82b3afdcb08d99 (diff)
parente616739e2fae12e5358d2cea40089a51468d9b4a (diff)
Merge branch 'master' into mr-broken
# Conflicts: # app/helpers/ci_status_helper.rb
Diffstat (limited to 'app/helpers/ci_status_helper.rb')
-rw-r--r--app/helpers/ci_status_helper.rb16
1 files changed, 14 insertions, 2 deletions
diff --git a/app/helpers/ci_status_helper.rb b/app/helpers/ci_status_helper.rb
index 599a9adc31a..8e1f8f9ba6d 100644
--- a/app/helpers/ci_status_helper.rb
+++ b/app/helpers/ci_status_helper.rb
@@ -8,6 +8,10 @@ module CiStatusHelper
ci_icon_for_status(ci_commit.status)
end
+ def ci_status_label(ci_commit)
+ ci_label_for_status(ci_commit.status)
+ end
+
def ci_status_color(ci_commit)
case ci_commit.status
when 'success'
@@ -23,7 +27,15 @@ module CiStatusHelper
def ci_status_with_icon(status)
content_tag :span, class: "ci-status ci-#{status}" do
- ci_icon_for_status(status) + '&nbsp;'.html_safe + status
+ ci_icon_for_status(status) + '&nbsp;'.html_safe + ci_label_for_status(status)
+ end
+ end
+
+ def ci_label_for_status(status)
+ if status == 'success'
+ 'passed'
+ else
+ status
end
end
@@ -46,7 +58,7 @@ module CiStatusHelper
def render_ci_status(ci_commit)
link_to ci_status_path(ci_commit),
class: "c#{ci_status_color(ci_commit)}",
- title: "Build #{ci_commit.status}",
+ title: "Build #{ci_status_label(ci_commit)}",
data: { toggle: 'tooltip', placement: 'left' } do
ci_status_icon(ci_commit)
end