2020-10-27 23:54:35 +01:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
2023-05-22 23:58:04 +02:00
|
|
|
{% load barvy_reseni %}
|
2020-12-01 23:52:15 +01:00
|
|
|
|
2020-10-27 23:54:35 +01:00
|
|
|
{% block content %}
|
|
|
|
|
2022-12-05 20:53:22 +01:00
|
|
|
<div class="full_width">
|
2021-11-24 15:52:32 +01:00
|
|
|
<form method=get action=.>
|
2021-02-23 22:13:14 +01:00
|
|
|
{{ filtr.resitele }}
|
|
|
|
{{ filtr.problemy }}
|
2022-10-24 15:48:36 +02:00
|
|
|
Od data (vyjma): {{ filtr.reseni_od }}
|
|
|
|
Do data (včetně): {{ filtr.reseni_do }}
|
2021-06-30 04:16:29 +02:00
|
|
|
<span title="Jen neobodovaná řešení">🔨?</span> {{ filtr.neobodovane }}
|
2023-05-23 00:28:13 +02:00
|
|
|
<span title="Obarvit shodná řešení shodně">🎨?</span> {{ filtr.barvicky }}
|
2021-02-23 22:13:14 +01:00
|
|
|
<input type=submit value="→">
|
|
|
|
</form>
|
|
|
|
|
2021-09-12 03:40:19 +02:00
|
|
|
<form onsubmit="javascript:jiny_rocnik_redir(); return false;">
|
2021-09-16 15:58:45 +02:00
|
|
|
<input type=number max="{{ aktualni_rocnik.rocnik }}" min=1 id=jiny_rocnik placeholder="Jiný ročník" value="{{ rocnik }}">
|
2021-09-14 20:07:22 +02:00
|
|
|
<input type=submit value="Změň ročník">
|
2021-09-12 03:40:19 +02:00
|
|
|
</form>
|
2021-11-01 20:48:55 +01:00
|
|
|
|
2024-02-14 10:58:21 +01:00
|
|
|
<table class="tabulka_doslych_reseni barevna_tabulka tabulka_s_uchycenym_radkem_a_sloupcem">
|
2024-02-05 19:50:17 +01:00
|
|
|
<thead>
|
2020-10-27 23:54:35 +01:00
|
|
|
<tr>
|
|
|
|
<td></td> {# Prázdná buňka v levém horním rohu #}
|
|
|
|
{% for p in problemy %}
|
2020-12-01 23:52:15 +01:00
|
|
|
<th>
|
|
|
|
{# TODO: Přehled řešení k problému, odkázaný odsud? #}
|
|
|
|
{{ p }}
|
|
|
|
</th>
|
2020-10-27 23:54:35 +01:00
|
|
|
{% endfor %}
|
|
|
|
</tr>
|
2024-02-05 19:50:17 +01:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
2020-11-18 00:35:18 +01:00
|
|
|
{% for resitel,hodnoty in radky%}
|
2020-10-27 23:54:35 +01:00
|
|
|
<tr>
|
2020-12-01 23:52:15 +01:00
|
|
|
<td>
|
|
|
|
{# TODO: Chceme mít view i na řešení konkrétního řešitele ke všem problémům? #}
|
|
|
|
{{ resitel }}
|
|
|
|
</td>
|
2023-05-22 23:30:57 +02:00
|
|
|
{% for soucet,bunka in hodnoty %}
|
2020-11-18 00:35:18 +01:00
|
|
|
<td>
|
2023-05-22 22:46:47 +02:00
|
|
|
{% for reseni,hodnoceni in bunka %}
|
2023-05-23 00:28:13 +02:00
|
|
|
<a {% if barvicky %} style="color: {{reseni|barva_reseni}};" {% endif %} href="{% url 'odevzdavatko_detail_reseni' pk=reseni.id %}">
|
2023-05-22 23:30:57 +02:00
|
|
|
{{reseni.cas_doruceni | date:"j. n."}} ({{ hodnoceni.body|default_if_none:"🔨"}} b)
|
2023-05-22 22:46:47 +02:00
|
|
|
</a><br>
|
2023-05-22 22:16:02 +02:00
|
|
|
{% endfor %}
|
2023-05-22 23:30:57 +02:00
|
|
|
{% if bunka|length > 1 %}
|
|
|
|
<b>Σ: {{soucet}} b</b>
|
|
|
|
{% endif %}
|
2020-11-18 00:35:18 +01:00
|
|
|
</td>
|
2020-10-27 23:54:35 +01:00
|
|
|
{% endfor %}
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
2024-02-05 19:50:17 +01:00
|
|
|
</tbody>
|
2020-10-27 23:54:35 +01:00
|
|
|
</table>
|
|
|
|
|
|
|
|
{% endblock %}
|
2021-09-12 03:40:19 +02:00
|
|
|
|
|
|
|
{% block script %}
|
|
|
|
<script type=text/javascript>
|
|
|
|
// Nemůže se to jmenovat jen "jiny_rocnik", protože se to přepíše: https://trackjs.com/blog/when-form-submit-is-not-a-function/
|
|
|
|
function jiny_rocnik_redir() {
|
|
|
|
let rocnik = document.getElementById("jiny_rocnik").value;
|
|
|
|
var redirect = undefined;
|
|
|
|
if (rocnik == '')
|
|
|
|
redirect = '/org/reseni/';
|
|
|
|
else
|
|
|
|
redirect = '/org/reseni/rocnik/'+rocnik+'/';
|
|
|
|
location.assign(redirect);
|
|
|
|
}
|
|
|
|
</script>
|
2022-12-05 20:53:22 +01:00
|
|
|
</div>
|
2021-09-12 03:40:19 +02:00
|
|
|
{% endblock %}
|