{% extends "base.html.twig" %}
{% block description %}
{{ category.description }}
{% endblock %}
{% block body %}
<div class="container">
{% if '@@FORM@@' in category.html|raw %}
{% set content = replaced_content|raw %}
{% for label, messages in app.flashes(['success', 'warning']) %}
{% for message in messages %}
{% set content = content|replace({"@@FORM@@": '<div class="flash-'~label~'">
'~message~'
</div>@@FORM@@'}) %}
{% endfor %}
{% endfor %}
{% set content = content|replace({"@@FORM@@": form(contact_form)})|raw %}
{{ content | raw }}
{% else %}
{{ replaced_content | raw }}
{% endif %}
{% if category.slug == "badatelna" %}
<div id="badatelna-calendar"></div>
{% endif %}
{% if category.slug == "aktualne-v-mua" %}
{{ include('/web/news/news.html.twig', {category: category}) }}
{% endif %}
{% if category.slug == "projekty" %}
{{ include('/web/projects/projects.html.twig', {category: category}) }}
{% endif %}
{% if category is defined and is_department(category) %}
{{ include('/web/person/people_list.html.twig', {category: category}) }}
{% endif %}
{#
ZAHRNUTO V RELATED
{% if category.categoryCategories is defined and category.categoryCategories|length > 0 %}
{% if category.slug != "projekty" %}
{{ include('/web/themes/themes_list.html.twig', {category: category}) }}
{% endif %}
{% endif %}
{% if category.events is defined and category.events|length > 0 %}
{{ include('/web/event/events_list.html.twig', {category: category}) }}
{% endif %}
#}
{% if get_category_uploads_by_group_type(category, 1)|length > 0 %}
<section class="container">
<h2>{% trans %}prilohy{% endtrans %}</h2>
<ul class="list-icone list-icone--download">
{% for file in get_category_uploads_by_group_type(category, 1) %}
<li class="list-icone__item">
<a href="{{ asset(file.path) }}" target="_blank" rel="noopener" {% if file.extension != 'pdf' %}download{% endif %}>
{% if file.shortDescription %}
{{ file.shortDescription }}
{% else %}
{{ file.originalName }}
{% endif %}
{% if file.extension %}
(<span class="text-uppercase">{{ file.extension }}</span>)
{% endif %}
</a>
</li>
{% endfor %}
</ul>
</section>
{% endif %}
{% if get_category_uploads_by_group_type(category, 0)|length > 0 and has_gallery(category) %}
<section class="container">
<h2>{% trans %}fotogalerie{% endtrans %}</h2>
<div class="gallery-grid">
{% for image in get_category_uploads_by_group_type(category, 0) %}
<div class="gallery-grid__item">
<a href="{{ asset(image.path) }}" class="gallery-grid__detail glightbox" data-gallery="gallery1" {% if image.shortDescription %}data-glightbox="description: .custom-desc{{ image.id }}"{% endif %}>
<img class="gallery-grid__photo" src="{{ asset(image.path) }}" alt="Obrázek z galerie" {% if image.shortDescription %}title="{{ image.shortDescription }}{% endif %}">
</a>
{% if image.shortDescription %}
<div class="glightbox-desc custom-desc{{ image.id }}">
<p>{{ image.shortDescription }}</p>
</div>
{% endif %}
</div>
{% endfor %}
</div>
</section>
{% endif %}
{% if category.slug != "aktualne-v-mua" and category.slug != "fotogalerie" %}
{{ include('/web/pages/_related.html.twig', {category: category}) }}
{% endif %}
</div>
{% endblock %}
{% block javascripts %}
{{ parent() }}
{% if category.javascript %}
<script type="text/javascript">
{{ category.javascript | raw }}
</script>
{% endif %}
{% endblock %}