templates/web/event/event_detail.html.twig line 1

  1. {% extends "base.html.twig" %}
    {% block body %}
        <section>
            <div class="container">
                <div class="col-12 col-lg-10">
                    <h1 class="main-title">{{ event.name }}</h1>
                    {{ event.description|raw }}
                </div>
            </div>
        </section>
        <section>
            <div class="container">
                <div class="call-for-papers">
                    <div class="project-detail__section">
                        <h5 class="project-detail__section-heading">{% trans %}datum.konani{% endtrans %}</h5>
                        <div class="project-detail__section-content">
                            {% if event.dateStart|date('H:i') == "00:00" %}
                                {% set eventStart = event.dateStart|date('j. n. Y') %}
                            {% else %}
                                {% set eventStart = event.dateStart|date("j. n. Y, H:i") %}
                            {% endif %}
    
                            {% if event.dateEnd|date('H:i') == "00:00" %}
                                {% set eventEnd = event.dateEnd|date('j. n. Y') %}
                            {% else %}
                                {% set eventEnd = event.dateEnd|date("j. n. Y, H:i") %}
                            {% endif %}
    
                            {% if eventStart == eventEnd or event.dateEnd is null %}
                                {{ eventStart }}
                            {% else %}
                                {{ eventStart }} – {{ eventEnd }}
                            {% endif %}
                        </div>
                    </div>
                    {% if event.location %}
                        <div class="project-detail__section">
                            <h5 class="project-detail__section-heading">{% trans %}misto.konani{% endtrans %}</h5>
                            <div class="project-detail__section-content">
                                {{ event.location }}
                            </div>
                        </div>
                    {% endif %}
                    {% if event.price > 0 and event.price is not null %}
                        <div class="project-detail__section">
                            <h5 class="project-detail__section-heading">{% trans %}cena{% endtrans %}</h5>
                            <div class="project-detail__section-content">
                                {{ event.price }}
                            </div>
                        </div>
                    {% endif %}
                </div>
            </div>
        </section>
        <section>
            <div class="container content">
                {{ event.html|raw }}
            </div>
        </section>
        {% if get_event_uploads_by_group_type(event, 1)|length > 0 %}
            <section class="container">
                <h2>{% trans %}prilohy{% endtrans %}</h2>
                <ul class="list-icone list-icone--download">
                    {% for file in get_event_uploads_by_group_type(event, 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_event_uploads_by_group_type(event, 0)|length > 0 %}
            <section class="container">
                <h2>{% trans %}fotogalerie{% endtrans %}</h2>
                <div class="gallery-grid">
                    {% for image in get_event_uploads_by_group_type(event, 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 get_event_sub_categories_by_group_type(event.id, 10)|length > 0 %}
            <section id="fotogalerie">
                <div class="container">
                    <h3 class="mb-5">{% trans %}fotogalerie{% endtrans %}</h3>
                    <div class="gallery-boxes">
                        {% for category in get_event_sub_categories_by_group_type(event.id, 10) %}
                            <a href="{{ path('web_gallery_detail', {'slug': category.slug}) }}" class="gallery-box">
                                <div class="gallery-box__img-wrap">
                                    {% if category.upload %}
                                        <img src="{{ category.upload.path }}" class="gallery-box__image" alt="Category image">
                                    {% else %}
                                        <img src="{{ asset('build/img/ilustracni.jpg') }}" class="gallery-box__image" alt="Category image">
                                    {% endif %}
                                </div>
                                <h4 class="gallery-box__title">{{ category.name }}</h4>
                            </a>
                        {% endfor %}
                    </div>
                </div>
            </section>
        {% endif %}
    {% endblock %}