2018-05-22 15:03:45 +00:00
|
|
|
{{#app-view class="intention list"}}
|
2018-08-29 18:14:31 +00:00
|
|
|
{{#block-slot 'notification' as |status type|}}
|
|
|
|
{{partial 'dc/intentions/notifications'}}
|
|
|
|
{{/block-slot}}
|
2018-05-22 15:03:45 +00:00
|
|
|
{{#block-slot 'header'}}
|
|
|
|
<h1>
|
|
|
|
Intentions
|
|
|
|
</h1>
|
2018-09-21 09:18:32 +00:00
|
|
|
<label for="toolbar-toggle"></label>
|
2018-05-22 15:03:45 +00:00
|
|
|
{{/block-slot}}
|
|
|
|
{{#block-slot 'actions'}}
|
2018-07-04 16:23:33 +00:00
|
|
|
<a data-test-create href="{{href-to 'dc.intentions.create'}}" class="type-create">Create</a>
|
2018-05-22 15:03:45 +00:00
|
|
|
{{/block-slot}}
|
|
|
|
{{#block-slot 'toolbar'}}
|
|
|
|
{{#if (gt items.length 0) }}
|
|
|
|
{{intention-filter filters=actionFilters search=filters.s type=filters.action onchange=(action 'filter')}}
|
|
|
|
{{/if}}
|
|
|
|
{{/block-slot}}
|
|
|
|
{{#block-slot 'content'}}
|
|
|
|
{{#if (gt filtered.length 0) }}
|
|
|
|
{{#tabular-collection
|
|
|
|
route='dc.intentions.edit'
|
|
|
|
key='SourceName'
|
|
|
|
items=filtered as |item index|
|
|
|
|
}}
|
|
|
|
{{#block-slot 'header'}}
|
|
|
|
<th>Source</th>
|
|
|
|
<th> </th>
|
|
|
|
<th>Destination</th>
|
|
|
|
<th>Precedence</th>
|
|
|
|
{{/block-slot}}
|
|
|
|
{{#block-slot 'row'}}
|
2018-06-22 13:29:18 +00:00
|
|
|
<td class="source" data-test-intention="{{item.ID}}">
|
2018-07-04 12:21:30 +00:00
|
|
|
<a href={{href-to 'dc.intentions.edit' item.ID}} data-test-intention-source="{{item.SourceName}}">
|
2018-06-22 13:29:18 +00:00
|
|
|
{{#if (eq item.SourceName '*') }}
|
|
|
|
All Services (*)
|
|
|
|
{{else}}
|
|
|
|
{{item.SourceName}}
|
|
|
|
{{/if}}
|
|
|
|
</a>
|
2018-05-22 15:03:45 +00:00
|
|
|
</td>
|
2018-07-04 12:21:30 +00:00
|
|
|
<td class="intent-{{item.Action}}" data-test-intention-action="{{item.Action}}">
|
2018-05-22 15:03:45 +00:00
|
|
|
<strong>{{item.Action}}</strong>
|
|
|
|
</td>
|
2018-07-04 12:21:30 +00:00
|
|
|
<td class="destination" data-test-intention-destination="{{item.DestinationName}}">
|
2018-06-22 13:29:18 +00:00
|
|
|
{{#if (eq item.DestinationName '*') }}
|
|
|
|
All Services (*)
|
|
|
|
{{else}}
|
|
|
|
{{item.DestinationName}}
|
|
|
|
{{/if}}
|
2018-05-22 15:03:45 +00:00
|
|
|
</td>
|
2018-06-22 13:29:18 +00:00
|
|
|
<td class="precedence">
|
2018-05-22 15:03:45 +00:00
|
|
|
{{item.Precedence}}
|
|
|
|
</td>
|
|
|
|
{{/block-slot}}
|
|
|
|
{{#block-slot 'actions' as |index change checked|}}
|
|
|
|
{{#confirmation-dialog confirming=false index=index message='Are you sure you want to delete this intention?'}}
|
|
|
|
{{#block-slot 'action' as |confirm|}}
|
|
|
|
{{#action-group index=index onchange=(action change) checked=(if (eq checked index) 'checked')}}
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
<a href={{href-to 'dc.intentions.edit' item.ID}}>Edit</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
2018-07-04 14:58:09 +00:00
|
|
|
<a data-test-delete onclick={{action confirm 'delete' item}}>Delete</a>
|
2018-05-22 15:03:45 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
{{/action-group}}
|
|
|
|
{{/block-slot}}
|
|
|
|
{{#block-slot 'dialog' as |execute cancel message|}}
|
2018-10-19 15:17:02 +00:00
|
|
|
{{delete-confirmation message=message execute=execute cancel=cancel}}
|
2018-05-22 15:03:45 +00:00
|
|
|
{{/block-slot}}
|
|
|
|
{{/confirmation-dialog}}
|
|
|
|
{{/block-slot}}
|
|
|
|
{{/tabular-collection}}
|
|
|
|
{{else}}
|
|
|
|
<p>
|
|
|
|
There are no intentions.
|
|
|
|
</p>
|
|
|
|
{{/if}}
|
|
|
|
{{/block-slot}}
|
|
|
|
{{/app-view}}
|