summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-06-08 17:18:54 +0200
committerPhil Hughes <me@iamphill.com>2016-06-13 11:03:30 +0100
commitffe8dbde9b2aec2425e7859aeed5ad1642c53938 (patch)
treeb6c756b788cbe8a64f4c7d2a4889c3339af93ba6 /app/views
parentaea4041ce96f18afea70da15af3cbe1be4fa1f94 (diff)
downloadgitlab-ce-ffe8dbde9b2aec2425e7859aeed5ad1642c53938.tar.gz
Move keep to ArtifactsController
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/builds/_sidebar.html.haml19
1 files changed, 10 insertions, 9 deletions
diff --git a/app/views/projects/builds/_sidebar.html.haml b/app/views/projects/builds/_sidebar.html.haml
index d1a0da29ef7..e1fdd7019ff 100644
--- a/app/views/projects/builds/_sidebar.html.haml
+++ b/app/views/projects/builds/_sidebar.html.haml
@@ -44,15 +44,16 @@
%p.build-detail-row
%span.build-light-text Erased:
#{time_ago_with_tooltip(@build.erased_at)}
- - elsif @build.artifacts_expired?
- %p.build-detail-row.artifacts-expired.alert.alert-warning
- The artifacts were removed #{time_ago_with_tooltip(@build.artifacts_expire_at)}
- - elsif @build.artifacts_expire_at
- %p.build-detail-row.artifacts-expired.alert.alert-info
- The artifacts will be removed at #{time_ago_with_tooltip(@build.artifacts_expire_at)}
- .pull-right
- = link_to keep_artifacts_namespace_project_build_artifacts_path(@project.namespace, @project, @build), class: 'btn btn-sm btn-primary' do
- Keep
+ - else
+ - if @build.artifacts_expired?
+ .artifacts-expired.alert.alert-warning
+ The artifacts were removed #{time_ago_with_tooltip(@build.artifacts_expire_at)}
+ - elsif @build.artifacts_expire_at
+ .artifacts-expired.alert.alert-warning
+ The artifacts will be removed in #{duration_in_words(@build.artifacts_expire_at, Time.now)}
+ .pull-right
+ = link_to keep_namespace_project_build_artifacts_path(@project.namespace, @project, @build), class: 'btn btn-xs btn-primary', method: :post do
+ Keep
%p.build-detail-row
%span.build-light-text Runner:
- if @build.runner && current_user && current_user.admin