34 lines
1.1 KiB
HTML
34 lines
1.1 KiB
HTML
{% load tags %}
|
|
|
|
<div class="card-body table-border-style">
|
|
<div class="table-responsive">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
{% for column in table_columns %}
|
|
<th>{{ column.header }}</th>
|
|
{% endfor %}
|
|
</tr>
|
|
</thead>
|
|
<tbody id="result" style="color: white;">
|
|
{% for item in items %}
|
|
<tr>
|
|
{% for column in table_columns %}
|
|
{% if column.field == 'actions' %}
|
|
<td>
|
|
<a href="#">编辑</a>
|
|
</td>
|
|
{% else %}
|
|
<td>{{ item|getattr_filter:column.field }}</td>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td class="text-center" colspan="{{ table_columns|length }}">暂无数据</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div> |