mamweb/seminar/templates/seminar/novinky.html
Aneta d64cd84e6a Merge branch 'master' of atrey.karlin.mff.cuni.cz:/akce/MaM/MaMweb/mamweb
Conflicts:
	mamweb/templates/menu.html
	seminar/templates/seminar/novinky.html
	seminar/views.py
2015-09-12 12:31:15 +02:00

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%}
&bdquo;{{novinka.autor.organizator.prezdivka}}&ldquo;
{% endif %}
{{novinka.autor.last_name}}
</div>
{% endif %}
</div>
{% endfor%}