mirror of https://github.com/rancher/ui.git
47 lines
1.6 KiB
Handlebars
47 lines
1.6 KiB
Handlebars
<div class="pipeline-steps">
|
|
<div class="steps-line"></div>
|
|
<div class="steps-head-dot js-dragHandle {{dotClass}}" class={{if stagesDraggable 'draggable' ''}}></div>
|
|
<div class="steps-wrap">
|
|
{{#if stepsDraggble}}
|
|
{{#sortable-objects
|
|
class=(if stagesDraggable 'draggable' '')
|
|
sortableObjectList=model
|
|
enableSort=true
|
|
sortingScope=sortingScope}}
|
|
{{#each model as |item index|}}
|
|
{{#draggable-object
|
|
isDraggable=false
|
|
class="step-content"
|
|
content=item
|
|
overrideClass='sortObject'
|
|
isSortable=true
|
|
sortingScope=sortingScope
|
|
dragStartAction="dragStart"
|
|
dragStartHook=(action 'startHook')
|
|
dragEndHook=(action "dragEnd")
|
|
}}
|
|
<div class="step-name text-muted" {{action 'editStep' index}}>
|
|
{{pipeline-step model=item }}
|
|
</div>
|
|
{{/draggable-object}}
|
|
{{/each}}
|
|
{{/sortable-objects}}
|
|
{{else}}
|
|
{{#each model as |item index|}}
|
|
<div class="step-content">
|
|
<div class="step-name text-muted" {{action 'editStep' index}}>
|
|
{{pipeline-step model=item}}
|
|
</div>
|
|
</div>
|
|
{{/each}}
|
|
{{/if}}
|
|
{{#if editable}}
|
|
{{#unless (eq stepMode 'scm')}}
|
|
<button class="mt-10 btn bg-link icon-btn p-0" {{action 'addStep'}} style="margin: 0 auto;">
|
|
<span class="darken"><i class="icon icon-plus text-small"/></span>
|
|
<span>{{t 'newPipelineStage.addStep'}}</span>
|
|
</button>
|
|
{{/unless}}
|
|
{{/if}}
|
|
</div>
|
|
</div> |