106 lines
4.3 KiB
HTML
106 lines
4.3 KiB
HTML
{% extends 'base.html' %}
|
|
|
|
{% block titulo %}Grupos de Trabajo{% endblock %}
|
|
|
|
{% block vertical %} {% include 'partes/vertical.html' %} {% endblock %}
|
|
{% block horizontal %} {% include 'partes/horizontal.html' %} {% endblock %}
|
|
|
|
{% block seccion %}
|
|
<div class="d-flex align-items-left align-items-md-center flex-column flex-md-row pt-2 pb-5">
|
|
<div>
|
|
<h3 class="fw-bold mb-2">Grupos de Trabajo</h3>
|
|
<h6 class="op-7 mb-1">Servicio de Transporte del Ejército Bolivariano</h6>
|
|
</div>
|
|
<div class="ms-md-auto py-1">
|
|
<a href="{% url 'crear_subjefe' %}" class="btn btn-primary fw-bold rounded-4">Crear Jefe de Grupo</a>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block contenido %}
|
|
{% load humanize %}
|
|
|
|
<div class="card shadow-sm rounded-3 border-0">
|
|
<div class="card-header bg-primary py-2 rounded-top">
|
|
<h5 class="card-title mb-0 text-white fw-bold"><i class="fas fa-box me-3"></i>Lista de Grupos de Trabajo</h5>
|
|
</div>
|
|
<div class="card-body p-2">
|
|
<div class="table-responsive">
|
|
<table id="gruposTable" class="table table-sm table-striped">
|
|
<thead style="background-color: #f8f9fa;">
|
|
<tr>
|
|
<th class="text-center py-1">N°</th>
|
|
<th class="py-1">Grado</th>
|
|
<th class="py-1">Nombres y Apellidos</th>
|
|
<th class="py-1">Cargo</th>
|
|
<th class="py-1">Director</th>
|
|
<th class="text-center py-1">Acciones</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for subjefe in subjefes %}
|
|
<tr>
|
|
<td class="text-center py-1 fw-bold">{{ forloop.counter }}</td>
|
|
<td class="py-1">{{ subjefe.grado|default:"-" }}</td>
|
|
<td class="py-1">{{ subjefe.nombres|default:"-" }}</td>
|
|
<td class="py-1">{{ subjefe.cargos|default:"-" }}</td>
|
|
<td class="py-1">{{ subjefe.director|default:"-" }}</td>
|
|
<td class="text-center py-1">
|
|
<div class="d-flex justify-content-center gap-1">
|
|
<a href="{% url 'editar_subjefe' subjefe.pk %}" class="btn btn-primary btn-xs async-link" data-url="{% url 'editar_subjefe' subjefe.pk %}" title="Editar">
|
|
<i class="fas fa-pen fa-xs"></i>
|
|
</a>
|
|
<form action="{% url 'eliminar_subjefe' subjefe.pk %}" method="post" class="d-inline delete-form">
|
|
{% csrf_token %}
|
|
<button type="submit" class="btn btn-danger btn-xs" title="Eliminar">
|
|
<i class="fas fa-trash fa-xs"></i>
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="10" class="text-center py-1">No hay grupos de trabajo registrados</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block js %}
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
$('#gruposTable').DataTable({
|
|
"language": {
|
|
"decimal": "",
|
|
"emptyTable": "No hay datos disponibles",
|
|
"info": "Mostrando _START_ a _END_ de _TOTAL_ registros",
|
|
"infoEmpty": "Mostrando 0 a 0 de 0 registros",
|
|
"infoFiltered": "(filtrado de _MAX_ registros totales)",
|
|
"lengthMenu": "Mostrar _MENU_ registros",
|
|
"loadingRecords": "Cargando...",
|
|
"processing": "Procesando...",
|
|
"search": "Buscar:",
|
|
"zeroRecords": "No se encontraron registros",
|
|
"paginate": {
|
|
"first": "Primero",
|
|
"last": "Último",
|
|
"next": "Siguiente",
|
|
"previous": "Anterior"
|
|
}
|
|
},
|
|
"pageLength": 10,
|
|
"searching": true,
|
|
"paging": true,
|
|
"ordering": false,
|
|
"info": false,
|
|
"lengthChange": true
|
|
});
|
|
});
|
|
</script>
|
|
{% endblock %} |