2021-04-06 12:40:40 +00:00
|
|
|
<Route
|
|
|
|
@name={{routeName}}
|
|
|
|
as |route|>
|
2021-09-15 18:50:11 +00:00
|
|
|
<DataLoader @src={{
|
|
|
|
uri '/${partition}/${nspace}/${dc}/intention/${id}'
|
|
|
|
(hash
|
|
|
|
partition=route.params.partition
|
|
|
|
nspace=route.params.nspace
|
|
|
|
dc=route.params.dc
|
|
|
|
id=(or route.params.intention_id '')
|
|
|
|
)
|
|
|
|
}}
|
|
|
|
as |loader|>
|
|
|
|
|
|
|
|
<BlockSlot @name="error">
|
|
|
|
<AppError
|
|
|
|
@error={{loader.error}}
|
|
|
|
@login={{route.model.app.login.open}}
|
|
|
|
/>
|
|
|
|
</BlockSlot>
|
|
|
|
|
|
|
|
<BlockSlot @name="loaded">
|
|
|
|
{{#let
|
|
|
|
loader.data
|
|
|
|
as |item|}}
|
2021-04-06 12:40:40 +00:00
|
|
|
<AppView>
|
|
|
|
<BlockSlot @name="breadcrumbs">
|
|
|
|
<ol>
|
|
|
|
<li><a data-test-back href={{href-to 'dc.intentions'}}>All Intentions</a></li>
|
|
|
|
</ol>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h1>
|
2021-09-27 16:19:32 +00:00
|
|
|
{{#if (can "write intention" item=item)}}
|
2021-04-06 12:40:40 +00:00
|
|
|
{{#if item.ID}}
|
2021-09-15 18:50:11 +00:00
|
|
|
<route.Title @title="Edit Intention" />
|
2021-04-06 12:40:40 +00:00
|
|
|
{{else}}
|
2021-09-15 18:50:11 +00:00
|
|
|
<route.Title @title="New Intention" />
|
2021-04-06 12:40:40 +00:00
|
|
|
{{/if}}
|
2020-09-18 10:14:06 +00:00
|
|
|
{{else}}
|
2021-09-15 18:50:11 +00:00
|
|
|
<route.Title @title="View Intention" />
|
2020-09-18 10:14:06 +00:00
|
|
|
{{/if}}
|
2021-04-06 12:40:40 +00:00
|
|
|
</h1>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="content">
|
|
|
|
<Consul::Intention::Form
|
|
|
|
@item={{item}}
|
2021-09-15 18:50:11 +00:00
|
|
|
@dc={{route.params.dc}}
|
|
|
|
@nspace={{route.params.nspace}}
|
|
|
|
@partition={{route.params.partition}}
|
|
|
|
@onsubmit={{route-action 'transitionTo' 'dc.intentions.index'
|
|
|
|
(hash
|
|
|
|
dc=route.params.dc
|
|
|
|
)
|
|
|
|
}}
|
2021-04-06 12:40:40 +00:00
|
|
|
/>
|
|
|
|
</BlockSlot>
|
|
|
|
</AppView>
|
2021-09-15 18:50:11 +00:00
|
|
|
{{/let}}
|
|
|
|
</BlockSlot>
|
|
|
|
</DataLoader>
|
2021-04-06 12:40:40 +00:00
|
|
|
</Route>
|