]> Raphaël G. Git Repositories - airbundle/blob - Resources/views/session/view.html.twig
Force cast of simple xml element to string
[airbundle] / Resources / views / session / view.html.twig
1 {% extends '@RapsysAir/base.html.twig' %}
2 {% block content %}
3 <article class="session{% if session.locked is defined and session.locked %} locked{% elseif session.application.canceled is defined and session.application.canceled %} canceled{% endif %}">
4 <header>
5 <h2>{{ title.page }}</h2>
6 <p>{{ description }}</p>
7 </header>
8 <div class="panel">
9 <div class="grid three">
10 <section class="cell">
11 <header>
12 <h3>{% trans %}Program{% endtrans %}</h3>
13 </header>
14 <dl>
15 <dt>{% trans %}Date and schedule{% endtrans %}</dt>
16 <dd>{{ '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')}) }}</dd>
17 </dl>
18 {% if session.application is defined and session.application %}
19 {% if session.application.dance is defined and session.application.dance %}
20 <dl>
21 <dt>{% trans %}Activity{% endtrans %}</dt>
22 {#<dd>{{ session.application.dance.title }}</dd>#}
23 <dd><a href="{{ session.application.dance.link }}">{{ session.application.dance.title }}</a></dd>
24 </dl>
25 {% endif %}
26 {% if session.application.user is defined and session.application.user %}
27 <dl>
28 <dt>{% trans %}Organizer{% endtrans %}</dt>
29 <dd><a href="{{ session.application.user.link }}">{{ session.application.user.title }}</a></dd>
30 </dl>
31 {% endif %}
32 {% if session.snippet is defined and session.snippet %}
33 {% if session.snippet.description is defined and session.snippet.description %}
34 <dl>
35 <dt>{% trans %}Description{% endtrans %}</dt>
36 <dd>{{ session.snippet.description|striptags|markdown_to_html }}</dd>
37 </dl>
38 {% endif %}
39 {% if session.snippet.class is defined and session.snippet.class %}
40 <dl>
41 <dt>{% trans %}Class{% endtrans %}</dt>
42 <dd>{{ session.snippet.class|striptags|markdown_to_html }}</dd>
43 </dl>
44 {% endif %}
45 {% if session.snippet.contact is defined and session.snippet.contact %}
46 <dl>
47 <dt>{% trans %}Contact{% endtrans %}</dt>
48 <dd><a href="{{ session.application.user.contact }}">{{ 'Send a message to %pseudonym%'|trans({'%pseudonym%': session.application.user.title}) }}</a></dd>
49 </dl>
50 {% endif %}
51 {% if session.snippet.donate is defined and session.snippet.donate %}
52 <dl>
53 <dt>{% trans %}Donate{% endtrans %}</dt>
54 <dd><a href="{{ session.snippet.donate }}">{{ 'Donate to %pseudonym%'|trans({'%pseudonym%': session.application.user.title}) }}</a></dd>
55 </dl>
56 {% endif %}
57 {% if session.snippet.link is defined and session.snippet.link %}
58 <dl>
59 <dt>{% trans %}Link{% endtrans %}</dt>
60 <dd><a href="{{ session.snippet.link }}">{{ 'Link to %pseudonym%'|trans({'%pseudonym%': session.application.user.title}) }}</a></dd>
61 </dl>
62 {% endif %}
63 {% if session.snippet.profile is defined and session.snippet.profile %}
64 <dl>
65 <dt>{% trans %}Social network{% endtrans %}</dt>
66 <dd><a href="{{ session.snippet.profile }}">{{ 'Consult %pseudonym% profile'|trans({'%pseudonym%': session.application.user.title}) }}</a></dd>
67 </dl>
68 {% endif %}
69 {% if session.snippet.rate is defined and session.snippet.rate %}
70 {% if session.snippet.hat is defined and session.snippet.hat %}
71 <dl>
72 <dt>{% trans %}Contribution to costs{% endtrans %}</dt>
73 <dd>{% 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 %}</dd>
74 </dl>
75 {% else %}
76 <dl>
77 <dt>{% trans %}Contribution{% endtrans %}</dt>
78 <dd>{% if session.snippet.rate == 0 %}{% trans %}Free{% endtrans %}{% else %}{{ session.snippet.rate }} €{% endif %}</dd>
79 </dl>
80 {% endif %}
81 {% endif %}
82 {% endif %}
83 {% endif %}
84 {% if session.locked is defined and session.locked %}
85 <dl>
86 <dt>{% trans %}Locked{% endtrans %}</dt>
87 <dd>{{ session.locked|intldate('long', 'medium') }}</dd>
88 </dl>
89 {% endif %}
90 <dl>
91 <dt>{% trans %}Created{% endtrans %}</dt>
92 <dd>{{ session.created|intldate('long', 'medium') }}</dd>
93 </dl>
94 <dl>
95 <dt>{% trans %}Updated{% endtrans %}</dt>
96 <dd>{{ session.updated|intldate('long', 'medium') }}</dd>
97 </dl>
98 </section>
99 <section class="cell">
100 <header>
101 <h3>{% trans %}Location{% endtrans %}</h3>
102 </header>
103 <dl>
104 <dt>{% trans %}Place{% endtrans %}</dt>
105 <dd><a href="{{ session.location.link }}">{{ session.location.title }}</a></dd>
106 </dl>
107 <dl>
108 <dt>{% trans %}Description{% endtrans %}</dt>
109 <dd>{{ session.location.description }}</dd>
110 </dl>
111 <dl>
112 <dt>{% trans %}Interiority{% endtrans %}</dt>
113 <dd>{% if session.location.indoor is defined and session.location.indoor%}{% trans %}Indoor{% endtrans %}{% else %}{% trans %}Outdoor{% endtrans %}{% endif %}</dd>
114 </dl>
115 <dl>
116 <dt>{% trans %}Address{% endtrans %}</dt>
117 <dd>
118 {{ session.location.address }}
119 {{ session.location.zipcode }} {{ session.location.city }}
120 </dd>
121 </dl>
122 <dl>
123 <dt>{% trans %}GPS coordinates{% endtrans %}</dt>
124 <dd>
125 {{ session.location.latitude }},{{ session.location.longitude }}
126 </dd>
127 </dl>
128 <dl>
129 <dt>{% trans %}Maps{% endtrans %}</dt>
130 <dd>
131 <a href="https://www.google.fr/maps/@{{ session.location.latitude }},{{ session.location.longitude }},19z">Google Maps</a>
132 </dd>
133 <dd>
134 <a href="https://www.openstreetmap.org/#map=19/{{ session.location.latitude }}/{{ session.location.longitude }}">OpenStreetMap</a>
135 </dd>
136 </dl>
137 {% if map is defined and map %}
138 <dl class="map">
139 <dt>{% trans %}Access map{% endtrans %}</dt>
140 <dd>
141 <a href="{{ map.link }}" title="{{ map.caption }}">
142 <figure>
143 <img src="{{ map.src }}" alt="{{ map.caption }}" width="{{ map.width }}" height="{{ map.height }}" />
144 <figcaption>{{ map.caption }}</figcaption>
145 </figure>
146 </a>
147 </dd>
148 </dl>
149 {% endif %}
150 </section>
151 <section class="cell">
152 <header>
153 <h3>{% trans %}Weather{% endtrans %}</h3>
154 </header>
155 {% if session.rainrisk is not null %}
156 <dl>
157 <dt>{% trans %}Rainrisk{% endtrans %}</dt>
158 <dd>{{ session.rainrisk }}</dd>
159 </dl>
160 {% endif %}
161 {% if session.rainfall is not null %}
162 <dl>
163 <dt>{% trans %}Rainfall{% endtrans %}</dt>
164 <dd>{{ session.rainfall }}</dd>
165 </dl>
166 {% endif %}
167 {% if session.realfeel is not null %}
168 <dl>
169 <dt>{% trans %}Realfeel{% endtrans %}</dt>
170 <dd>{{ session.realfeel }}</dd>
171 </dl>
172 {% endif %}
173 {% if session.realfeelmin is not null %}
174 <dl>
175 <dt>{% trans %}Realfeel min{% endtrans %}</dt>
176 <dd>{{ session.realfeelmin }}</dd>
177 </dl>
178 {% endif %}
179 {% if session.realfeelmax is not null %}
180 <dl>
181 <dt>{% trans %}Realfeel max{% endtrans %}</dt>
182 <dd>{{ session.realfeelmax }}</dd>
183 </dl>
184 {% endif %}
185 {% if session.temperature is not null %}
186 <dl>
187 <dt>{% trans %}Temperature{% endtrans %}</dt>
188 <dd>{{ session.temperature }}</dd>
189 </dl>
190 {% endif %}
191 {% if session.temperaturemin is not null %}
192 <dl>
193 <dt>{% trans %}Temperature min{% endtrans %}</dt>
194 <dd>{{ session.temperaturemin }}</dd>
195 </dl>
196 {% endif %}
197 {% if session.temperaturemax is not null %}
198 <dl>
199 <dt>{% trans %}Temperature max{% endtrans %}</dt>
200 <dd>{{ session.temperaturemax }}</dd>
201 </dl>
202 {% endif %}
203 </section>
204 {% if is_granted('ROLE_GUEST') %}
205 <section class="cell">
206 <header>
207 <h3>{% trans %}Candidates{% endtrans %}</h3>
208 </header>
209 <div class="panel">
210 <div class="grid{% if session.applications is defined %}{% if session.applications|length >= 4 %} four{% elseif session.applications|length >= 3 %} three{% elseif session.applications|length >= 2 %} two{% endif %}{% endif %}">
211 {% if session.applications is defined and session.applications %}
212 {% for application in session.applications %}
213 <section class="cell">
214 <header>
215 {% if application.user.id == 1 and application.user.title|slug == 'milonga-raphael' %}
216 <h3><a href="{{ path('rapsysair_user_milongaraphael') }}">{{ application.user.title }}</a></h3>
217 {% else %}
218 <h3><a href="{{ path('rapsysair_user_view', {'id': application.user.id, 'user': application.user.title|slug}) }}">{{ application.user.title }}</a></h3>
219 {% endif %}
220 </header>
221 <dl>
222 <dt>{% trans %}Score{% endtrans %}</dt>
223 <dd>
224 {% if application.score is null %}
225 {% trans %}None{% endtrans %}
226 {% else %}
227 {{ application.score }}</dd>
228 {% endif %}
229 </dl>
230 <dl>
231 <dt>{% trans %}Created{% endtrans %}</dt>
232 <dd>{{ application.created|intldate('long', 'medium') }}</dd>
233 </dl>
234 <dl>
235 <dt>{% trans %}Updated{% endtrans %}</dt>
236 <dd>{{ application.updated|intldate('long', 'medium') }}</dd>
237 </dl>
238 <dl>
239 <dt>{% trans %}Canceled{% endtrans %}</dt>
240 <dd>
241 {% if application.canceled is null %}
242 {% trans %}None{% endtrans %}
243 {% else %}
244 {{ application.canceled|intldate('long', 'medium') }}
245 {% endif %}
246 </dd>
247 </dl>
248 </section>
249 {% endfor %}
250 {% else %}
251 <section class="cell">
252 {% trans %}None{% endtrans %}
253 </section>
254 {% endif %}
255 </div>
256 </div>
257 </section>
258 {% endif %}
259 </div>
260 {{ include('@RapsysAir/form/_toolbox.html.twig') }}
261 </div>
262 </article>
263 {{ include('@RapsysAir/default/_location.html.twig') }}
264 {% endblock %}