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,18 +17,25 @@
<div class="col"> <div class="col">
<h4>{% trans "State Definitions" %}</h4> <h4>{% trans "State Definitions" %}</h4>
{% if state_definitions %} {% if state_definitions %}
<table class="table table-striped table-mb-4"> <table class="table table-hover table-border">
<thead> <caption>{% trans 'Move and drag state definitions to reorder' %}</caption>
<tr> <thead class="align-items-start">
<th scope="col">#</th> <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" >{% trans "State" %}</th>
<th scope="col"></th> <th scope="col" width="10%" ></th>
</tr> </tr>
</thead> </thead>
<tbody id="sortable_list"> <tbody id="sortable_list">
{% for state_definition in state_definitions %} {% for state_definition in state_definitions %}
<tr data-lookup="{{ state_definition.id }}" style="cursor: pointer;"> <tr data-lookup="{{ state_definition.id }}" class="border-bottom"" style="cursor: pointer;">
<td class="order-number">{{ state_definition.order }}</td> <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>{{ state_definition.state }}</td>
<td class="text-end"> <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 }}"> <button type="button" id="delete-btn" class="btn btn-danger btn-sm" data-bs-toggle="modal" data-bs-target="#deleteStateModal{{ state_definition.id }}">
@ -40,7 +47,6 @@
</tbody> </tbody>
</table> </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' %}"> <form id="orderingForm" method="post" action="{% url 'admin:update_state_order' %}">
{% csrf_token %} {% csrf_token %}
<input type="hidden" id="orderingInput" name="ordering"> <input type="hidden" id="orderingInput" name="ordering">