fix: corregir layout de dashboard, resiliencia en filtros de asignaturas y paginacion de bd (v3.8.12)
This commit is contained in:
@@ -327,35 +327,36 @@
|
||||
|
||||
<!-- Pagination -->
|
||||
{% if pagination.pages > 1 %}
|
||||
<div class="d-flex justify-content-center py-3">
|
||||
<nav>
|
||||
<div class="card-footer bg-body-tertiary border-0 py-3 d-flex flex-column flex-md-row justify-content-between align-items-center gap-2">
|
||||
<small class="text-muted">
|
||||
Mostrando página <strong>{{ pagination.page }}</strong> de <strong>{{ pagination.pages }}</strong> (Total: <strong>{{ pagination.total }}</strong> comisiones)
|
||||
</small>
|
||||
<nav aria-label="Commissions pagination">
|
||||
<ul class="pagination pagination-sm mb-0">
|
||||
{% if pagination.has_prev %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="/admin/commissions_list">
|
||||
<i class="bi bi-chevron-left"></i>
|
||||
<li class="page-item {% if not pagination.has_prev %}disabled{% endif %}">
|
||||
<a class="page-link" href="/admin/commissions_list?page={{ pagination.page - 1 }}{% if search %}&search={{ search }}{% endif %}{% if subject_filter %}&subject_id={{ subject_filter }}{% endif %}{% if career_filter %}&career_id={{ career_filter }}{% endif %}{% if shift_filter %}&shift={{ shift_filter }}{% endif %}{% if active_filter %}&active={{ active_filter }}{% endif %}">
|
||||
<i class="bi bi-chevron-left me-1"></i>Anterior
|
||||
</a>
|
||||
</li>
|
||||
{% for pg in pagination.pages_list %}
|
||||
<li class="page-item {% if pg == pagination.page %}active{% endif %}">
|
||||
<a class="page-link" href="/admin/commissions_list?page={{ pg }}{% if search %}&search={{ search }}{% endif %}{% if subject_filter %}&subject_id={{ subject_filter }}{% endif %}{% if career_filter %}&career_id={{ career_filter }}{% endif %}{% if shift_filter %}&shift={{ shift_filter }}{% endif %}{% if active_filter %}&active={{ active_filter }}{% endif %}">
|
||||
{{ pg }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% for pg in pagination.iter_pages(left_edge=1, right_edge=1, left_current=2, right_current=2) %}
|
||||
{% if pg %}
|
||||
<li class="page-item {% if pg == pagination.page %}active{% endif %}">
|
||||
<a class="page-link" href="/admin/commissions_list">{{ pg }}</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="page-item disabled"><span class="page-link">…</span></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if pagination.has_next %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="/admin/commissions_list">
|
||||
<i class="bi bi-chevron-right"></i>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="page-item {% if not pagination.has_next %}disabled{% endif %}">
|
||||
<a class="page-link" href="/admin/commissions_list?page={{ pagination.page + 1 }}{% if search %}&search={{ search }}{% endif %}{% if subject_filter %}&subject_id={{ subject_filter }}{% endif %}{% if career_filter %}&career_id={{ career_filter }}{% endif %}{% if shift_filter %}&shift={{ shift_filter }}{% endif %}{% if active_filter %}&active={{ active_filter }}{% endif %}">
|
||||
Siguiente<i class="bi bi-chevron-right ms-1"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
{% elif pagination and pagination.total > 0 %}
|
||||
<div class="card-footer bg-body-tertiary border-0 py-2 d-flex justify-content-between align-items-center">
|
||||
<small class="text-muted">Total: <strong>{{ pagination.total }}</strong> comisiones registradas</small>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
|
||||
@@ -229,33 +229,36 @@
|
||||
|
||||
<!-- Paginación -->
|
||||
{% if pagination.pages > 1 %}
|
||||
<div class="card-footer bg-body-tertiary border-0 py-2">
|
||||
<div class="card-footer bg-body-tertiary border-0 py-3 d-flex flex-column flex-md-row justify-content-between align-items-center gap-2">
|
||||
<small class="text-muted">
|
||||
Mostrando página <strong>{{ pagination.page }}</strong> de <strong>{{ pagination.pages }}</strong> (Total: <strong>{{ pagination.total }}</strong> asignaturas)
|
||||
</small>
|
||||
<nav aria-label="Subjects pagination">
|
||||
<ul class="pagination pagination-sm justify-content-center mb-0">
|
||||
{% if pagination.has_prev %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="/admin/subjects_list">Anterior</a>
|
||||
<ul class="pagination pagination-sm mb-0">
|
||||
<li class="page-item {% if not pagination.has_prev %}disabled{% endif %}">
|
||||
<a class="page-link" href="/admin/subjects_list?page={{ pagination.page - 1 }}{% if search %}&search={{ search }}{% endif %}{% if career_filter %}&career_id={{ career_filter }}{% endif %}{% if active_filter %}&active={{ active_filter }}{% endif %}">
|
||||
« Anterior
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% for p in pagination.iter_pages(left_edge=2, right_edge=2, left_current=2, right_current=2) %}
|
||||
{% if p %}
|
||||
<li class="page-item {% if p == pagination.page %}active{% endif %}">
|
||||
<a class="page-link" href="/admin/subjects_list">{{ p }}</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="page-item disabled"><span class="page-link">…</span></li>
|
||||
{% endif %}
|
||||
{% for p in pagination.pages_list %}
|
||||
<li class="page-item {% if p == pagination.page %}active{% endif %}">
|
||||
<a class="page-link" href="/admin/subjects_list?page={{ p }}{% if search %}&search={{ search }}{% endif %}{% if career_filter %}&career_id={{ career_filter }}{% endif %}{% if active_filter %}&active={{ active_filter }}{% endif %}">
|
||||
{{ p }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
||||
{% if pagination.has_next %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="/admin/subjects_list">Siguiente</a>
|
||||
<li class="page-item {% if not pagination.has_next %}disabled{% endif %}">
|
||||
<a class="page-link" href="/admin/subjects_list?page={{ pagination.page + 1 }}{% if search %}&search={{ search }}{% endif %}{% if career_filter %}&career_id={{ career_filter }}{% endif %}{% if active_filter %}&active={{ active_filter }}{% endif %}">
|
||||
Siguiente »
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
{% elif pagination and pagination.total > 0 %}
|
||||
<div class="card-footer bg-body-tertiary border-0 py-2 d-flex justify-content-between align-items-center">
|
||||
<small class="text-muted">Total: <strong>{{ pagination.total }}</strong> asignaturas registradas</small>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -231,24 +231,35 @@
|
||||
|
||||
<!-- Pagination -->
|
||||
{% if pagination and pagination.pages > 1 %}
|
||||
<div class="card-footer bg-body-tertiary border-0 py-2 d-flex justify-content-center">
|
||||
<ul class="pagination pagination-sm mb-0">
|
||||
{% if pagination.has_prev %}
|
||||
<li class="page-item"><a class="page-link" href="/admin/users_list">«</a></li>
|
||||
{% endif %}
|
||||
{% for p in pagination.iter_pages(left_edge=1, right_edge=1, left_current=2, right_current=2) %}
|
||||
{% if p %}
|
||||
<div class="card-footer bg-body-tertiary border-0 py-3 d-flex flex-column flex-md-row justify-content-between align-items-center gap-2">
|
||||
<small class="text-muted">
|
||||
Mostrando página <strong>{{ pagination.page }}</strong> de <strong>{{ pagination.pages }}</strong> (Total: <strong>{{ pagination.total }}</strong> usuarios registrados)
|
||||
</small>
|
||||
<nav aria-label="Navegación de usuarios">
|
||||
<ul class="pagination pagination-sm mb-0">
|
||||
<li class="page-item {% if not pagination.has_prev %}disabled{% endif %}">
|
||||
<a class="page-link" href="/admin/users_list?page={{ pagination.page - 1 }}{% if search %}&search={{ search }}{% endif %}{% if role_filter %}&role={{ role_filter }}{% endif %}{% if status_filter %}&status={{ status_filter }}{% endif %}">
|
||||
« Anterior
|
||||
</a>
|
||||
</li>
|
||||
{% for p in pagination.pages_list %}
|
||||
<li class="page-item {% if p == pagination.page %}active{% endif %}">
|
||||
<a class="page-link" href="/admin/users_list">{{ p }}</a>
|
||||
<a class="page-link" href="/admin/users_list?page={{ p }}{% if search %}&search={{ search }}{% endif %}{% if role_filter %}&role={{ role_filter }}{% endif %}{% if status_filter %}&status={{ status_filter }}{% endif %}">
|
||||
{{ p }}
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="page-item disabled"><span class="page-link">…</span></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if pagination.has_next %}
|
||||
<li class="page-item"><a class="page-link" href="/admin/users_list">»</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
<li class="page-item {% if not pagination.has_next %}disabled{% endif %}">
|
||||
<a class="page-link" href="/admin/users_list?page={{ pagination.page + 1 }}{% if search %}&search={{ search }}{% endif %}{% if role_filter %}&role={{ role_filter }}{% endif %}{% if status_filter %}&status={{ status_filter }}{% endif %}">
|
||||
Siguiente »
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
{% elif pagination and pagination.total > 0 %}
|
||||
<div class="card-footer bg-body-tertiary border-0 py-2 d-flex justify-content-between align-items-center">
|
||||
<small class="text-muted">Total: <strong>{{ pagination.total }}</strong> usuarios registrados</small>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user