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.

42 lines
1.2 KiB

{% for novinka in object_list %}
{# pripravene div-y na stylovani#}
<div>
{% if not novinka.zverejneno and user.is_staff %}
<div class="mam-org-only">
<ul>
<li><a href="/admin/seminar/novinky/{{novinka.pk}}">Upravit novinku</a>
</ul>
{% endif %}
{% if novinka.zverejneno or user.is_staff %}
{# datum #}
<div><b>{{novinka.datum}}</b></div>
{# text #}
{{ novinka.text | safe }}
{# obrazek #}
{% if novinka.obrazek %}
<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 %}
<img src='{{ novinka.obrazek.url }}' height='{{ novinka.obrazek_maly.height }}'>
{% endif%}
</div>
{% endif %}
{# autor #}
<div class=novinky_name><p>{{novinka.autor.first_name}}
{% if novinka.autor.organizator.prezdivka%}
&bdquo;{{novinka.autor.organizator.prezdivka}}&ldquo;
{% endif %}
{{novinka.autor.last_name}}
</p>
</div>
{% endif %}
{% if not novinka.zverejneno and user.is_staff %}
</div>
{% endif %}
</div>
{% endfor%}