BigW Consortium Gitlab

_actions.haml 1.13 KB
Newer Older
1 2
- if can?(current_user, :create_deployment, deployment) && deployment.deployable
  .pull-right
Filipa Lacerda committed
3
  
Filipa Lacerda committed
4
    - external_url = deployment.environment.external_url
Filipa Lacerda committed
5 6 7 8
    - if external_url
      = link_to external_url, target: '_blank', class: 'btn external-url' do
        = icon('external-link')
    
9 10
    - actions = deployment.manual_actions
    - if actions.present?
Annabel Dunstone committed
11 12 13
      .inline
        .dropdown
          %a.dropdown-new.btn.btn-default{type: 'button', 'data-toggle' => 'dropdown'}
14
            = custom_icon('icon_play')
15
            = icon('caret-down')
16 17 18 19
          %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
20
                  = custom_icon('icon_play')
Kamil Trzcinski committed
21
                  %span= action.name.humanize
22

Kamil Trzcinski committed
23
    - if local_assigns.fetch(:allow_rollback, false)
24 25
      = link_to [:retry, @project.namespace.becomes(Namespace), @project, deployment.deployable], method: :post, class: 'btn btn-build' do
        - if deployment.last?
26
          Re-deploy
27 28
        - else
          Rollback