mamweb/seminar/templates/seminar/novinky.html

38 lines
1.1 KiB
HTML

{% for novinka in object_list %}
{# pripravene div-y na stylovani#}
<div>
{% if not novinka.zverejneno and user.is_authenticated %}
<div class="mam-org-only">
{% endif %}
{% if novinka.zverejneno or user.is_authenticated %}
{# 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_authenticated %}
</div>
{% endif %}
</div>
{% endfor%}