statedefinitions list updated

This commit is contained in:
Thomas Nahuel Rusiecki 2024-12-12 16:10:07 -03:00
parent 3aae9cc87f
commit 6e952e8643

View file

@ -17,30 +17,36 @@
<div class="col">
<h4>{% trans "State Definitions" %}</h4>
{% if state_definitions %}
<table class="table table-striped table-mb-4">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">{% trans "State" %}</th>
<th scope="col"></th>
<table class="table table-hover table-border">
<caption>{% trans 'Move and drag state definitions to reorder' %}</caption>
<thead class="align-items-start">
<tr class="table-active">
<th scope="col" width="1%"></th>
<th scope="col" width="7%">#</th>
<th scope="col" >{% trans "State" %}</th>
<th scope="col" width="10%" ></th>
</tr>
</thead>
<tbody id="sortable_list">
{% for state_definition in state_definitions %}
<tr data-lookup="{{ state_definition.id }}" style="cursor: pointer;">
<td class="order-number">{{ state_definition.order }}</td>
<tr data-lookup="{{ state_definition.id }}" class="border-bottom"" style="cursor: pointer;">
<td>
<i class="bi bi-grip-vertical text-muted me-3" aria-hidden="true"></i>
</td>
<td class="fw-bold">
{{ state_definition.order }}
</td>
<td>{{ state_definition.state }}</td>
<td class="text-end">
<button type="button" id="delete-btn" class="btn btn-danger btn-sm" data-bs-toggle="modal" data-bs-target="#deleteStateModal{{ state_definition.id }}">
<i class="bi bi-trash"></i>
</button>
</td>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<p class="text-end transparent">{% trans "Move and drag state definitions to reorder" %}</p>
<form id="orderingForm" method="post" action="{% url 'admin:update_state_order' %}">
{% csrf_token %}
<input type="hidden" id="orderingInput" name="ordering">