From 4a2b9f02e8b4c4f0bad1c388277a135e2acbe453 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Thu, 13 Oct 2022 14:59:32 +0200 Subject: [PATCH] New layout --- Resources/views/default/_location.html.twig | 124 +++++++++++++++----- 1 file changed, 94 insertions(+), 30 deletions(-) diff --git a/Resources/views/default/_location.html.twig b/Resources/views/default/_location.html.twig index 565e409..4f1be81 100644 --- a/Resources/views/default/_location.html.twig +++ b/Resources/views/default/_location.html.twig @@ -3,54 +3,118 @@

{% trans %}Locations{% endtrans %}

- {% if forms.snippets is defined %} + {% if locations_description is defined %} +

{{ locations_description }}

+ {% elseif forms.snippets is defined %}

{% trans %}Organizer's snippet by dance space{% endtrans %}

{% else %}

{% trans %}Libre Air location list{% endtrans %}

{% endif %}
-
- {% for id, title in locations %} -
-

{{ title }}

- {% if forms.snippets is defined and forms.snippets[id] is defined and forms.snippets[id] %} - {{ form_start(forms.snippets[id]) }} -
- {{ form_row(forms.snippets[id].description) }} - - {{ form_row(forms.snippets[id].class) }} + {% if multimap is defined and multimap %} + + {% endif %} + {% if forms.snippets is defined %} +
+ {% for i, l in locations %} +
+
+ {# TODO XXX virer le if l.link id defined when user view is fixed !!! #} +

{% if multimap is defined and multimap %}{{ i }} {% endif %}{{ l.title }}

+
+ {% if forms.snippets[i] is defined and forms.snippets[i] %} + {{ form_start(forms.snippets[i]) }} +
+ {% if forms.snippets[i].description is defined %} + {{ form_row(forms.snippets[i].description) }} + {% endif %} - {{ form_row(forms.snippets[id].short) }} + {% if forms.snippets[i].class is defined %} + {{ form_row(forms.snippets[i].class) }} + {% endif %} - {{ form_row(forms.snippets[id].rate) }} + {% if forms.snippets[i].short is defined %} + {{ form_row(forms.snippets[i].short) }} + {% endif %} - {{ form_row(forms.snippets[id].hat) }} + {% if forms.snippets[i].rate is defined %} + {{ form_row(forms.snippets[i].rate) }} + {% endif %} - {{ form_row(forms.snippets[id].contact) }} + {% if forms.snippets[i].hat is defined %} + {{ form_row(forms.snippets[i].hat) }} + {% endif %} - {{ form_row(forms.snippets[id].donate) }} + {% if forms.snippets[i].contact is defined %} + {{ form_row(forms.snippets[i].contact) }} + {% endif %} - {{ form_row(forms.snippets[id].link) }} + {% if forms.snippets[i].donate is defined %} + {{ form_row(forms.snippets[i].donate) }} + {% endif %} - {{ form_row(forms.snippets[id].profile) }} + {% if forms.snippets[i].link is defined %} + {{ form_row(forms.snippets[i].link) }} + {% endif %} - {{ form_row(forms.snippets[id].image) }} + {% if forms.snippets[i].profile is defined %} + {{ form_row(forms.snippets[i].profile) }} + {% endif %} - {{ form_row(forms.snippets[id].submit) }} + {{ form_row(forms.snippets[i].submit) }} +
- {% if forms.snippets[id].delete is defined %} - {{ form_row(forms.snippets[id].delete) }} - {% endif %} + {# render csrf token etc .#} +
{{ form_rest(forms.snippets[i]) }}
+ {{ form_end(forms.snippets[i]) }} + {% endif %} + {% if l.image is defined and l.image %} + + {% endif %} + {% if forms.images is defined and forms.images[i] is defined and forms.images[i] %} + {{ form_start(forms.images[i]) }} +
+ {% if forms.images[i].image is defined %} + {{ form_row(forms.images[i].image) }} + {% endif %} - {# render csrf token etc .#} -
{{ form_rest(forms.snippets[id]) }}
- {{ form_end(forms.snippets[id]) }} - {% endif %} -
- {% endfor %} -
+ {{ form_row(forms.images[i].submit) }} + + {% if forms.images[i].delete is defined %} + {{ form_row(forms.images[i].delete) }} + {% endif %} +
+ + {# render csrf token etc .#} +
{{ form_rest(forms.images[i]) }}
+ {{ form_end(forms.images[i]) }} + {% endif %} +
+ {% endfor %} +
+ {% else %} +
    + {% for i, l in locations %} + {# TODO XXX virer le if l.link id defined when user view is fixed !!! #} +
  • {% if multimap is defined and multimap %}{{ i }} {% endif %}{{ l.title }}
  • + {% endfor %} +
+ {% endif %}
{% endif %} -- 2.41.1