Commit 86c2d35d authored by ornanovitch's avatar ornanovitch 🐃

list correction+ accordion

parent 8fa08038
......@@ -14,6 +14,7 @@
{% include 'header.html.twig' %}
<div class="container rounded border border-light bg-dark" id="presentation_spectacle"></div>
<div class="container mb-5">
{% block body %}
{% if app.request.hasPreviousSession %}
{% for label, messages in app.flashes %}
......@@ -25,7 +26,6 @@
{% endfor %}
{% endif %}
{% block body %}
{% endblock %}
</div>
......
......@@ -3,41 +3,39 @@
{% block body %}
<h1 class="w-100 font-weight-bold mb-3">LES THÉÂTRES BALISES</h1>
<div class="col">
<div class="accordion" id="accordionTheatersBalises">
{% set city = "" %}
{% for theater in theaters|sort((a, b) => a.city <=> b.city) %}
{% if city != theater.city %}
<div class="card bg-dark border-y border-light">
<a class="h4 card-header collapsed text-light"
type="button"
data-toggle="collapse"
data-target="#{{ theater.city | replace({' ': '_', '\'': '-'}) }}"
aria-expanded="true" aria-controls="{{ theater.city | replace({' ': '_', '\'': '-'}) }}">
<div id="card-{{ theater.city | replace({' ': '_', '\'': '-'}) }}">
<i class="fas fa-chevron-down"></i>
{{ theater.city | upper }}
</div>
</a>
{% endif %}
<div id="{{ theater.city | replace({' ': '_', '\'': '-'}) }}"
class="collapse"
aria-labelledby="{{ theater.city | replace({' ': '_', '\'': '-'}) }}"
data-parent="#accordionTheatersBalises">
<div class="card-body bg-light">
<div class="d-flex align-items-center">
<a class="h5 p-2 text-dark flex-grow-1 font-weight-bold" href="{{ path('theater_show_visitors' ,{'id': theater.id}) }}"> {{ theater.nameAlt }}</a>
<!-- futur lien vers la carte -->
{# <a class="p-2 text-dark" href="{{ path('theater_show_visitors' ,{'id': theater.id}) }} "><i class="fas fa-map-marked-alt fa-2x"></i></a> #}
<a class="p-2 text-dark" href="{{ theater.website }}"><i class="fas fa-external-link-alt fa-2x"></i></a>
</div>
<div class="accordion" id="accordionTheatersBalises">
{% set city = "" %}
{% for theater in theaters|sort((a, b) => a.city <=> b.city) %}
{% if city != theater.city %}
<div class="card bg-dark border-y border-light">
<a class="h4 card-header collapsed text-light"
type="button"
data-toggle="collapse"
data-target="#{{ theater.city | replace({' ': '_', '\'': '-'}) }}"
aria-expanded="true" aria-controls="{{ theater.city | replace({' ': '_', '\'': '-'}) }}">
<div id="card-{{ theater.city | replace({' ': '_', '\'': '-'}) }}">
<i class="fas fa-chevron-down"></i>
{{ theater.city | upper }}
</div>
</a>
{% endif %}
<div id="{{ theater.city | replace({' ': '_', '\'': '-'}) }}"
class="collapse"
aria-labelledby="{{ theater.city | replace({' ': '_', '\'': '-'}) }}"
data-parent="#accordionTheatersBalises">
<div class="card-body bg-light">
<div class="d-flex align-items-center">
<a class="h5 p-2 text-dark flex-grow-1 font-weight-bold" href="{{ path('theater_show_visitors' ,{'id': theater.id}) }}"> {{ theater.nameAlt }}</a>
<!-- futur lien vers la carte -->
{# <a class="p-2 text-dark" href="{{ path('theater_show_visitors' ,{'id': theater.id}) }} "><i class="fas fa-map-marked-alt fa-2x"></i></a> #}
<a class="p-2 text-dark" href="{{ theater.website }}"><i class="fas fa-external-link-alt fa-2x"></i></a>
</div>
</div>
{% if city != "" %}
</div>
{% endif %}
{% if city != "" %}
</div>
{% set city = theater.city %}
{% endfor %}
{% endif %}
</div>
{% set city = theater.city %}
{% endfor %}
{% endblock %}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment