{% extends "ProjectAppBundle::layout.html.twig" %}

{% block content %}
    <div class="panel-group">
        {% if entities is empty %}
            <div class="panel-item">
                <div class="panel-content">
                    Aucune archive n'est actuellement disponible.
                </div>
            </div>
        {% else %}
            {% for entity in entities %}
                <div class="panel-item">
                    <div class="panel-content">
                        <div class="panel-header">
                            <h3 class="pull-left">{{ entity.archive.year | date('Y') }} - {{ entity.archive.name }}</h3>
                        </div>
                        <div class="panel-content">
                            {% if entity.promotions is not empty %}
                                Promotion(s) inclue(s) :
                                <br/><br/>
                                <table>
                                    <thead>
                                        <tr>
                                            <th>Dates</th>
                                            <th>Formation</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        {% for promotion in entity.promotions %}
                                            <tr>
                                                <td>{{ promotion.startDate | date('Y') }} - {{ promotion.endDate | date('Y') }}</td>
                                                <td>{{ promotion.formation.name }}</td>
                                            </tr>
                                        {% endfor %}
                                    </tbody>
                                </table>
                                <br/>
                            {% endif %}

                            <a class="btn btn-second" href="">Télécharger</a>
                        </div>
                    </div>
                </div>
            {% endfor %}
        {% endif %}
    </div>
{% endblock %}

{% extends "ProjectAppBundle::layout.html.twig" %}

{% block content %}
    <div class="bloc-top">
        <a class="btn btn-second" href="{{ path('archive_new') }}">Nouvelle archive</a>
    </div>

    <div class="panel-group">
        {% if entities is empty %}
            <div class="panel-item">
                <div class="panel-content">
                    Aucune archive n'est actuellement disponible.
                </div>
            </div>
        {% else %}
            {% for entity in entities %}
                <div class="panel-item">
                    <div class="panel-content">
                        <div class="panel-header">
                            <h3 class="pull-left">{{ entity.archive.year | date('Y') }} - {{ entity.archive.name }}</h3>
                        </div>
                        <div class="panel-content">
                            {% if entity.promotions is not empty %}
                                Promotion(s) inclue(s) :
                                <br/><br/>
                                <table>
                                    <thead>
                                        <tr>
                                            <th>Dates</th>
                                            <th>Formation</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        {% for promotion in entity.promotions %}
                                            <tr>
                                                <td>{{ promotion.startDate | date('Y') }} - {{ promotion.endDate | date('Y') }}</td>
                                                <td>{{ promotion.formation.name }}</td>
                                            </tr>
                                        {% endfor %}
                                    </tbody>
                                </table>
                                <br/>
                            {% endif %}

                            <a class="btn btn-second btn-small" href="">Télécharger</a>
                        </div>
                    </div>
                </div>
            {% endfor %}
        {% endif %}
    </div>
{% endblock %}

Add link to new entity
Add link to new entity
