summaryrefslogtreecommitdiff
path: root/app/views/projects
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2017-02-17 13:05:00 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2017-02-17 13:05:00 +0000
commit5213ef23876e022b1303129c968f9af8f7904351 (patch)
tree93d046de73a381d47b9a44383f8407eb2813268c /app/views/projects
parent29d5a7ab75e224797d014c8954d086cd898a2304 (diff)
parent0e21f5426782cd780c703346d27f0b1edd1dccd8 (diff)
downloadgitlab-ce-5213ef23876e022b1303129c968f9af8f7904351.tar.gz
Merge branch 'fix/gb/pipeline-retry-cancel-buttons-consistency' into 'master'
Fix pipeline retry and cancel buttons on pipeline details page See merge request !9225
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/pipelines/_info.html.haml4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/projects/pipelines/_info.html.haml b/app/views/projects/pipelines/_info.html.haml
index a6cd2d83bd5..e0c972aa2fb 100644
--- a/app/views/projects/pipelines/_info.html.haml
+++ b/app/views/projects/pipelines/_info.html.haml
@@ -7,9 +7,9 @@
= commit_author_link(@commit)
.header-action-buttons
- if can?(current_user, :update_pipeline, @pipeline.project)
- - if @pipeline.builds.latest.failed.any?(&:retryable?)
+ - if @pipeline.retryable?
= link_to "Retry failed", retry_namespace_project_pipeline_path(@pipeline.project.namespace, @pipeline.project, @pipeline.id), class: 'btn btn-inverted-secondary', method: :post
- - if @pipeline.builds.running_or_pending.any?
+ - if @pipeline.cancelable?
= link_to "Cancel running", cancel_namespace_project_pipeline_path(@pipeline.project.namespace, @pipeline.project, @pipeline.id), data: { confirm: 'Are you sure?' }, class: 'btn btn-danger', method: :post
- if @commit