gitlab-org--gitlab-foss/app/views/projects/deployments/_actions.haml

23 lines
947 B
Text
Raw Normal View History

- if can?(current_user, :create_deployment, deployment) && deployment.deployable
.pull-right
- actions = deployment.manual_actions
- if actions.present?
2016-08-05 13:44:13 -04:00
.inline
.dropdown
%a.dropdown-new.btn.btn-default{type: 'button', 'data-toggle' => 'dropdown'}
2016-08-25 17:15:44 -04:00
= custom_icon('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
2016-08-25 17:15:44 -04:00
= custom_icon('icon_play')
2016-07-18 12:42:57 -04:00
%span= action.name.humanize
2016-07-18 13:00:55 -04:00
- if local_assigns.fetch(:allow_rollback, false)
= link_to [:retry, @project.namespace.becomes(Namespace), @project, deployment.deployable], method: :post, class: 'btn btn-build' do
- if deployment.last?
Re-deploy
- else
Rollback