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