workflow-action-definition/modal-header model=model
.ui.two.column.grid
  each model.project.sorted_workflow_groups as |workflow_group|
    .column
      .ui.top.attached.block.header: .content= workflow_group.name
      .ui.bottom.attached.segment
        .ui.list
          unless (and (eq model.workflow_group.id workflow_group.id) (eq model.position 0))
            .item
              button.ui.tiny.button{action 'position_workflow_action_definition_at_top_of' model workflow_group}
                i.right.arrow.icon
                span &nbsp; place at the top
          each workflow_group.sorted_workflow_action_definitions as |workflow_action_definition|
            .item
              .name= workflow_action_definition.name
              .target
                i.vertically.flipped.share.icon
                if (eq workflow_action_definition.id model.id)
                  button.ui.tiny.button disabled=true self
                else
                  button.ui.tiny.button{action 'position_workflow_action_definition_below' model workflow_action_definition}
                    span place at this position

.modal-actions.sticky
  button.ui.basic.button.modal-rollback{action 'close'}= t 'general.close'
  button.ui.negative.button.pull-right{action 'unassign_workflow_action_definition'} Unassign
