You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

37 lines
797 B

{% extends 'base.html' %}
{% block content %}
<h1>
{% block nadpis1a %}
Řešitelské články
{% endblock %}
</h1>
{% for clanek in object_list %}
{% with clanek.cislo.rocnik.rocnik as rocnik %}
{% ifchanged rocnik %}
{% if not forloop.first %}</ul>{% endif %}
<h2>{{ rocnik }}. ročník</h2>
<ul>
{% endifchanged %}
<li>
{% if clanek.cislo.pdf %}
<a href="{{ clanek.cislo.pdf.url }}">
{{ clanek.nazev }}
({% for r in clanek.reseni_set.first.resitele.all %}{{r}}{% if not forloop.last %}, {% endif %}{% endfor %})
</a>
{% else %}
{{ clanek.nazev }}
{% for r in clanek.reseni_set.first.resitele.all %}
{{r}},
{% endfor %}
(vyšlo v čísle {{clanek.cislo}})
{% endif %}
</li>
{% endwith %}
{% endfor %}
</ul>
{% endblock %}