feat(i18n & ux): auditoria, traduccion completa, correcciones ux y gestion de idioma en perfil

This commit is contained in:
Carlos Tello
2026-09-02 23:45:13 -03:00
parent 3d4e9992f8
commit d1d4be0428
31 changed files with 2356 additions and 488 deletions
+25 -25
View File
@@ -1,6 +1,6 @@
{% extends "base.html" %}
{% block title %}Classrooms - Edu-Space Admin{% endblock %}
{% block title %}{% trans %}Classrooms{% endtrans %} - Edu-Space Admin{% endblock %}
{% block content %}
<div class="container-fluid pt-5 mt-4">
@@ -8,11 +8,11 @@
<div class="col-12">
<div class="d-flex justify-content-between align-items-center mb-4">
<h1 class="h3">
<i class="bi bi-door-open text-primary"></i> Classrooms
<i class="bi bi-door-open text-primary"></i> {% trans %}Classrooms{% endtrans %}
</h1>
<div>
<a href="{{ url_for('classrooms.add_classroom') }}" class="btn btn-primary">
<i class="bi bi-plus-circle"></i> Add Classroom
<i class="bi bi-plus-circle"></i> {% trans %}Add Classroom{% endtrans %}
</a>
</div>
</div>
@@ -27,24 +27,24 @@
<form method="GET" class="row g-3">
<div class="col-md-4">
<input type="text" name="search" class="form-control"
placeholder="Search by building, room, description..."
placeholder="{% trans %}Search by building, room, description...{% endtrans %}"
value="{{ search }}">
</div>
<div class="col-md-3">
<div class="form-check">
<div class="form-check pt-2">
<input class="form-check-input" type="checkbox" name="active_only"
id="activeOnly" {% if active_only %}checked{% endif %}>
<label class="form-check-label" for="activeOnly">
Show active classrooms only
{% trans %}Show active classrooms only{% endtrans %}
</label>
</div>
</div>
<div class="col-md-3">
<button type="submit" class="btn btn-outline-primary">
<i class="bi bi-search"></i> Search
<i class="bi bi-search"></i> {% trans %}Search{% endtrans %}
</button>
<a href="{{ url_for('classrooms.list_classrooms') }}" class="btn btn-outline-secondary">
<i class="bi bi-x-circle"></i> Clear
<i class="bi bi-x-circle"></i> {% trans %}Clear{% endtrans %}
</a>
</div>
</form>
@@ -63,24 +63,24 @@
<div class="d-flex justify-content-between align-items-start mb-3">
<div>
<h5 class="card-title mb-1">
{{ classroom.code }}
{{ classroom.code_display }}
</h5>
<p class="text-muted small mb-2">
<i class="bi bi-geo-alt"></i> {{ classroom.get_full_location() }}
</p>
</div>
<span class="badge {% if classroom.is_active %}bg-success{% else %}bg-secondary{% endif %}">
{% if classroom.is_active %}Active{% else %}Inactive{% endif %}
{% if classroom.is_active %}{% trans %}Active{% endtrans %}{% else %}{% trans %}Inactive{% endtrans %}{% endif %}
</span>
</div>
<div class="row small">
<div class="col-6">
<span class="text-muted">Capacity:</span>
<span class="text-muted">{% trans %}Capacity{% endtrans %}:</span>
<strong>{{ classroom.capacity }}</strong>
</div>
<div class="col-6">
<span class="text-muted">Building:</span>
<span class="text-muted">{% trans %}Building{% endtrans %}:</span>
<strong>{{ classroom.building }}</strong>
</div>
</div>
@@ -96,24 +96,24 @@
<small class="text-muted">
<i class="bi bi-tools"></i>
{% if classroom.resources %}
{{ classroom.resources|length }} resources
{{ classroom.resources|length }} {% trans %}resources{% endtrans %}
{% else %}
No resources registered
{% trans %}No resources registered{% endtrans %}
{% endif %}
</small>
</div>
</div>
<div class="card-footer bg-white border-0">
<div class="card-footer bg-body-tertiary border-0">
<div class="d-flex justify-content-between">
<div>
<a href="{{ url_for('classrooms.view_classroom', id=classroom.id) }}"
class="btn btn-sm btn-outline-primary">
<i class="bi bi-eye"></i> View
<i class="bi bi-eye"></i> {% trans %}View{% endtrans %}
</a>
<a href="{{ url_for('classrooms.edit_classroom', id=classroom.id) }}"
class="btn btn-sm btn-outline-secondary">
<i class="bi bi-pencil"></i> Edit
<i class="bi bi-pencil"></i> {% trans %}Edit{% endtrans %}
</a>
</div>
<form method="POST" action="{{ url_for('classrooms.toggle_classroom', id=classroom.id) }}"
@@ -121,9 +121,9 @@
<button type="submit" class="btn btn-sm
{% if classroom.is_active %}btn-outline-warning{% else %}btn-outline-success{% endif %}">
{% if classroom.is_active %}
<i class="bi bi-pause-circle"></i> Deactivate
<i class="bi bi-pause-circle"></i> {% trans %}Deactivate{% endtrans %}
{% else %}
<i class="bi bi-play-circle"></i> Activate
<i class="bi bi-play-circle"></i> {% trans %}Activate{% endtrans %}
{% endif %}
</button>
</form>
@@ -141,7 +141,7 @@
{% if classrooms.has_prev %}
<li class="page-item">
<a class="page-link" href="{{ url_for('classrooms.list_classrooms', page=classrooms.prev_num, search=search, active_only=active_only) }}">
Previous
{% trans %}Previous{% endtrans %}
</a>
</li>
{% endif %}
@@ -169,7 +169,7 @@
{% if classrooms.has_next %}
<li class="page-item">
<a class="page-link" href="{{ url_for('classrooms.list_classrooms', page=classrooms.next_num, search=search, active_only=active_only) }}">
Next
{% trans %}Next{% endtrans %}
</a>
</li>
{% endif %}
@@ -182,16 +182,16 @@
<div class="col-12">
<div class="text-center py-5">
<i class="bi bi-door-open text-muted" style="font-size: 4rem;"></i>
<h4 class="mt-3 text-muted">No classrooms found</h4>
<h4 class="mt-3 text-muted">{% trans %}No classrooms found{% endtrans %}</h4>
<p class="text-muted">
{% if search %}
No classrooms match your search criteria.
{% trans %}No classrooms match your search criteria.{% endtrans %}
{% else %}
No classrooms have been registered yet.
{% trans %}No classrooms have been registered yet.{% endtrans %}
{% endif %}
</p>
<a href="{{ url_for('classrooms.add_classroom') }}" class="btn btn-primary">
<i class="bi bi-plus-circle"></i> Add First Classroom
<i class="bi bi-plus-circle"></i> {% trans %}Add First Classroom{% endtrans %}
</a>
</div>
</div>