=link_to[:play,@project.namespace.becomes(Namespace),@project,deployment.close_action],method: :post,rel: 'nofollow',data: {confirm: 'Are you sure you want to close this environment?'}do
=link_to'Close',namespace_project_environment_path(@project.namespace,@project,@environment),data: {confirm: 'Are you sure you want to delete this environment?'},class: 'btn btn-danger',method: :delete
=link_to'Close',[:play,@project.namespace.becomes(Namespace),@project,last_deployment.close_action],data: {confirm: 'Are you sure you want to close this environment?'},class: 'btn btn-danger',method: :post
=link_to'Destroy',namespace_project_environment_path(@project.namespace,@project,@environment),data: {confirm: 'Are you sure you want to delete this environment?'},class: 'btn btn-danger',method: :delete
=icon('external-link',text: "View on #{external_url.gsub(/\A.*?:\/\//,'')}",right: true)
%span.close-env-container
=link_to'#',class: 'close-evn-link'do
-ifenvironment.closeable?
=link_to[:play,@project.namespace.becomes(Namespace),@project,environment.close_action],method: :post,class: 'close-evn-link',rel: 'nofollow',data: {confirm: 'Are you sure you want to close this environment?'}do