XH_Digital_Management/templates/table.html

30 lines
945 B
HTML
Raw Normal View History

2024-05-30 17:06:23 +08:00
{% 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>
{% endfor %}
</tbody>
</table>
</div>
</div>