gitlab-org--gitlab-foss/app/views/projects/deployments/_rollback.haml
Andrew Fontaine ba98e91c06 Add Component to Confirm Environment Rollback
Ensure a vue.js component to confirm the re-deployment/rollback of an
environment pops up when rollback/re-deploy has been clicked so the user
must confirm their actions before accidentally rolling back or
re-deploying an environment.

Only on the `environment-table` view.
2019-03-05 18:33:10 +00:00

8 lines
527 B
Text

- if can?(current_user, :create_deployment, deployment)
- tooltip = deployment.last? ? s_('Environments|Re-deploy to environment') : s_('Environments|Rollback environment')
= button_tag class: 'btn btn-default btn-build has-tooltip', type: 'button', data: { toggle: 'modal', target: "#confirm-rollback-modal-#{deployment.id}" }, title: tooltip do
- if deployment.last?
= sprite_icon('repeat')
- else
= sprite_icon('redo')
= render 'projects/deployments/confirm_rollback_modal', deployment: deployment