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