Web M&M
https://mam.matfyz.cz
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.
127 lines
3.4 KiB
127 lines
3.4 KiB
{% extends "base.html" %}
|
|
|
|
{% block nadpis1a %}
|
|
Galerie {{galerie.nazev}}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
{% if galerie.zobrazit > 0 %}
|
|
<div class="mam-org-only">
|
|
{% endif %}
|
|
|
|
<h2>
|
|
{% for g in cesta %}
|
|
{% if not forloop.last %}
|
|
<a href="../{{ g.pk }}">{{ g.nazev }}</a> >
|
|
{% else %}
|
|
{{ g.nazev }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
</h2>
|
|
|
|
{% if not obrazky %}
|
|
<div class="galerie_hlavicka">
|
|
{% if galerie.titulni_obrazek %}
|
|
<img src="{{ galerie.titulni_obrazek.obrazek_stredni.url }}" class="titulni_obrazek">
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{# podgalerie #}
|
|
{% if podgalerie or galerie.galerie_up %}
|
|
|
|
{% if sourozenci|length > 1 %}
|
|
{% for g in sourozenci %}
|
|
{% if g.pk != galerie.pk %}
|
|
<a href="../{{ g.pk }}">{{ g.nazev }}</a>
|
|
{% else %}
|
|
{{ g.nazev }}
|
|
{% endif %}
|
|
<span style="width: 1em; display: inline-block;"></span>
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{% if podgalerie %}
|
|
{% with 22 as max_delka_nazvu %}
|
|
<div class="galerie_nahledy">
|
|
{% for galerie in podgalerie %}
|
|
<a href="../{{galerie.pk}}"
|
|
{% if galerie.nazev|length > max_delka_nazvu %}
|
|
title="{{ galerie.nazev }}"
|
|
{% endif %}
|
|
class="podgalerie_nahled">
|
|
{% if galerie.titulni_obrazek %}
|
|
{% with galerie.titulni_obrazek.obrazek_maly as obrazek %}
|
|
<img src="{{ obrazek.url }}"
|
|
/>
|
|
{% endwith %}
|
|
{% endif %}
|
|
<div class="nazev_galerie">
|
|
{{ galerie|truncatechars:max_delka_nazvu }}
|
|
</div>
|
|
</a>
|
|
{% if user.je_org and galerie.zobrazit > 0 %}
|
|
<div class="mam-org-only-galerie">
|
|
({{galerie.poradi}})
|
|
<span class="plus"><a href="plus/{{galerie.pk}}/">+</a></span>
|
|
<span class="minus"><a href="minus/{{galerie.pk}}/">-</a></span>
|
|
</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
{% endwith %}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% if user.je_org and galerie.zobrazit > 0 %}
|
|
<div class="mam-org-only">
|
|
<a href="./new">Vytvořit novou podgalerii </a>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{# obrazky v galerii #}
|
|
{% if obrazky %}
|
|
<div class="galerie_nahledy">
|
|
{% for obrazek in obrazky %}
|
|
<a
|
|
{% if obrazek.popis %}
|
|
title="{{ obrazek.popis }}"
|
|
{% endif %}
|
|
href="./{{obrazek.pk}}#nahoru" class="galerie_nahled"><span class="vystredeno"></span><img
|
|
src="{{obrazek.obrazek_maly.url}}"
|
|
{% if obrazek.popis %}
|
|
title="{{ obrazek.popis }}"
|
|
{% endif %}
|
|
width="{{ obrazek.obrazek_maly.width }}"
|
|
height="{{ obrazek.obrazek_maly.height }}" />
|
|
</a>
|
|
{% endfor %}
|
|
<br>
|
|
</div>
|
|
|
|
<div class="galerie_predchozi_nasledujici">
|
|
{% if predchozi %}
|
|
<div class="predchozi">
|
|
<a href="../{{ predchozi.pk }}">Předchozí: {{ predchozi.nazev }}</a>
|
|
</div>
|
|
{% endif %}
|
|
{% if nasledujici %}
|
|
<div class="nasledujici">
|
|
<a href="../{{ nasledujici.pk }}">Následující: {{ nasledujici.nazev }}</a>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% else %}
|
|
{% if not podgalerie %}
|
|
<div class="zadne-vysledky">
|
|
V galerii nejsou žádné fotky.
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% if galerie.zobrazit > 0 %}
|
|
</div> {# mam-org-only #}
|
|
{% endif %}
|
|
|
|
{% endblock content %}
|
|
|