|
@ -2,6 +2,46 @@ |
|
|
|
|
|
|
|
|
{% block content %} |
|
|
{% block content %} |
|
|
|
|
|
|
|
|
{{ object }} |
|
|
<p>Řešené problémy: {{ object.problem.all | join:", " }}</p> |
|
|
|
|
|
|
|
|
|
|
|
<p>Řešitelé: {{ object.resitele.all | join:", " }}</p> |
|
|
|
|
|
|
|
|
|
|
|
{# https://docs.djangoproject.com/en/3.1/ref/models/instances/#django.db.models.Model.get_FOO_display #} |
|
|
|
|
|
<p>Forma: {{ object.get_forma_display }}, doručeno {{ object.cas_doruceni }}</p> |
|
|
|
|
|
|
|
|
|
|
|
{# Soubory: #} |
|
|
|
|
|
<h3>Přílohy:</h3> |
|
|
|
|
|
{% if object.prilohy.all %} |
|
|
|
|
|
<table> |
|
|
|
|
|
<tr><th>Soubor</th><th>Řešitelova poznámka</th><th>Datum</th></tr> |
|
|
|
|
|
{% for priloha in object.prilohy.all %} |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td><a href="{{ priloha.soubor.url }}" download>{{ priloha.split | last }}</a></td> |
|
|
|
|
|
<td>{{ priloha.res_poznamka }}</td> |
|
|
|
|
|
<td>{{ priloha.vytvoreno }}</td></tr> |
|
|
|
|
|
{# TODO: Orgo-poznámka, ideálně jako formulář #} |
|
|
|
|
|
{% endfor %} |
|
|
|
|
|
</table> |
|
|
|
|
|
{% else %} |
|
|
|
|
|
<p>Žádné přílohy</p> |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
|
|
{# Hodnocení: #} |
|
|
|
|
|
{# FIXME: Udělat jako formulář #} |
|
|
|
|
|
<h3>Hodnocení:</h3> |
|
|
|
|
|
{% if object.hodnoceni.all %} |
|
|
|
|
|
<table> |
|
|
|
|
|
<tr><th>Problém</th><th>Body</th><th>Číslo pro body</th></tr> |
|
|
|
|
|
{% for h in object.hodnoceni.all %} |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td>{{ h.problem }}</a></td> |
|
|
|
|
|
<td>{{ h.body }}</td> |
|
|
|
|
|
<td>{{ h.cislo_body }}</td></tr> |
|
|
|
|
|
{% endfor %} |
|
|
|
|
|
</table> |
|
|
|
|
|
{% else %} |
|
|
|
|
|
<p>Ještě nebylo hodnoceno</p> |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% endblock %} |
|
|
{% endblock %} |
|
|