]> Raphaƫl G. Git Repositories - airbundle/blob - Resources/views/session/view.html.twig
Prefix title with site title
[airbundle] / Resources / views / session / view.html.twig
1 {% extends '@RapsysAir/body.html.twig' %}
2 {% block content %}
3 <section id="dashboard">
4 <h2>
5 <a href="{{ path('rapsys_air_session_view', {'id': session.id}) }}">{{ session.title }}</a>
6 <a href="{{ path('rapsys_air_location_view', {'id': session.location.id}) }}">{{ session.location.at }}</a>
7 </h2>
8 <div class="panel">
9 <div class="grid">
10 <section class="cell">
11 <h3>{% trans %}Organizer{% endtrans %}</h3>
12 <dl>
13 <dt>{% trans %}Attributed to{% endtrans %}</dt>
14 <dd>
15 {% if session.application is null %}
16 {% trans %}None{% endtrans %}
17 {% else %}
18 <a href="{{ path('rapsys_air_organizer_view', {'id': session.application.user.id}) }}">{{ session.application.user.title }}</a>
19 {% endif %}
20 </dd>
21 </dl>
22 {% if session.snippet.description is defined and session.snippet.description %}
23 <dl>
24 <dt>{% trans %}Description{% endtrans %}</dt>
25 <dd>{{ session.snippet.description|striptags|markdown_to_html }}</dd>
26 </dl>
27 {% endif %}
28 {% if session.application.user.donation is defined and session.application.user.donation %}
29 <dl>
30 <dt>{% trans %}Donation{% endtrans %}</dt>
31 <dd><a href="{{ session.application.user.donation }}" title="{{ 'Make a donation to %title%'|trans({'%title%': session.application.user.title}) }}">{{ 'Contribute to %title%'|trans({'%title%': session.application.user.title}) }}</a></dd>
32 </dl>
33 {% endif %}
34 {% if session.application.user.site is defined and session.application.user.site %}
35 <dl>
36 <dt>{% trans %}Website{% endtrans %}</dt>
37 <dd><a href="{{ session.application.user.site }}" title="{{ 'Consult %title% website'|trans({'%title%': session.application.user.title}) }}">{{ 'Website of %title%'|trans({'%title%': session.application.user.title}) }}</a></dd>
38 </dl>
39 {% endif %}
40 </section>
41 <section class="cell">
42 <h3>{% trans %}Schedule{% endtrans %}</h3>
43 <dl>
44 <dt>{% trans %}Slot{% endtrans %}</dt>
45 <dd>{{ session.slot.title }}</dd>
46 </dl>
47 <dl>
48 <dt>{% trans %}Start{% endtrans %}</dt>
49 <dd>{{ session.start.format('Y-m-d H:i:s') }}</dd>
50 </dl>
51 <dl>
52 <dt>{% trans %}Stop{% endtrans %}</dt>
53 <dd>
54 {% if session.start.format('Y-m-d') != session.stop.format('Y-m-d') %}
55 {{ session.stop.format('Y-m-d H:i:s') }}
56 {% else %}
57 {{ session.stop.format('H:i:s') }}
58 {% endif %}
59 </dd>
60 </dl>
61 <dl>
62 <dt>{% trans %}Length{% endtrans %}</dt>
63 <dd>{{ session.length.format('H:i:s') }}</dd>
64 </dl>
65 <dl>
66 <dt>{% trans %}Locked{% endtrans %}</dt>
67 <dd>
68 {% if session.locked is null %}
69 {% trans %}None{% endtrans %}
70 {% else %}
71 {{ session.locked.format('Y-m-d H:i:s') }}
72 {% endif %}
73 </dd>
74 </dl>
75 <dl>
76 <dt>{% trans %}Created{% endtrans %}</dt>
77 <dd>{{ session.created.format('Y-m-d H:i:s') }}</dd>
78 </dl>
79 <dl>
80 <dt>{% trans %}Updated{% endtrans %}</dt>
81 <dd>{{ session.updated.format('Y-m-d H:i:s') }}</dd>
82 </dl>
83 </section>
84 <section class="cell">
85 <h3>{% trans %}Weather{% endtrans %}</h3>
86 {% if session.rainrisk is not null %}
87 <dl>
88 <dt>{% trans %}Rainrisk{% endtrans %}</dt>
89 <dd>{{ session.rainrisk }}</dd>
90 </dl>
91 {% endif %}
92 {% if session.rainfall is not null %}
93 <dl>
94 <dt>{% trans %}Rainfall{% endtrans %}</dt>
95 <dd>{{ session.rainfall }}</dd>
96 </dl>
97 {% endif %}
98 {% if session.realfeel is not null %}
99 <dl>
100 <dt>{% trans %}Realfeel{% endtrans %}</dt>
101 <dd>{{ session.realfeel }}</dd>
102 </dl>
103 {% endif %}
104 {% if session.realfeelmin is not null %}
105 <dl>
106 <dt>{% trans %}Realfeel min{% endtrans %}</dt>
107 <dd>{{ session.realfeelmin }}</dd>
108 </dl>
109 {% endif %}
110 {% if session.realfeelmax is not null %}
111 <dl>
112 <dt>{% trans %}Realfeel max{% endtrans %}</dt>
113 <dd>{{ session.realfeelmax }}</dd>
114 </dl>
115 {% endif %}
116 {% if session.temperature is not null %}
117 <dl>
118 <dt>{% trans %}Temperature{% endtrans %}</dt>
119 <dd>{{ session.temperature }}</dd>
120 </dl>
121 {% endif %}
122 {% if session.temperaturemin is not null %}
123 <dl>
124 <dt>{% trans %}Temperature min{% endtrans %}</dt>
125 <dd>{{ session.temperaturemin }}</dd>
126 </dl>
127 {% endif %}
128 {% if session.temperaturemax is not null %}
129 <dl>
130 <dt>{% trans %}Temperature max{% endtrans %}</dt>
131 <dd>{{ session.temperaturemax }}</dd>
132 </dl>
133 {% endif %}
134 </section>
135 <section class="cell">
136 <h3>{% trans %}Location{% endtrans %}</h3>
137 <dl>
138 {# infos #}
139 <dt>{% trans %}Location{% endtrans %}</dt>
140 <dd><a href="{{ path('rapsys_air_location_view', {'id': session.location.id}) }}">{{ session.location.title }}</a></dd>
141 </dl>
142 <dl>
143 {# location #}
144 <dt>{% trans %}Address{% endtrans %}</dt>
145 <dd>
146 {{ session.location.address }}
147 {{ session.location.zipcode }} {{ session.location.city }}
148 </dd>
149 </dl>
150 <dl>
151 <dt>{% trans %}Maps{% endtrans %}</dt>
152 <dd><a href="https://www.google.fr/maps/@{{ session.location.latitude }},{{ session.location.longitude }},19z">Google Maps</a></dd>
153 <dd><a href="https://www.openstreetmap.org/#map=19/{{ session.location.latitude }}/{{ session.location.longitude }}">OpenStreetMap</a></dd>
154 </dl>
155 <dl>
156 <dt>{% trans %}Minimap{% endtrans %}</dt>
157 <dd>TODO: minimap</dd>
158 </dl>
159 </section>
160 </div>
161 {{ include('@RapsysAir/form/_toolbox.html.twig') }}
162 </div>
163 <section>
164 <h3>{% trans %}Candidates{% endtrans %}</h3>
165 <div class="panel grid">
166 {% if session.applications is null %}
167 <section class="cell">
168 {% trans %}None{% endtrans %}
169 </section>
170 {% else %}
171 {% for application in session.applications %}
172 <section class="cell">
173 <h4><a href="{{ path('rapsys_air_organizer_view', {'id': application.user.id} ) }}">{{ application.user.title }}</a></h4>
174 <dl>
175 <dt>{% trans %}Score{% endtrans %}</dt>
176 <dd>
177 {% if application.score is null %}
178 {% trans %}None{% endtrans %}
179 {% else %}
180 {{ application.score }}</dd>
181 {% endif %}
182 </dl>
183 <dl>
184 <dt>{% trans %}Created{% endtrans %}</dt>
185 <dd>{{ application.created.format('Y-m-d H:i:s') }}</dd>
186 </dl>
187 <dl>
188 <dt>{% trans %}Updated{% endtrans %}</dt>
189 <dd>{{ application.updated.format('Y-m-d H:i:s') }}</dd>
190 </dl>
191 <dl>
192 <dt>{% trans %}Canceled{% endtrans %}</dt>
193 <dd>
194 {% if application.canceled is null %}
195 {% trans %}None{% endtrans %}
196 {% else %}
197 {{ application.canceled.format('Y-m-d H:i:s') }}
198 {% endif %}
199 </dd>
200 </dl>
201 </section>
202 {% endfor %}
203 {% endif %}
204 </div>
205 </section>
206 </section>
207 {% if locations is defined and locations %}
208 <section id="location">
209 <h2>{% trans %}Locations{% endtrans %}</h2>
210 <div class="panel grid">
211 {% for id, title in locations %}
212 <section class="cell">
213 <h3><a href="{{ path('rapsys_air_location_view', {'id': id}) }}">{{ title }}</a></h3>
214 </section>
215 {% endfor %}
216 </div>
217 </section>
218 {% endif %}
219 {% endblock %}