From: Raphaƫl Gertz Date: Mon, 28 Dec 2020 08:11:04 +0000 (+0100) Subject: Rewrite user in organizer route X-Git-Tag: 0.1.7~8 X-Git-Url: https://git.rapsys.eu/.gitweb.cgi/airbundle/commitdiff_plain/534677f1a55761375b6d4c61e78be73828918035?hp=a32d2b6c39a7019077bf5dc02325802dfc83d944 Rewrite user in organizer route Add snippet feature Add user donation and site link Cast snippet description in markdown filter Cleanup --- diff --git a/Resources/views/session/index.html.twig b/Resources/views/session/index.html.twig index 291e52a..abfdc20 100644 --- a/Resources/views/session/index.html.twig +++ b/Resources/views/session/index.html.twig @@ -30,18 +30,16 @@ {{ include('@RapsysAir/form/_toolbox.html.twig') }} {% if locations is defined and locations %} -
-
-

{% trans %}Locations{% endtrans %}

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

{{ title }}

-
- {% endfor %} -
-
-
+
+

{% trans %}Locations{% endtrans %}

+
+ {% for id, title in locations %} +
+

{{ title }}

+
+ {% endfor %} +
+
{% endif %} {% endblock %} diff --git a/Resources/views/session/view.html.twig b/Resources/views/session/view.html.twig index 52139cf..c8b78b1 100644 --- a/Resources/views/session/view.html.twig +++ b/Resources/views/session/view.html.twig @@ -1,155 +1,168 @@ {% extends '@RapsysAir/body.html.twig' %} {% block content %} -
-

- {{ session.title }} - {{ session.location.at }} -

-
-
-
-

{% trans %}Organizer{% endtrans %}

-
-
{% trans %}Attributed to{% endtrans %}
-
- {% if session.application is null %} - {% trans %}None{% endtrans %} - {% else %} - {{ session.application.user.title }} - {% endif %} -
-
-
-
TODO: text organisateur
-
TODO: text organisateur
-
-
-
-

{% trans %}Schedule{% endtrans %}

-
-
{% trans %}Slot{% endtrans %}
-
{{ session.slot.title }}
-
-
-
{% trans %}Start{% endtrans %}
-
{{ session.start.format('Y-m-d H:i:s') }}
-
-
-
{% trans %}Stop{% endtrans %}
-
- {% if session.start.format('Y-m-d') != session.stop.format('Y-m-d') %} - {{ session.stop.format('Y-m-d H:i:s') }} - {% else %} - {{ session.stop.format('H:i:s') }} - {% endif %} -
-
-
-
{% trans %}Length{% endtrans %}
-
{{ session.length.format('H:i:s') }}
-
-
-
{% trans %}Locked{% endtrans %}
-
- {% if session.locked is null %} - {% trans %}None{% endtrans %} - {% else %} - {{ session.locked.format('Y-m-d H:i:s') }} - {% endif %} -
-
-
-
{% trans %}Created{% endtrans %}
-
{{ session.created.format('Y-m-d H:i:s') }}
-
-
-
{% trans %}Updated{% endtrans %}
-
{{ session.updated.format('Y-m-d H:i:s') }}
-
-
-
-

{% trans %}Weather{% endtrans %}

- {% if session.rainrisk is not null %} +
+

+ {{ session.title }} + {{ session.location.at }} +

+
+
+
+

{% trans %}Organizer{% endtrans %}

-
{% trans %}Rainrisk{% endtrans %}
-
{{ session.rainrisk }}
+
{% trans %}Attributed to{% endtrans %}
+
+ {% if session.application is null %} + {% trans %}None{% endtrans %} + {% else %} + {{ session.application.user.title }} + {% endif %} +
- {% endif %} - {% if session.rainfall is not null %} + {% if session.snippet.description is defined and session.snippet.description %} +
+
{% trans %}Description{% endtrans %}
+
{{ session.snippet.description|striptags|markdown_to_html }}
+
+ {% endif %} + {% if session.application.user.donation is defined and session.application.user.donation %} +
+
{% trans %}Donation{% endtrans %}
+
{{ 'Contribute to %title%'|trans({'%title%': session.application.user.title}) }}
+
+ {% endif %} + {% if session.application.user.site is defined and session.application.user.site %} +
+
{% trans %}Website{% endtrans %}
+
{{ 'Website of %title%'|trans({'%title%': session.application.user.title}) }}
+
+ {% endif %} +
+
+

{% trans %}Schedule{% endtrans %}

-
{% trans %}Rainfall{% endtrans %}
-
{{ session.rainfall }}
+
{% trans %}Slot{% endtrans %}
+
{{ session.slot.title }}
- {% endif %} - {% if session.realfeel is not null %}
-
{% trans %}Realfeel{% endtrans %}
-
{{ session.realfeel }}
+
{% trans %}Start{% endtrans %}
+
{{ session.start.format('Y-m-d H:i:s') }}
- {% endif %} - {% if session.realfeelmin is not null %}
-
{% trans %}Realfeel min{% endtrans %}
-
{{ session.realfeelmin }}
+
{% trans %}Stop{% endtrans %}
+
+ {% if session.start.format('Y-m-d') != session.stop.format('Y-m-d') %} + {{ session.stop.format('Y-m-d H:i:s') }} + {% else %} + {{ session.stop.format('H:i:s') }} + {% endif %} +
- {% endif %} - {% if session.realfeelmax is not null %}
-
{% trans %}Realfeel max{% endtrans %}
-
{{ session.realfeelmax }}
+
{% trans %}Length{% endtrans %}
+
{{ session.length.format('H:i:s') }}
- {% endif %} - {% if session.temperature is not null %}
-
{% trans %}Temperature{% endtrans %}
-
{{ session.temperature }}
+
{% trans %}Locked{% endtrans %}
+
+ {% if session.locked is null %} + {% trans %}None{% endtrans %} + {% else %} + {{ session.locked.format('Y-m-d H:i:s') }} + {% endif %} +
- {% endif %} - {% if session.temperaturemin is not null %}
-
{% trans %}Temperature min{% endtrans %}
-
{{ session.temperaturemin }}
+
{% trans %}Created{% endtrans %}
+
{{ session.created.format('Y-m-d H:i:s') }}
- {% endif %} - {% if session.temperaturemax is not null %}
-
{% trans %}Temperature max{% endtrans %}
-
{{ session.temperaturemax }}
+
{% trans %}Updated{% endtrans %}
+
{{ session.updated.format('Y-m-d H:i:s') }}
- {% 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
-
-
+
+
+

{% trans %}Weather{% endtrans %}

+ {% if session.rainrisk is not null %} +
+
{% trans %}Rainrisk{% endtrans %}
+
{{ session.rainrisk }}
+
+ {% endif %} + {% if session.rainfall is not null %} +
+
{% trans %}Rainfall{% endtrans %}
+
{{ session.rainfall }}
+
+ {% endif %} + {% if session.realfeel is not null %} +
+
{% trans %}Realfeel{% endtrans %}
+
{{ session.realfeel }}
+
+ {% endif %} + {% if session.realfeelmin is not null %} +
+
{% trans %}Realfeel min{% endtrans %}
+
{{ session.realfeelmin }}
+
+ {% endif %} + {% if session.realfeelmax is not null %} +
+
{% trans %}Realfeel max{% endtrans %}
+
{{ session.realfeelmax }}
+
+ {% endif %} + {% if session.temperature is not null %} +
+
{% trans %}Temperature{% endtrans %}
+
{{ session.temperature }}
+
+ {% endif %} + {% if session.temperaturemin is not null %} +
+
{% trans %}Temperature min{% endtrans %}
+
{{ session.temperaturemin }}
+
+ {% endif %} + {% if session.temperaturemax is not null %} +
+
{% trans %}Temperature max{% endtrans %}
+
{{ session.temperaturemax }}
+
+ {% 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') }}
- {{ include('@RapsysAir/form/_toolbox.html.twig') }} - -

{% trans %}Candidates{% endtrans %}

-
+
{% if session.applications is null %}
{% trans %}None{% endtrans %} @@ -157,7 +170,7 @@ {% else %} {% for application in session.applications %}
-

{{ application.user.title }}

+

{{ application.user.title }}

{% trans %}Score{% endtrans %}
@@ -190,6 +203,17 @@ {% endif %}
-
-
+ + {% if locations is defined and locations %} +
+

{% trans %}Locations{% endtrans %}

+
+ {% for id, title in locations %} +
+

{{ title }}

+
+ {% endfor %} +
+
+ {% endif %} {% endblock %}