1 {% extends '@RapsysAir/body.html.twig' %}
3 <article id="dashboard"{% if session.application.canceled is defined and session.application.canceled %} class="canceled"{% endif %}>
6 <a href="{{ path('rapsys_air_session_view', {'id': session.id}) }}">{{ session.title }}</a>
7 {% if session.application.id is defined and session.application.id %}
8 <a href="{{ path('rapsys_air_user_view', {'id': session.application.user.id}) }}">{{ session.application.user.by }}</a>
10 <a href="{{ path('rapsys_air_location_view', {'id': session.location.id}) }}">{{ session.location.at }}</a>
12 <p>{{ description }}</p>
15 <div class="grid four">
16 <section class="cell">
17 <h3>{% trans %}Organizer{% endtrans %}</h3>
19 <dt>{% trans %}Attributed to{% endtrans %}</dt>
21 {% if session.application is null %}
22 {% trans %}None{% endtrans %}
24 <a href="{{ path('rapsys_air_user_view', {'id': session.application.user.id}) }}">{{ session.application.user.title }}</a>
28 {% if session.snippet.description is defined and session.snippet.description %}
30 <dt>{% trans %}Description{% endtrans %}</dt>
31 <dd>{{ session.snippet.description|striptags|markdown_to_html }}</dd>
34 {% if session.snippet.class is defined and session.snippet.class %}
36 <dt>{% trans %}Class{% endtrans %}</dt>
37 <dd>{{ session.snippet.class|striptags|markdown_to_html }}</dd>
40 {% if session.snippet.contact is defined and session.snippet.contact %}
42 <dt>{% trans %}Contact{% endtrans %}</dt>
43 <dd><a href="{{ session.snippet.contact }}">{{ 'Send a message to %pseudonym%'|trans({'%pseudonym%': session.application.user.title}) }}</a></dd>
46 {% if session.snippet.donate is defined and session.snippet.donate %}
48 <dt>{% trans %}Donate{% endtrans %}</dt>
49 <dd><a href="{{ session.snippet.donate }}">{{ 'Donate to %pseudonym%'|trans({'%pseudonym%': session.application.user.title}) }}</a></dd>
52 {% if session.snippet.link is defined and session.snippet.link %}
54 <dt>{% trans %}Link{% endtrans %}</dt>
55 <dd><a href="{{ session.snippet.link }}">{{ 'Link to %pseudonym%'|trans({'%pseudonym%': session.application.user.title}) }}</a></dd>
58 {% if session.snippet.profile is defined and session.snippet.profile %}
60 <dt>{% trans %}Social network{% endtrans %}</dt>
61 <dd><a href="{{ session.snippet.profile }}">{{ 'Consult %pseudonym% profile'|trans({'%pseudonym%': session.application.user.title}) }}</a></dd>
64 {% if session.snippet.rate is defined and session.snippet.rate %}
65 {% if session.snippet.hat is defined and session.snippet.hat %}
67 <dt>{% trans %}Contribution{% endtrans %}</dt>
68 <dd>{% 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 %}</dd>
72 <dt>{% trans %}Rate{% endtrans %}</dt>
73 <dd>{% if session.snippet.rate == 0 %}{% trans %}Free{% endtrans %}{% else %}{{ session.snippet.rate }} €{% endif %}</dd>
78 <section class="cell">
79 <h3>{% trans %}Schedule{% endtrans %}</h3>
81 <dt>{% trans %}Date{% endtrans %}</dt>
82 <dd>{{ session.start|localizeddate('long', 'none') }}</dd>
85 <dt>{% trans %}Start{% endtrans %}</dt>
86 <dd>{{ session.start|localizeddate('none', 'medium') }}</dd>
89 <dt>{% trans %}Stop{% endtrans %}</dt>
90 <dd>{{ session.stop|localizeddate('none', 'medium') }}</dd>
93 <dt>{% trans %}Length{% endtrans %}</dt>
94 <dd>{{ session.length|localizeddate('none', 'short', null, null, 'HH:mm') }}</dd>
97 <dt>{% trans %}Slot{% endtrans %}</dt>
98 <dd>{{ session.slot.title }}</dd>
101 <dt>{% trans %}Locked{% endtrans %}</dt>
103 {% if session.locked is null %}
104 {% trans %}None{% endtrans %}
106 {{ session.locked|localizeddate('long', 'medium') }}
111 <dt>{% trans %}Created{% endtrans %}</dt>
112 <dd>{{ session.created|localizeddate('long', 'medium') }}</dd>
115 <dt>{% trans %}Updated{% endtrans %}</dt>
116 <dd>{{ session.updated|localizeddate('long', 'medium') }}</dd>
119 <section class="cell">
120 <h3>{% trans %}Weather{% endtrans %}</h3>
121 {% if session.rainrisk is not null %}
123 <dt>{% trans %}Rainrisk{% endtrans %}</dt>
124 <dd>{{ session.rainrisk }}</dd>
127 {% if session.rainfall is not null %}
129 <dt>{% trans %}Rainfall{% endtrans %}</dt>
130 <dd>{{ session.rainfall }}</dd>
133 {% if session.realfeel is not null %}
135 <dt>{% trans %}Realfeel{% endtrans %}</dt>
136 <dd>{{ session.realfeel }}</dd>
139 {% if session.realfeelmin is not null %}
141 <dt>{% trans %}Realfeel min{% endtrans %}</dt>
142 <dd>{{ session.realfeelmin }}</dd>
145 {% if session.realfeelmax is not null %}
147 <dt>{% trans %}Realfeel max{% endtrans %}</dt>
148 <dd>{{ session.realfeelmax }}</dd>
151 {% if session.temperature is not null %}
153 <dt>{% trans %}Temperature{% endtrans %}</dt>
154 <dd>{{ session.temperature }}</dd>
157 {% if session.temperaturemin is not null %}
159 <dt>{% trans %}Temperature min{% endtrans %}</dt>
160 <dd>{{ session.temperaturemin }}</dd>
163 {% if session.temperaturemax is not null %}
165 <dt>{% trans %}Temperature max{% endtrans %}</dt>
166 <dd>{{ session.temperaturemax }}</dd>
170 <section class="cell">
171 <h3>{% trans %}Location{% endtrans %}</h3>
174 <dt>{% trans %}Location{% endtrans %}</dt>
175 <dd><a href="{{ path('rapsys_air_location_view', {'id': session.location.id}) }}">{{ session.location.title }}</a></dd>
179 <dt>{% trans %}Address{% endtrans %}</dt>
181 {{ session.location.address }}
182 {{ session.location.zipcode }} {{ session.location.city }}
186 <dt>{% trans %}Maps{% endtrans %}</dt>
187 <dd><a href="https://www.google.fr/maps/@{{ session.location.latitude }},{{ session.location.longitude }},19z">Google Maps</a></dd>
188 <dd><a href="https://www.openstreetmap.org/#map=19/{{ session.location.latitude }}/{{ session.location.longitude }}">OpenStreetMap</a></dd>
191 <dt>{% trans %}Minimap{% endtrans %}</dt>
192 <dd>TODO: minimap</dd>
196 {{ include('@RapsysAir/form/_toolbox.html.twig') }}
199 <h3>{% trans %}Candidates{% endtrans %}</h3>
200 <div class="panel grid four">
201 {% if session.applications is null %}
202 <section class="cell">
203 {% trans %}None{% endtrans %}
206 {% for application in session.applications %}
207 <article class="cell">
208 <h4><a href="{{ path('rapsys_air_user_view', {'id': application.user.id} ) }}">{{ application.user.title }}</a></h4>
210 <dt>{% trans %}Score{% endtrans %}</dt>
212 {% if application.score is null %}
213 {% trans %}None{% endtrans %}
215 {{ application.score }}</dd>
219 <dt>{% trans %}Created{% endtrans %}</dt>
220 <dd>{{ application.created|localizeddate('long', 'medium') }}</dd>
223 <dt>{% trans %}Updated{% endtrans %}</dt>
224 <dd>{{ application.updated|localizeddate('long', 'medium') }}</dd>
227 <dt>{% trans %}Canceled{% endtrans %}</dt>
229 {% if application.canceled is null %}
230 {% trans %}None{% endtrans %}
232 {{ application.canceled|localizeddate('long', 'medium') }}
242 {{ include('@RapsysAir/default/_location.html.twig') }}