summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-10-12 15:45:46 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2015-10-12 15:55:12 +0200
commit69c04498ef0a49186a667fd44383b9b43690a91e (patch)
treee258463d00c42f296d4048f44b8743eb98161567 /app/views
parent0aefeeb882b40d740b80f15ac6610a88a340d30b (diff)
downloadgitlab-ce-69c04498ef0a49186a667fd44383b9b43690a91e.tar.gz
Small bug fixes
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/commit_statuses/_commit_status.html.haml16
1 files changed, 8 insertions, 8 deletions
diff --git a/app/views/projects/commit_statuses/_commit_status.html.haml b/app/views/projects/commit_statuses/_commit_status.html.haml
index f79929c70bf..14b814bb0d6 100644
--- a/app/views/projects/commit_statuses/_commit_status.html.haml
+++ b/app/views/projects/commit_statuses/_commit_status.html.haml
@@ -9,7 +9,7 @@
- else
%strong Build ##{commit_status.id}
- - if defined?(ref)
+ - if defined?(ref) && ref
%td
= commit_status.ref
@@ -17,7 +17,7 @@
= commit_status.stage
%td
- = commit_status.description
+ = commit_status.name
.pull-right
- if commit_status.tags.any?
- commit_status.tags.each do |tag|
@@ -36,17 +36,17 @@
- if commit_status.finished_at
%span #{time_ago_in_words commit_status.finished_at} ago
- - if defined?(coverage)
+ - if defined?(coverage) && coverage
%td.coverage
- if commit_status.try(:coverage)
#{commit_status.coverage}%
%td
- - if defined?(controls) && current_user && can?(current_user, :manage_builds, gl_project)
+ - if defined?(controls) && controls && current_user && can?(current_user, :manage_builds, gl_project)
.pull-right
- - if commit_status.active?
- = link_to cancel_namespace_project_build_path(gl_project.namespace, gl_project, commit_status, return_to: request.original_url), title: 'Cancel commit_status' do
+ - if commit_status.cancel_url
+ = link_to commit_status.cancel_url, title: 'Cancel' do
%i.fa.fa-remove.cred
- - elsif commit_status.commands.present?
- = link_to retry_namespace_project_build_path(gl_project.namespace, gl_project, commit_status, return_to: request.original_url), method: :post, title: 'Retry commit_status' do
+ - elsif commit_status.retry_url
+ = link_to commit_status.retry_url, method: :post, title: 'Retry' do
%i.fa.fa-repeat