59 lines
2.6 KiB
Handlebars
59 lines
2.6 KiB
Handlebars
<div class="card my-2 {{class}}" {{#if id}}id="{{id}}"{{/if}}>
|
|
<div class="card-body">
|
|
<div class="table-responsive" {{#if (or sort search)}}data-pre-init="table"{{/if}}>
|
|
{{#if search}}
|
|
<div class="p-2">
|
|
<input type="search" class="form-control form-control-rounded fs-6 search" placeholder="Search…">
|
|
</div>
|
|
{{/if}}
|
|
<table class="table">
|
|
{{#each_row}}
|
|
{{#if (eq @row_index 0)}}
|
|
<thead>
|
|
<tr>
|
|
{{#each this}}
|
|
{{#if (not (starts_with @key '_sqlpage_'))}}
|
|
<th class="
|
|
{{~#if (array_contains ../../align_right @key)}} text-end {{/if~}}
|
|
">
|
|
{{~#if ../../sort~}}
|
|
<button class="table-sort sort d-inline" data-sort="{{@key}}">{{@key}}</button>
|
|
{{~else~}}
|
|
{{~@key~}}
|
|
{{~/if~}}
|
|
</th>
|
|
{{/if}}
|
|
{{/each}}
|
|
</tr>
|
|
</thead>
|
|
<tbody class="table-tbody list">{{#delay}}</tbody>{{/delay}}
|
|
{{/if}}
|
|
|
|
<tr class="{{_sqlpage_css_class}} {{#if _sqlpage_color}}bg-{{_sqlpage_color}}-lt{{/if}}">
|
|
{{~#each this~}}
|
|
{{~#if (not (starts_with @key '_sqlpage_'))~}}
|
|
<td class="
|
|
{{~@key~}}
|
|
{{~#if (array_contains ../../align_right @key)
|
|
}} text-end {{
|
|
/if}} align-middle">
|
|
{{~#if (array_contains ../../markdown @key)~}}
|
|
{{{markdown this}}}
|
|
{{~else~}}
|
|
{{~#if (array_contains ../../icon @key)~}}
|
|
{{~icon_img this~}}
|
|
{{~else~}}
|
|
{{this}}
|
|
{{~/if~}}
|
|
{{~/if~}}
|
|
</td>
|
|
{{~/if~}}
|
|
{{~/each~}}
|
|
</tr>
|
|
{{/each_row}}
|
|
{{flush_delayed}}
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|