2020-04-06 18:52:42 +00:00
|
|
|
<button {{action "toggleOpen"}} class="toggle-button {{if hasPendingAllocations "is-loading"}}" data-test-task-group-name>
|
2020-03-24 23:22:16 +00:00
|
|
|
{{x-icon (if isOpen "chevron-down" "chevron-right")}}
|
|
|
|
{{taskGroup.name}}
|
|
|
|
</button>
|
|
|
|
{{#if isOpen}}
|
|
|
|
<ul class="task-list">
|
2020-04-06 18:52:42 +00:00
|
|
|
{{#each sortedTasks as |task|}}
|
2020-03-24 23:22:16 +00:00
|
|
|
{{#if openInNewWindow}}
|
|
|
|
<a {{on "click" (action "openInNewWindow" taskGroup.job taskGroup task)}} class="task-item" data-test-task>
|
2020-06-01 19:03:56 +00:00
|
|
|
<Exec::TaskContents
|
|
|
|
@task={{task}}
|
|
|
|
@active={{and currentRouteIsThisTaskGroup (eq task.name activeTaskName)}}
|
|
|
|
@openInNewWindow={{openInNewWindow}} />
|
2020-03-24 23:22:16 +00:00
|
|
|
</a>
|
|
|
|
{{else}}
|
2020-06-01 19:03:56 +00:00
|
|
|
<LinkTo @route="exec.task-group.task" @models={{array taskGroup.job.plainId taskGroup.name task.name}} class="task-item" data-test-task={{true}}>
|
|
|
|
<Exec::TaskContents
|
|
|
|
@task={{task}}
|
|
|
|
@active={{and currentRouteIsThisTaskGroup (eq task.name activeTaskName)}}
|
|
|
|
@openInNewWindow={{openInNewWindow}} />
|
|
|
|
</LinkTo>
|
2020-03-24 23:22:16 +00:00
|
|
|
{{/if}}
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
{{/if}}
|