From c99350a6b27d74c60076ed5661cfde2b3724cea6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Thu, 13 Oct 2022 15:20:45 +0200 Subject: [PATCH] New header layout New session layout --- Resources/views/session/view.html.twig | 327 +++++++++++++------------ 1 file changed, 176 insertions(+), 151 deletions(-) diff --git a/Resources/views/session/view.html.twig b/Resources/views/session/view.html.twig index 02df6db..aca1710 100644 --- a/Resources/views/session/view.html.twig +++ b/Resources/views/session/view.html.twig @@ -1,123 +1,165 @@ {% extends '@RapsysAir/body.html.twig' %} {% block content %} -
+
-

- {{ session.title }} + {#

{% if session.application.id is defined and session.application.id %} - {{ session.application.user.by }} + {{ session.application.dance.title ~ ' ' ~ session.id }} + {{ session.application.user.by }} + {% else %} + {{ title }} {% endif %} - {{ session.location.at }} -

-

{{ description }}

+ {{ session.location.at }} + #} +

{{ description }}

-
+
-

{% trans %}Organizer{% endtrans %}

+
+

{% trans %}Program{% endtrans %}

+
-
{% trans %}Attributed to{% endtrans %}
-
- {% if session.application is null %} - {% trans %}None{% endtrans %} - {% else %} - {{ session.application.user.title }} - {% endif %} -
+
{% trans %}Date and schedule{% endtrans %}
+
{{ 'The %date% around %start% until %stop%'|trans({'%date%': session.start|intldate('long', 'none'), '%start%': session.start|intldate('none', 'medium'), '%stop%': session.stop|intldate('none', 'medium')}) }}
- {% if session.snippet.description is defined and session.snippet.description %} -
-
{% trans %}Description{% endtrans %}
-
{{ session.snippet.description|striptags|markdown_to_html }}
-
- {% endif %} - {% if session.snippet.class is defined and session.snippet.class %} -
-
{% trans %}Class{% endtrans %}
-
{{ session.snippet.class|striptags|markdown_to_html }}
-
- {% endif %} - {% if session.snippet.contact is defined and session.snippet.contact %} -
-
{% trans %}Contact{% endtrans %}
-
{{ 'Send a message to %pseudonym%'|trans({'%pseudonym%': session.application.user.title}) }}
-
- {% endif %} - {% if session.snippet.donate is defined and session.snippet.donate %} -
-
{% trans %}Donate{% endtrans %}
-
{{ 'Donate to %pseudonym%'|trans({'%pseudonym%': session.application.user.title}) }}
-
- {% endif %} - {% if session.snippet.link is defined and session.snippet.link %} -
-
{% trans %}Link{% endtrans %}
-
{{ 'Link to %pseudonym%'|trans({'%pseudonym%': session.application.user.title}) }}
-
- {% endif %} - {% if session.snippet.profile is defined and session.snippet.profile %} -
-
{% trans %}Social network{% endtrans %}
-
{{ 'Consult %pseudonym% profile'|trans({'%pseudonym%': session.application.user.title}) }}
-
- {% endif %} - {% if session.snippet.rate is defined and session.snippet.rate %} - {% if session.snippet.hat is defined and session.snippet.hat %} + {% if session.application is defined and session.application %} + {% if session.application.dance is defined and session.application.dance %}
-
{% trans %}Contribution{% endtrans %}
-
{% if session.snippet.rate == 0 %}{% trans %}To the hat, to cover the costs: talc, electricity, bicycle, server{% endtrans %}{% else %}{{ 'To the hat, ideally %rate% €, to cover the costs: talc, electricity, bicycle, server'|trans({'%rate%': session.snippet.rate}) }}{% endif %}
+
{% trans %}Activity{% endtrans %}
+ {#
{{ session.application.dance.title }}
#} +
{{ session.application.dance.title }}
- {% else %} + {% endif %} + {% if session.application.user is defined and session.application.user %}
-
{% trans %}Rate{% endtrans %}
-
{% if session.snippet.rate == 0 %}{% trans %}Free{% endtrans %}{% else %}{{ session.snippet.rate }} €{% endif %}
+
{% trans %}Organizer{% endtrans %}
+
{{ session.application.user.title }}
{% endif %} + {% if session.snippet is defined and session.snippet %} + {% if session.snippet.description is defined and session.snippet.description %} +
+
{% trans %}Description{% endtrans %}
+
{{ session.snippet.description|striptags|markdown_to_html }}
+
+ {% endif %} + {% if session.snippet.class is defined and session.snippet.class %} +
+
{% trans %}Class{% endtrans %}
+
{{ session.snippet.class|striptags|markdown_to_html }}
+
+ {% endif %} + {% if session.snippet.contact is defined and session.snippet.contact %} +
+
{% trans %}Contact{% endtrans %}
+
{{ 'Send a message to %pseudonym%'|trans({'%pseudonym%': session.application.user.title}) }}
+
+ {% endif %} + {% if session.snippet.donate is defined and session.snippet.donate %} +
+
{% trans %}Donate{% endtrans %}
+
{{ 'Donate to %pseudonym%'|trans({'%pseudonym%': session.application.user.title}) }}
+
+ {% endif %} + {% if session.snippet.link is defined and session.snippet.link %} +
+
{% trans %}Link{% endtrans %}
+
{{ 'Link to %pseudonym%'|trans({'%pseudonym%': session.application.user.title}) }}
+
+ {% endif %} + {% if session.snippet.profile is defined and session.snippet.profile %} +
+
{% trans %}Social network{% endtrans %}
+
{{ 'Consult %pseudonym% profile'|trans({'%pseudonym%': session.application.user.title}) }}
+
+ {% endif %} + {% if session.snippet.rate is defined and session.snippet.rate %} + {% if session.snippet.hat is defined and session.snippet.hat %} +
+
{% trans %}Contribution to costs{% endtrans %}
+
{% if session.snippet.rate == 0 %}{% trans %}To the hat, to cover: talc, electricity, bicycle, website, ...{% endtrans %}{% else %}{{ 'To the hat, ideally %rate% €, to cover: talc, electricity, bicycle, website, ...'|trans({'%rate%': session.snippet.rate}) }}{% endif %}
+
+ {% else %} +
+
{% trans %}Contribution{% endtrans %}
+
{% if session.snippet.rate == 0 %}{% trans %}Free{% endtrans %}{% else %}{{ session.snippet.rate }} €{% endif %}
+
+ {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% if session.locked is defined and session.locked %} +
+
{% trans %}Locked{% endtrans %}
+
{{ session.locked|intldate('long', 'medium') }}
+
{% endif %} -
-
-

{% trans %}Schedule{% endtrans %}

-
{% trans %}Date{% endtrans %}
-
{{ session.start|localizeddate('long', 'none') }}
+
{% trans %}Created{% endtrans %}
+
{{ session.created|intldate('long', 'medium') }}
-
{% trans %}Start{% endtrans %}
-
{{ session.start|localizeddate('none', 'medium') }}
+
{% trans %}Updated{% endtrans %}
+
{{ session.updated|intldate('long', 'medium') }}
+
+
+
+

{% trans %}Location{% endtrans %}

+
-
{% trans %}Stop{% endtrans %}
-
{{ session.stop|localizeddate('none', 'medium') }}
+
{% trans %}Place{% endtrans %}
+
{{ session.location.title }}
-
{% trans %}Length{% endtrans %}
-
{{ session.length|localizeddate('none', 'short', null, null, 'HH:mm') }}
+
{% trans %}Description{% endtrans %}
+
{{ session.location.description }}
-
{% trans %}Slot{% endtrans %}
-
{{ session.slot.title }}
+
{% trans %}Interiority{% endtrans %}
+
{% if session.location.indoor is defined and session.location.indoor%}{% trans %}Indoor{% endtrans %}{% else %}{% trans %}Outdoor{% endtrans %}{% endif %}
-
{% trans %}Locked{% endtrans %}
+
{% trans %}Address{% endtrans %}
- {% if session.locked is null %} - {% trans %}None{% endtrans %} - {% else %} - {{ session.locked|localizeddate('long', 'medium') }} - {% endif %} + {{ session.location.address }} + {{ session.location.zipcode }} {{ session.location.city }}
-
{% trans %}Created{% endtrans %}
-
{{ session.created|localizeddate('long', 'medium') }}
+
{% trans %}GPS coordinates{% endtrans %}
+
+ {{ session.location.latitude }},{{ session.location.longitude }} +
-
{% trans %}Updated{% endtrans %}
-
{{ session.updated|localizeddate('long', 'medium') }}
+
{% trans %}Maps{% endtrans %}
+
+ Google Maps +
+
+ OpenStreetMap +
+ {% if map is defined and map %} +
+
{% trans %}Access map{% endtrans %}
+
+ +
+ {{ map.caption }} +
{{ map.caption }}
+
+
+
+
+ {% endif %}
-

{% trans %}Weather{% endtrans %}

+
+

{% trans %}Weather{% endtrans %}

+
{% if session.rainrisk is not null %}
{% trans %}Rainrisk{% endtrans %}
@@ -167,77 +209,60 @@
{% endif %}
-
-

{% trans %}Location{% endtrans %}

-
- {# infos #} -
{% trans %}Location{% endtrans %}
-
{{ session.location.title }}
-
-
- {# location #} -
{% trans %}Address{% endtrans %}
-
- {{ session.location.address }} - {{ session.location.zipcode }} {{ session.location.city }} -
-
-
-
{% trans %}Maps{% endtrans %}
-
Google Maps
-
OpenStreetMap
-
-
-
{% trans %}Minimap{% endtrans %}
-
TODO: minimap
-
-
-
- {{ include('@RapsysAir/form/_toolbox.html.twig') }} -
-
-

{% trans %}Candidates{% endtrans %}

-
- {% if session.applications is null %} + {% if is_granted('ROLE_GUEST') %}
- {% trans %}None{% endtrans %} +
+

{% trans %}Candidates{% endtrans %}

+
+
+ {% if session.applications is defined and session.applications %} + {% for application in session.applications %} +
+ {% if application.user.id == 1 and application.user.title|slug == 'milonga-raphael' %} +

{{ application.user.title }}

+ {% else %} +

{{ application.user.title }}

+ {% endif %} +
+
{% trans %}Score{% endtrans %}
+
+ {% if application.score is null %} + {% trans %}None{% endtrans %} + {% else %} + {{ application.score }}
+ {% endif %} +
+
+
{% trans %}Created{% endtrans %}
+
{{ application.created|intldate('long', 'medium') }}
+
+
+
{% trans %}Updated{% endtrans %}
+
{{ application.updated|intldate('long', 'medium') }}
+
+
+
{% trans %}Canceled{% endtrans %}
+
+ {% if application.canceled is null %} + {% trans %}None{% endtrans %} + {% else %} + {{ application.canceled|intldate('long', 'medium') }} + {% endif %} +
+
+
+ {% endfor %} + {% else %} +
+ {% trans %}None{% endtrans %} +
+ {% endif %} +
- {% else %} - {% for application in session.applications %} -
-

{{ application.user.title }}

-
-
{% trans %}Score{% endtrans %}
-
- {% if application.score is null %} - {% trans %}None{% endtrans %} - {% else %} - {{ application.score }}
- {% endif %} -
-
-
{% trans %}Created{% endtrans %}
-
{{ application.created|localizeddate('long', 'medium') }}
-
-
-
{% trans %}Updated{% endtrans %}
-
{{ application.updated|localizeddate('long', 'medium') }}
-
-
-
{% trans %}Canceled{% endtrans %}
-
- {% if application.canceled is null %} - {% trans %}None{% endtrans %} - {% else %} - {{ application.canceled|localizeddate('long', 'medium') }} - {% endif %} -
-
-
- {% endfor %} {% endif %}
-
+ {{ include('@RapsysAir/form/_toolbox.html.twig') }} +
{{ include('@RapsysAir/default/_location.html.twig') }} {% endblock %} -- 2.41.1