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