mamweb/seminar/templates/seminar/novinky.html

42 lines
1.2 KiB
HTML
Raw Normal View History

{% for novinka in object_list %}
{# pripravene div-y na stylovani#}
<div>
2020-09-12 17:41:20 +02:00
{% if not novinka.zverejneno and user.je_org %}
<div class="mam-org-only">
<ul>
<li><a href="/admin/seminar/novinky/{{novinka.pk}}">Upravit novinku</a>
</ul>
{% endif %}
2020-09-12 17:41:20 +02:00
{% if novinka.zverejneno or user.je_org %}
{# datum #}
2020-07-16 15:55:51 +02:00
<div class=novinka_datum>{{novinka.datum}}</div>
{# text #}
{{ novinka.text | safe }}
{# obrazek #}
{% if novinka.obrazek %}
2015-11-27 16:52:20 +01:00
<div class='novinka_obrazek'>
{% if novinka.obrazek.height > novinka.obrazek_maly.height %}
<a href='{{ novinka.obrazek.url }}'>
<img src='{{ novinka.obrazek.url }}' height='{{ novinka.obrazek_maly.height }}'>
</a>
{% else %}
2015-11-27 16:52:20 +01:00
<img src='{{ novinka.obrazek.url }}' height='{{ novinka.obrazek_maly.height }}'>
{% endif%}
</div>
{% endif %}
{# autor #}
2020-07-16 15:55:51 +02:00
<div class=novinka_autor>
{{novinka.autor.osoba.jmeno}}
{% if novinka.autor.osoba.prezdivka%}
&bdquo;{{novinka.autor.osoba.prezdivka}}&ldquo;
2015-09-12 16:23:40 +02:00
{% endif %}
2020-07-16 15:55:51 +02:00
{{novinka.autor.osoba.prijmeni}}
2015-09-12 16:23:40 +02:00
</div>
{% endif %}
2020-09-12 17:41:20 +02:00
{% if not novinka.zverejneno and user.je_org %}
</div>
{% endif %}
2020-09-18 22:12:57 +02:00
</div>
{% endfor%}