2020-10-27 23:54:35 +01:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
2020-12-01 23:52:15 +01:00
|
|
|
{% load utils %} {# Možná by mohlo být někde výš v hierarchii templatů... #}
|
|
|
|
|
2020-10-27 23:54:35 +01:00
|
|
|
{% block content %}
|
|
|
|
|
2021-02-23 22:13:14 +01:00
|
|
|
<form method=get action=.>
|
|
|
|
{{ filtr.resitele }}
|
|
|
|
{{ filtr.problemy }}
|
|
|
|
Od: {{ filtr.reseni_od }}
|
|
|
|
Do: {{ filtr.reseni_do }}
|
2021-06-30 04:16:29 +02:00
|
|
|
<span title="Jen neobodovaná řešení">🔨?</span> {{ filtr.neobodovane }}
|
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;">
|
|
|
|
<input type=number max="{{ aktualni_rocnik.rocnik }}" min=1 id=jiny_rocnik placeholder="Jiný ročník">
|
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-09-06 01:57:32 +02:00
|
|
|
<table class="dosla_reseni">
|
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>
|
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>
|
2020-11-18 00:35:18 +01:00
|
|
|
{% for hodn in hodnoty %}
|
|
|
|
<td>
|
|
|
|
{% if hodn %}
|
2020-12-01 23:52:15 +01:00
|
|
|
<a href="{% url 'odevzdavatko_reseni_resitele_k_problemu' problem=hodn.problem_id resitel=hodn.resitel_id %}">
|
|
|
|
{{ hodn.pocet_reseni }} řeš.<br>{{ hodn.body }} b<br>{{ hodn.posledni_odevzdani|kratke_datum|default_if_none:"Nikdy"|default:"???"}}
|
|
|
|
</a>
|
2020-11-18 00:35:18 +01:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
2020-10-27 23:54:35 +01:00
|
|
|
{% endfor %}
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</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>
|
|
|
|
{% endblock %}
|