Spaces:
Sleeping
Sleeping
En las tablas de repeticion se aseguran que el valor coincida con el encabezado
Browse files
tecnicas/controllers/views_controller/detalles_sesion_controller.py
CHANGED
|
@@ -31,7 +31,7 @@ class DetallesSesionController():
|
|
| 31 |
|
| 32 |
self.words = PalabrasController.getWordsInTechnique(
|
| 33 |
self.session.tecnica)
|
| 34 |
-
self.context["palabras"] = self.words
|
| 35 |
|
| 36 |
def getContextWithData(self):
|
| 37 |
ratings_for_repetition = []
|
|
|
|
| 31 |
|
| 32 |
self.words = PalabrasController.getWordsInTechnique(
|
| 33 |
self.session.tecnica)
|
| 34 |
+
self.context["palabras"] = [word.nombre_palabra for word in self.words]
|
| 35 |
|
| 36 |
def getContextWithData(self):
|
| 37 |
ratings_for_repetition = []
|
tecnicas/templates/tecnicas/components/table-convencional.html
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<section>
|
| 2 |
+
<h2 class="text-lg font-bold mb-3">Repetición {{ repeticion }}</h2>
|
| 3 |
+
|
| 4 |
+
<div class="overflow-x-auto rounded-lg border border-surface-general">
|
| 5 |
+
<table class="min-w-max w-full text-sm text-center border-collapse">
|
| 6 |
+
<thead class="bg-surface-sweet text-black font-semibold">
|
| 7 |
+
<tr>
|
| 8 |
+
<th class="py-2 px-3 border border-surface-general">Usuario</th>
|
| 9 |
+
<th class="py-2 px-3 border border-surface-general">Producto</th>
|
| 10 |
+
{% for palabra in palabras %}
|
| 11 |
+
<th class="py-2 px-3 border border-surface-general uppercase">{{ palabra }}</th>
|
| 12 |
+
{% endfor %}
|
| 13 |
+
</tr>
|
| 14 |
+
</thead>
|
| 15 |
+
<tbody class="bg-surface-ligt divide-y divide-gray-200">
|
| 16 |
+
{% for usuario, productos in catadores.items %}
|
| 17 |
+
{% for codigo, valores in productos.items %}
|
| 18 |
+
<tr>
|
| 19 |
+
<td class="py-2 px-3 border border-surface-general">{{ usuario }}</td>
|
| 20 |
+
<td class="py-2 px-3 border border-surface-general">{{ codigo }}</td>
|
| 21 |
+
{% for palabra in palabras %}
|
| 22 |
+
<td class="py-2 px-3 border border-surface-general">
|
| 23 |
+
{% with match=None %}
|
| 24 |
+
{% for valor in valores %}
|
| 25 |
+
{% if valor.nombre_palabra == palabra %}
|
| 26 |
+
{{ palabra }} <br>
|
| 27 |
+
{{ valor.dato_valor }}
|
| 28 |
+
{% with match=True %}{% endwith %}
|
| 29 |
+
{% endif %}
|
| 30 |
+
{% endfor %}
|
| 31 |
+
{% if not match %}0{% endif %}
|
| 32 |
+
{% endwith %}
|
| 33 |
+
</td>
|
| 34 |
+
{% endfor %}
|
| 35 |
+
</tr>
|
| 36 |
+
{% endfor %}
|
| 37 |
+
{% endfor %}
|
| 38 |
+
</tbody>
|
| 39 |
+
</table>
|
| 40 |
+
</div>
|
| 41 |
+
|
| 42 |
+
<div class="flex justify-end mt-3">
|
| 43 |
+
<button class="cts-btn-general cts-btn-primary btn-push">
|
| 44 |
+
Descargar CSV
|
| 45 |
+
</button>
|
| 46 |
+
</div>
|
| 47 |
+
</section>
|
tecnicas/templates/tecnicas/manage_sesions/detalles-sesion.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
| 6 |
{% block content %}
|
| 7 |
<article class="cts-container-main">
|
| 8 |
<article class="cts-wrap-content">
|
| 9 |
-
<header class="text-center flex-row w-full flex justify-around items-center flex-wrap gap-10">
|
| 10 |
<h1 class="text-black rounded-xl font-bold text-2xl bg-surface-card shadow-lg p-4 flex-1">
|
| 11 |
Detalles de la sesión
|
| 12 |
</h1>
|
|
@@ -108,7 +108,7 @@
|
|
| 108 |
</section>
|
| 109 |
|
| 110 |
<section>
|
| 111 |
-
<p class="font-
|
| 112 |
Rep. Max:
|
| 113 |
</p>
|
| 114 |
<p class="font-sans text-lg max-sm:text-base font-normal">
|
|
@@ -134,7 +134,7 @@
|
|
| 134 |
{% for palabra in palabras %}
|
| 135 |
<section>
|
| 136 |
<p class="block text-black text-xl antialiased font-medium">
|
| 137 |
-
{{ palabra
|
| 138 |
</p>
|
| 139 |
</section>
|
| 140 |
{% endfor %}
|
|
@@ -180,52 +180,9 @@
|
|
| 180 |
</p>
|
| 181 |
|
| 182 |
{% if existen_calificaciones %}
|
| 183 |
-
<article class="bg-surface-card p-4 text-black rounded
|
| 184 |
{% for repeticion, catadores in calificaciones.items %}
|
| 185 |
-
|
| 186 |
-
<h2 class="text-lg font-bold mb-3">Repetición {{ repeticion }}</h2>
|
| 187 |
-
|
| 188 |
-
<div class="overflow-x-auto rounded-lg border border-surface-general">
|
| 189 |
-
<table class="min-w-max w-full text-sm text-center border-collapse">
|
| 190 |
-
<thead class="bg-surface-sweet text-black font-semibold">
|
| 191 |
-
<tr>
|
| 192 |
-
<th class="py-2 px-3 border border-surface-general">Usuario</th>
|
| 193 |
-
<th class="py-2 px-3 border border-surface-general">Producto</th>
|
| 194 |
-
{% for palabra in palabras %}
|
| 195 |
-
<th class="py-2 px-3 border border-surface-general uppercase">{{ palabra }}</th>
|
| 196 |
-
{% endfor %}
|
| 197 |
-
</tr>
|
| 198 |
-
</thead>
|
| 199 |
-
<tbody class="bg-surface-ligt divide-y divide-gray-200">
|
| 200 |
-
{% for usuario, productos in catadores.items %}
|
| 201 |
-
{% for codigo, valores in productos.items %}
|
| 202 |
-
<tr>
|
| 203 |
-
<td class="py-2 px-3 border border-surface-general">{{ usuario }}</td>
|
| 204 |
-
<td class="py-2 px-3 border border-surface-general">{{ codigo }}</td>
|
| 205 |
-
{% for valor in valores %}
|
| 206 |
-
<td class="py-2 px-3 border border-surface-general">
|
| 207 |
-
{% if valor.dato_valor %}
|
| 208 |
-
{{ valor.nombre_palabra }} <br>
|
| 209 |
-
{{ valor.dato_valor }}
|
| 210 |
-
{% else %}
|
| 211 |
-
0
|
| 212 |
-
{% endif %}
|
| 213 |
-
</td>
|
| 214 |
-
{% endfor %}
|
| 215 |
-
</tr>
|
| 216 |
-
{% endfor %}
|
| 217 |
-
{% endfor %}
|
| 218 |
-
</tbody>
|
| 219 |
-
</table>
|
| 220 |
-
</div>
|
| 221 |
-
|
| 222 |
-
<div class="flex justify-end mt-3">
|
| 223 |
-
<button
|
| 224 |
-
class="bg-blue-600 hover:bg-blue-700 text-white font-semibold py-2 px-4 rounded-lg shadow transition">
|
| 225 |
-
Descargar CSV
|
| 226 |
-
</button>
|
| 227 |
-
</div>
|
| 228 |
-
</section>
|
| 229 |
{% endfor %}
|
| 230 |
</article>
|
| 231 |
{% else %}
|
|
|
|
| 6 |
{% block content %}
|
| 7 |
<article class="cts-container-main">
|
| 8 |
<article class="cts-wrap-content">
|
| 9 |
+
<header class="text-center flex-row max-sm:flex-col w-full flex justify-around items-center flex-wrap gap-10">
|
| 10 |
<h1 class="text-black rounded-xl font-bold text-2xl bg-surface-card shadow-lg p-4 flex-1">
|
| 11 |
Detalles de la sesión
|
| 12 |
</h1>
|
|
|
|
| 108 |
</section>
|
| 109 |
|
| 110 |
<section>
|
| 111 |
+
<p class="font-bold">
|
| 112 |
Rep. Max:
|
| 113 |
</p>
|
| 114 |
<p class="font-sans text-lg max-sm:text-base font-normal">
|
|
|
|
| 134 |
{% for palabra in palabras %}
|
| 135 |
<section>
|
| 136 |
<p class="block text-black text-xl antialiased font-medium">
|
| 137 |
+
{{ palabra }}
|
| 138 |
</p>
|
| 139 |
</section>
|
| 140 |
{% endfor %}
|
|
|
|
| 180 |
</p>
|
| 181 |
|
| 182 |
{% if existen_calificaciones %}
|
| 183 |
+
<article class="bg-surface-card p-4 max-sm:px-2 text-black rounded">
|
| 184 |
{% for repeticion, catadores in calificaciones.items %}
|
| 185 |
+
{% include "../components/table-convencional.html" with repeticion=repeticion catadores=catadores palabras=palabras %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
{% endfor %}
|
| 187 |
</article>
|
| 188 |
{% else %}
|
tecnicas/templates/tecnicas/manage_sesions/sesiones-panel.html
CHANGED
|
@@ -22,7 +22,7 @@
|
|
| 22 |
<section class="grid grid-cols-3 max-lg:grid-cols-2 max-sm:grid-cols-1 w-full gap-4 justify-center">
|
| 23 |
{% for sesion in sessions %}
|
| 24 |
<div class="card bg-surface-card shadow-lg text-black sm:max-w-80 w-full flex justify-center items-center">
|
| 25 |
-
<div class="card-body flex flex-col justify-between">
|
| 26 |
<div class="flex flex-col gap-1 [&>*]:first:text-xl [&>*]:first:font-bold [&>*]:first:border-b">
|
| 27 |
{% if sesion.nombre_sesion %}
|
| 28 |
<h2>{{ sesion.nombre_sesion }}</h2>
|
|
|
|
| 22 |
<section class="grid grid-cols-3 max-lg:grid-cols-2 max-sm:grid-cols-1 w-full gap-4 justify-center">
|
| 23 |
{% for sesion in sessions %}
|
| 24 |
<div class="card bg-surface-card shadow-lg text-black sm:max-w-80 w-full flex justify-center items-center">
|
| 25 |
+
<div class="card-body flex flex-col justify-between w-full">
|
| 26 |
<div class="flex flex-col gap-1 [&>*]:first:text-xl [&>*]:first:font-bold [&>*]:first:border-b">
|
| 27 |
{% if sesion.nombre_sesion %}
|
| 28 |
<h2>{{ sesion.nombre_sesion }}</h2>
|