]> Raphaël G. Git Repositories - airbundle/blob - Resources/views/session/view.html.twig
Add countries
[airbundle] / Resources / views / session / view.html.twig
1 {% extends '@RapsysAir/body.html.twig' %}
2 {% block content %}
3 <article id="dashboard"{% if session.application.canceled is defined and session.application.canceled %} class="canceled"{% endif %}>
4 <header>
5 <h2>
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>
9 {% endif %}
10 <a href="{{ path('rapsys_air_location_view', {'id': session.location.id}) }}">{{ session.location.at }}</a>
11 </h2>
12 <p>{{ description }}</p>
13 </header>
14 <div class="panel">
15 <div class="grid four">
16 <section class="cell">
17 <h3>{% trans %}Organizer{% endtrans %}</h3>
18 <dl>
19 <dt>{% trans %}Attributed to{% endtrans %}</dt>
20 <dd>
21 {% if session.application is null %}
22 {% trans %}None{% endtrans %}
23 {% else %}
24 <a href="{{ path('rapsys_air_user_view', {'id': session.application.user.id}) }}">{{ session.application.user.title }}</a>
25 {% endif %}
26 </dd>
27 </dl>
28 {% if session.snippet.description is defined and session.snippet.description %}
29 <dl>
30 <dt>{% trans %}Description{% endtrans %}</dt>
31 <dd>{{ session.snippet.description|striptags|markdown_to_html }}</dd>
32 </dl>
33 {% endif %}
34 {% if session.snippet.class is defined and session.snippet.class %}
35 <dl>
36 <dt>{% trans %}Class{% endtrans %}</dt>
37 <dd>{{ session.snippet.class|striptags|markdown_to_html }}</dd>
38 </dl>
39 {% endif %}
40 {% if session.snippet.contact is defined and session.snippet.contact %}
41 <dl>
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>
44 </dl>
45 {% endif %}
46 {% if session.snippet.donate is defined and session.snippet.donate %}
47 <dl>
48 <dt>{% trans %}Donate{% endtrans %}</dt>
49 <dd><a href="{{ session.snippet.donate }}">{{ 'Donate to %pseudonym%'|trans({'%pseudonym%': session.application.user.title}) }}</a></dd>
50 </dl>
51 {% endif %}
52 {% if session.snippet.link is defined and session.snippet.link %}
53 <dl>
54 <dt>{% trans %}Link{% endtrans %}</dt>
55 <dd><a href="{{ session.snippet.link }}">{{ 'Link to %pseudonym%'|trans({'%pseudonym%': session.application.user.title}) }}</a></dd>
56 </dl>
57 {% endif %}
58 {% if session.snippet.profile is defined and session.snippet.profile %}
59 <dl>
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>
62 </dl>
63 {% endif %}
64 {% if session.snippet.rate is defined and session.snippet.rate %}
65 {% if session.snippet.hat is defined and session.snippet.hat %}
66 <dl>
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>
69 </dl>
70 {% else %}
71 <dl>
72 <dt>{% trans %}Rate{% endtrans %}</dt>
73 <dd>{% if session.snippet.rate == 0 %}{% trans %}Free{% endtrans %}{% else %}{{ session.snippet.rate }} €{% endif %}</dd>
74 </dl>
75 {% endif %}
76 {% endif %}
77 </section>
78 <section class="cell">
79 <h3>{% trans %}Schedule{% endtrans %}</h3>
80 <dl>
81 <dt>{% trans %}Date{% endtrans %}</dt>
82 <dd>{{ session.start|localizeddate('long', 'none') }}</dd>
83 </dl>
84 <dl>
85 <dt>{% trans %}Start{% endtrans %}</dt>
86 <dd>{{ session.start|localizeddate('none', 'medium') }}</dd>
87 </dl>
88 <dl>
89 <dt>{% trans %}Stop{% endtrans %}</dt>
90 <dd>{{ session.stop|localizeddate('none', 'medium') }}</dd>
91 </dl>
92 <dl>
93 <dt>{% trans %}Length{% endtrans %}</dt>
94 <dd>{{ session.length|localizeddate('none', 'short', null, null, 'HH:mm') }}</dd>
95 </dl>
96 <dl>
97 <dt>{% trans %}Slot{% endtrans %}</dt>
98 <dd>{{ session.slot.title }}</dd>
99 </dl>
100 <dl>
101 <dt>{% trans %}Locked{% endtrans %}</dt>
102 <dd>
103 {% if session.locked is null %}
104 {% trans %}None{% endtrans %}
105 {% else %}
106 {{ session.locked|localizeddate('long', 'medium') }}
107 {% endif %}
108 </dd>
109 </dl>
110 <dl>
111 <dt>{% trans %}Created{% endtrans %}</dt>
112 <dd>{{ session.created|localizeddate('long', 'medium') }}</dd>
113 </dl>
114 <dl>
115 <dt>{% trans %}Updated{% endtrans %}</dt>
116 <dd>{{ session.updated|localizeddate('long', 'medium') }}</dd>
117 </dl>
118 </section>
119 <section class="cell">
120 <h3>{% trans %}Weather{% endtrans %}</h3>
121 {% if session.rainrisk is not null %}
122 <dl>
123 <dt>{% trans %}Rainrisk{% endtrans %}</dt>
124 <dd>{{ session.rainrisk }}</dd>
125 </dl>
126 {% endif %}
127 {% if session.rainfall is not null %}
128 <dl>
129 <dt>{% trans %}Rainfall{% endtrans %}</dt>
130 <dd>{{ session.rainfall }}</dd>
131 </dl>
132 {% endif %}
133 {% if session.realfeel is not null %}
134 <dl>
135 <dt>{% trans %}Realfeel{% endtrans %}</dt>
136 <dd>{{ session.realfeel }}</dd>
137 </dl>
138 {% endif %}
139 {% if session.realfeelmin is not null %}
140 <dl>
141 <dt>{% trans %}Realfeel min{% endtrans %}</dt>
142 <dd>{{ session.realfeelmin }}</dd>
143 </dl>
144 {% endif %}
145 {% if session.realfeelmax is not null %}
146 <dl>
147 <dt>{% trans %}Realfeel max{% endtrans %}</dt>
148 <dd>{{ session.realfeelmax }}</dd>
149 </dl>
150 {% endif %}
151 {% if session.temperature is not null %}
152 <dl>
153 <dt>{% trans %}Temperature{% endtrans %}</dt>
154 <dd>{{ session.temperature }}</dd>
155 </dl>
156 {% endif %}
157 {% if session.temperaturemin is not null %}
158 <dl>
159 <dt>{% trans %}Temperature min{% endtrans %}</dt>
160 <dd>{{ session.temperaturemin }}</dd>
161 </dl>
162 {% endif %}
163 {% if session.temperaturemax is not null %}
164 <dl>
165 <dt>{% trans %}Temperature max{% endtrans %}</dt>
166 <dd>{{ session.temperaturemax }}</dd>
167 </dl>
168 {% endif %}
169 </section>
170 <section class="cell">
171 <h3>{% trans %}Location{% endtrans %}</h3>
172 <dl>
173 {# infos #}
174 <dt>{% trans %}Location{% endtrans %}</dt>
175 <dd><a href="{{ path('rapsys_air_location_view', {'id': session.location.id}) }}">{{ session.location.title }}</a></dd>
176 </dl>
177 <dl>
178 {# location #}
179 <dt>{% trans %}Address{% endtrans %}</dt>
180 <dd>
181 {{ session.location.address }}
182 {{ session.location.zipcode }} {{ session.location.city }}
183 </dd>
184 </dl>
185 <dl>
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>
189 </dl>
190 <dl>
191 <dt>{% trans %}Minimap{% endtrans %}</dt>
192 <dd>TODO: minimap</dd>
193 </dl>
194 </section>
195 </div>
196 {{ include('@RapsysAir/form/_toolbox.html.twig') }}
197 </div>
198 <article>
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 %}
204 </section>
205 {% else %}
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>
209 <dl>
210 <dt>{% trans %}Score{% endtrans %}</dt>
211 <dd>
212 {% if application.score is null %}
213 {% trans %}None{% endtrans %}
214 {% else %}
215 {{ application.score }}</dd>
216 {% endif %}
217 </dl>
218 <dl>
219 <dt>{% trans %}Created{% endtrans %}</dt>
220 <dd>{{ application.created|localizeddate('long', 'medium') }}</dd>
221 </dl>
222 <dl>
223 <dt>{% trans %}Updated{% endtrans %}</dt>
224 <dd>{{ application.updated|localizeddate('long', 'medium') }}</dd>
225 </dl>
226 <dl>
227 <dt>{% trans %}Canceled{% endtrans %}</dt>
228 <dd>
229 {% if application.canceled is null %}
230 {% trans %}None{% endtrans %}
231 {% else %}
232 {{ application.canceled|localizeddate('long', 'medium') }}
233 {% endif %}
234 </dd>
235 </dl>
236 </article>
237 {% endfor %}
238 {% endif %}
239 </div>
240 </article>
241 </article>
242 {{ include('@RapsysAir/default/_location.html.twig') }}
243 {% endblock %}