debian-mirror-gitlab/app/views/projects/deployments/_actions.haml

16 lines
704 B
Text
Raw Normal View History

2016-11-03 12:29:30 +05:30
- if can?(current_user, :create_deployment, deployment)
- actions = deployment.manual_actions
- if actions.present?
2017-08-17 22:00:37 +05:30
.btn-group
2016-11-03 12:29:30 +05:30
.dropdown
2017-08-17 22:00:37 +05:30
%button.dropdown.dropdown-new.btn.btn-default{ type: 'button', 'data-toggle' => 'dropdown' }
2016-11-03 12:29:30 +05:30
= custom_icon('icon_play')
= icon('caret-down')
%ul.dropdown-menu.dropdown-menu-align-right
- actions.each do |action|
2017-08-17 22:00:37 +05:30
- next unless can?(current_user, :update_build, action)
2016-11-03 12:29:30 +05:30
%li
= link_to [:play, @project.namespace.becomes(Namespace), @project, action], method: :post, rel: 'nofollow' do
= custom_icon('icon_play')
%span= action.name.humanize