26 lines
1,017 B
HTML
26 lines
1,017 B
HTML
<table class="table table-light table-striped table-hover table-bordered border-tertiary">
|
|
<thead>
|
|
<tr>
|
|
{% for col in columns %}
|
|
<th>{{ col.label }}</th>
|
|
{% endfor %}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% if rows %}
|
|
{% for row in rows %}
|
|
<tr onclick="location.href='{{ url_for( 'crudkit.' + kwargs['opts']['object_class'] + '.get_item', id=row.id) }}'" style="cursor: pointer;">
|
|
{% for cell in row.cells %}
|
|
{% if cell.href %}
|
|
<td class="{{ cell.class or '' }}"><a href="{{ cell.href }}" class="link-success link-underline link-underline-opacity-0 fw-semibold">{{ cell.text if cell.text is not none else '-' }}</a></td>
|
|
{% else %}
|
|
<td class="{{ cell.class or '' }}">{{ cell.text if cell.text is not none else '-' }}</td>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</tr>
|
|
{% endfor %}
|
|
{% else %}
|
|
<tr><td colspan="{{ columns|length }}">No data.</td></tr>
|
|
{% endif %}
|
|
</tbody>
|
|
</table>
|