2024-05-30 17:06:23 +08:00
|
|
|
{% load tags %}
|
|
|
|
|
|
|
|
<div class="card-body table-border-style">
|
|
|
|
<div class="table-responsive">
|
2024-06-06 20:56:06 +08:00
|
|
|
<table class="table text-center">
|
|
|
|
{% get_verbose_field_names_from_model model_config "employee_id" as columns %}
|
2024-05-30 17:06:23 +08:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2024-06-06 20:56:06 +08:00
|
|
|
{% for column in columns %}
|
|
|
|
<th class="text-center">{{ column }}</th>
|
2024-05-30 17:06:23 +08:00
|
|
|
{% endfor %}
|
2024-06-06 20:56:06 +08:00
|
|
|
<th class="text-center">操作</th>
|
2024-05-30 17:06:23 +08:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody id="result" style="color: white;">
|
2024-06-02 13:38:07 +08:00
|
|
|
{% for item in items %}
|
2024-06-06 20:56:06 +08:00
|
|
|
<tr>
|
|
|
|
{% for field in item|get_fields:'employee_id' %}
|
|
|
|
<td class="text-center">{{ field.value }}</td>
|
2024-05-30 17:06:23 +08:00
|
|
|
{% endfor %}
|
2024-06-06 20:56:06 +08:00
|
|
|
<td class="text-center">
|
|
|
|
<a href="#" class="edit-btn" data-id="{{ item|get_pk_value }}" data-bs-toggle="modal"
|
|
|
|
data-bs-target="#addEditModal">编辑</a>
|
|
|
|
</td>
|
2024-05-30 17:06:23 +08:00
|
|
|
</tr>
|
2024-06-02 13:38:07 +08:00
|
|
|
{% empty %}
|
2024-05-30 17:12:34 +08:00
|
|
|
<tr>
|
2024-05-31 20:17:40 +08:00
|
|
|
<td class="text-center" colspan="{{ table_columns|length }}">暂无数据</td>
|
2024-05-30 17:12:34 +08:00
|
|
|
</tr>
|
2024-06-02 13:38:07 +08:00
|
|
|
{% endfor %}
|
2024-05-30 17:06:23 +08:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2024-06-04 16:50:30 +08:00
|
|
|
</div>
|