]> Raphaƫl G. Git Repositories - airbundle/blob - Resources/views/session/view.html.twig
Rename description in page.description
[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>{{ page.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 </section>
65 <section class="cell">
66 <h3>{% trans %}Schedule{% endtrans %}</h3>
67 <dl>
68 <dt>{% trans %}Date{% endtrans %}</dt>
69 <dd>{{ session.start|localizeddate('long', 'none') }}</dd>
70 </dl>
71 <dl>
72 <dt>{% trans %}Start{% endtrans %}</dt>
73 <dd>{{ session.start|localizeddate('none', 'medium') }}</dd>
74 </dl>
75 <dl>
76 <dt>{% trans %}Stop{% endtrans %}</dt>
77 <dd>{{ session.stop|localizeddate('none', 'medium') }}</dd>
78 </dl>
79 <dl>
80 <dt>{% trans %}Length{% endtrans %}</dt>
81 <dd>{{ session.length|localizeddate('none', 'short', null, null, 'HH:mm') }}</dd>
82 </dl>
83 <dl>
84 <dt>{% trans %}Slot{% endtrans %}</dt>
85 <dd>{{ session.slot.title }}</dd>
86 </dl>
87 <dl>
88 <dt>{% trans %}Locked{% endtrans %}</dt>
89 <dd>
90 {% if session.locked is null %}
91 {% trans %}None{% endtrans %}
92 {% else %}
93 {{ session.locked|localizeddate('long', 'medium') }}
94 {% endif %}
95 </dd>
96 </dl>
97 <dl>
98 <dt>{% trans %}Created{% endtrans %}</dt>
99 <dd>{{ session.created|localizeddate('long', 'medium') }}</dd>
100 </dl>
101 <dl>
102 <dt>{% trans %}Updated{% endtrans %}</dt>
103 <dd>{{ session.updated|localizeddate('long', 'medium') }}</dd>
104 </dl>
105 </section>
106 <section class="cell">
107 <h3>{% trans %}Weather{% endtrans %}</h3>
108 {% if session.rainrisk is not null %}
109 <dl>
110 <dt>{% trans %}Rainrisk{% endtrans %}</dt>
111 <dd>{{ session.rainrisk }}</dd>
112 </dl>
113 {% endif %}
114 {% if session.rainfall is not null %}
115 <dl>
116 <dt>{% trans %}Rainfall{% endtrans %}</dt>
117 <dd>{{ session.rainfall }}</dd>
118 </dl>
119 {% endif %}
120 {% if session.realfeel is not null %}
121 <dl>
122 <dt>{% trans %}Realfeel{% endtrans %}</dt>
123 <dd>{{ session.realfeel }}</dd>
124 </dl>
125 {% endif %}
126 {% if session.realfeelmin is not null %}
127 <dl>
128 <dt>{% trans %}Realfeel min{% endtrans %}</dt>
129 <dd>{{ session.realfeelmin }}</dd>
130 </dl>
131 {% endif %}
132 {% if session.realfeelmax is not null %}
133 <dl>
134 <dt>{% trans %}Realfeel max{% endtrans %}</dt>
135 <dd>{{ session.realfeelmax }}</dd>
136 </dl>
137 {% endif %}
138 {% if session.temperature is not null %}
139 <dl>
140 <dt>{% trans %}Temperature{% endtrans %}</dt>
141 <dd>{{ session.temperature }}</dd>
142 </dl>
143 {% endif %}
144 {% if session.temperaturemin is not null %}
145 <dl>
146 <dt>{% trans %}Temperature min{% endtrans %}</dt>
147 <dd>{{ session.temperaturemin }}</dd>
148 </dl>
149 {% endif %}
150 {% if session.temperaturemax is not null %}
151 <dl>
152 <dt>{% trans %}Temperature max{% endtrans %}</dt>
153 <dd>{{ session.temperaturemax }}</dd>
154 </dl>
155 {% endif %}
156 </section>
157 <section class="cell">
158 <h3>{% trans %}Location{% endtrans %}</h3>
159 <dl>
160 {# infos #}
161 <dt>{% trans %}Location{% endtrans %}</dt>
162 <dd><a href="{{ path('rapsys_air_location_view', {'id': session.location.id}) }}">{{ session.location.title }}</a></dd>
163 </dl>
164 <dl>
165 {# location #}
166 <dt>{% trans %}Address{% endtrans %}</dt>
167 <dd>
168 {{ session.location.address }}
169 {{ session.location.zipcode }} {{ session.location.city }}
170 </dd>
171 </dl>
172 <dl>
173 <dt>{% trans %}Maps{% endtrans %}</dt>
174 <dd><a href="https://www.google.fr/maps/@{{ session.location.latitude }},{{ session.location.longitude }},19z">Google Maps</a></dd>
175 <dd><a href="https://www.openstreetmap.org/#map=19/{{ session.location.latitude }}/{{ session.location.longitude }}">OpenStreetMap</a></dd>
176 </dl>
177 <dl>
178 <dt>{% trans %}Minimap{% endtrans %}</dt>
179 <dd>TODO: minimap</dd>
180 </dl>
181 </section>
182 </div>
183 {{ include('@RapsysAir/form/_toolbox.html.twig') }}
184 </div>
185 <article>
186 <h3>{% trans %}Candidates{% endtrans %}</h3>
187 <div class="panel grid four">
188 {% if session.applications is null %}
189 <section class="cell">
190 {% trans %}None{% endtrans %}
191 </section>
192 {% else %}
193 {% for application in session.applications %}
194 <article class="cell">
195 <h4><a href="{{ path('rapsys_air_user_view', {'id': application.user.id} ) }}">{{ application.user.title }}</a></h4>
196 <dl>
197 <dt>{% trans %}Score{% endtrans %}</dt>
198 <dd>
199 {% if application.score is null %}
200 {% trans %}None{% endtrans %}
201 {% else %}
202 {{ application.score }}</dd>
203 {% endif %}
204 </dl>
205 <dl>
206 <dt>{% trans %}Created{% endtrans %}</dt>
207 <dd>{{ application.created|localizeddate('long', 'medium') }}</dd>
208 </dl>
209 <dl>
210 <dt>{% trans %}Updated{% endtrans %}</dt>
211 <dd>{{ application.updated|localizeddate('long', 'medium') }}</dd>
212 </dl>
213 <dl>
214 <dt>{% trans %}Canceled{% endtrans %}</dt>
215 <dd>
216 {% if application.canceled is null %}
217 {% trans %}None{% endtrans %}
218 {% else %}
219 {{ application.canceled|localizeddate('long', 'medium') }}
220 {% endif %}
221 </dd>
222 </dl>
223 </article>
224 {% endfor %}
225 {% endif %}
226 </div>
227 </article>
228 </article>
229 {{ include('@RapsysAir/default/_location.html.twig') }}
230 {% endblock %}