debian-mirror-gitlab/app/views/projects/deployments/_actions.haml
2019-05-18 00:54:41 +05:30

14 lines
707 B
Text

- if can?(current_user, :create_deployment, deployment)
- actions = deployment.manual_actions
- if actions.present?
.btn-group
.dropdown
%button.dropdown.dropdown-new.btn.btn-default.has-tooltip{ type: 'button', 'data-toggle' => 'dropdown', title: s_('Environments|Deploy to...') }
= sprite_icon('play')
= icon('caret-down')
%ul.dropdown-menu.dropdown-menu-right
- actions.each do |action|
- next unless can?(current_user, :update_build, action)
%li
= link_to [:play, @project.namespace.becomes(Namespace), @project, action], method: :post, rel: 'nofollow', class: 'btn' do
%span= action.name