2016-07-16 19:48:51 -04:00
|
|
|
- if can?(current_user, :create_deployment, deployment) && deployment.deployable
|
|
|
|
.pull-right
|
|
|
|
- actions = deployment.manual_actions
|
|
|
|
- if actions.present?
|
|
|
|
.btn-group.inline
|
|
|
|
.btn-group
|
|
|
|
%a.dropdown-toggle.btn.btn-default{type: 'button', 'data-toggle' => 'dropdown'}
|
|
|
|
= icon("play")
|
|
|
|
%b.caret
|
|
|
|
%ul.dropdown-menu.dropdown-menu-align-right
|
|
|
|
- actions.each do |action|
|
|
|
|
%li
|
|
|
|
= link_to [:play, @project.namespace.becomes(Namespace), @project, action], method: :post, rel: 'nofollow' do
|
|
|
|
= icon("play")
|
2016-07-18 08:56:22 -04:00
|
|
|
%span= action.name.capitalize
|
2016-07-16 19:48:51 -04:00
|
|
|
|
|
|
|
- if defined?(allow_rollback) && allow_rollback
|
|
|
|
= link_to [:retry, @project.namespace.becomes(Namespace), @project, deployment.deployable], method: :post, class: 'btn btn-build' do
|
|
|
|
- if deployment.last?
|
|
|
|
Retry
|
|
|
|
- else
|
|
|
|
Rollback
|