2023-03-14 13:18:55 +00:00
|
|
|
{{!
|
|
|
|
Copyright (c) HashiCorp, Inc.
|
|
|
|
SPDX-License-Identifier: MPL-2.0
|
|
|
|
}}
|
|
|
|
|
2018-10-19 15:17:02 +00:00
|
|
|
{{yield}}
|
2019-05-01 18:09:29 +00:00
|
|
|
<table class="with-details has-actions">
|
2018-10-19 15:17:02 +00:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2020-02-19 19:26:38 +00:00
|
|
|
<YieldSlot @name="header">{{yield}}</YieldSlot>
|
2018-10-19 15:17:02 +00:00
|
|
|
<th class="actions">Actions</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2020-06-17 13:19:50 +00:00
|
|
|
{{#let (concat 'tabular-details-' name '-toggle-' guid '_') as |inputId|}}
|
2018-10-19 15:17:02 +00:00
|
|
|
{{#each items as |item index|}}
|
|
|
|
<tr data-test-tabular-row onclick={{action 'click'}}>
|
2020-02-19 19:26:38 +00:00
|
|
|
<YieldSlot @name="row">{{yield item index}}</YieldSlot>
|
2018-10-19 15:17:02 +00:00
|
|
|
<td class="actions">
|
2019-04-08 10:17:30 +00:00
|
|
|
<label for={{concat inputId index}}><span>Show details</span></label>
|
2018-10-19 15:17:02 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td colspan="3">
|
2019-05-01 18:09:29 +00:00
|
|
|
<input type="checkbox" checked={{ not (is-empty item.closed) }} value={{index}} name={{name}} id={{concat inputId index}} onchange={{action 'change' item items}} />
|
2018-10-19 15:17:02 +00:00
|
|
|
<div>
|
2019-04-08 10:17:30 +00:00
|
|
|
<label for={{concat inputId index}}><span>Hide details</span></label>
|
2018-10-19 15:17:02 +00:00
|
|
|
<div>
|
2020-02-19 19:26:38 +00:00
|
|
|
<YieldSlot @name="details">
|
2018-10-19 15:17:02 +00:00
|
|
|
{{yield item index}}
|
2020-02-19 19:26:38 +00:00
|
|
|
</YieldSlot>
|
2018-10-19 15:17:02 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{/each}}
|
2020-06-17 13:19:50 +00:00
|
|
|
{{/let}}
|
2018-10-19 15:17:02 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|