{% extends 'layout.twig' %}

{% block body %}
    <!-- Modal content -->
    <div id="myModal" class="modal" tabindex="-1" role="dialog">

        <div class="modal-dialog" style="width:auto;height:auto;{% if application != 'Mobility' %}min-width:500px{% endif %}" role="document">
            <div id="modal-content" class="modal-content" style="z-index:99999;{% if application != 'Mobility' %}min-width: 600px;{% endif %}">
                <div class="modal-header">
                    <span class="modal-close">&times;</span>
                    <h3 id="modal-title"></h3>
                </div>
                <div id="modal-body" style="padding: 15px;z-index:99999">
                </div>
            </div>
        </div>
    </div>
	<div class="contenu clearfix">
        <h1>
            {{ title }}
        </h1>
        
        {{ ariane() }}

        <h4>
            {{ message }}
        </h4>
        <h4>
            {{ 'Catégories déjà existantes :' | trad }}
        </h4>
        {% if existingCategories | length > 0 %}
            <table class="table table-hover">
                <thead class="thead-dark">
                    <tr>
                        <th scope="col" width="10%">{{ 'Code' | trad }}</th>
                        <th scope="col" width="">{{ 'Libellé' | trad }}</th>
                    </tr>
                </thead>
                <tbody>
                    {% for code, libelle in existingCategories %}
                        <tr id="cat{{ code }}">
                            <td>{{ code }}</td>
                            <td>{{ libelle }}</td>
                        </tr>
                    {% endfor %}
                </tbody>
            </table>
        {% else %}
            <p>
                {{ 'Le fichier d\'import ne contenait aucune catégorie déjà existante.' | trad }}
            </p>
        {% endif %}
	</div>
{% endblock %}
