d64cd84e6a
Conflicts: mamweb/templates/menu.html seminar/templates/seminar/novinky.html seminar/views.py
32 lines
749 B
HTML
32 lines
749 B
HTML
{% for novinka in object_list %}
|
|
{# pripravene div-y na stylovani#}
|
|
<div>
|
|
{# datum #}
|
|
<div><b>{{novinka.datum}}</b></div>
|
|
{# text #}
|
|
{{ novinka.text | safe }}
|
|
{# obrazek #}
|
|
{% if novinka.obrazek %}
|
|
<div>
|
|
<img src='{{novinka.obrazek.url}}'
|
|
height='
|
|
{% if novinka.obrazek.height > 200 %} {# vyska obrazku natvrdo #}
|
|
200
|
|
{% else %}
|
|
{{novinka.obrazek.height}}
|
|
{% endif%}
|
|
'>
|
|
</div>
|
|
{% endif %}
|
|
{# autor #}
|
|
{% if user.is_staff %}
|
|
<div>{{novinka.autor.first_name}}
|
|
{% if novinka.autor.organizator.prezdivka%}
|
|
„{{novinka.autor.organizator.prezdivka}}“
|
|
{% endif %}
|
|
{{novinka.autor.last_name}}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endfor%}
|
|
|