]> Raphaƫl G. Git Repositories - airbundle/blob - Resources/views/default/_location.html.twig
Set synchronized as not nullable
[airbundle] / Resources / views / default / _location.html.twig
1 {# Display locations calendar #}
2 {% if locations is defined and locations %}
3 <article class="location">
4 <header>
5 <h2><a href="{{ locations_link }}">{{ locations_title }}</a></h2>
6 {% if locations_description is defined %}
7 <p>{{ locations_description }}</p>
8 {% elseif forms.snippets is defined %}
9 <p>{% trans %}Organizer's snippet by dance space{% endtrans %}</p>
10 {% else %}
11 <p>{% trans %}Libre Air location list{% endtrans %}</p>
12 {% endif %}
13 </header>
14 <div class="panel">
15 {% if multimap is defined and multimap %}
16 <div class="multimap">
17 <a href="{{ multimap.link }}" title="{{ multimap.caption }}">
18 <figure>
19 <img src="{{ multimap.src }}" alt="{{ multimap.caption }}" width="{{ multimap.width }}" height="{{ multimap.height }}" />
20 <figcaption>{{ multimap.caption }}</figcaption>
21 </figure>
22 </a>
23 </div>
24 {% endif %}
25 {% if forms.snippets is defined %}
26 <div class="grid">
27 {% for i, l in locations %}
28 <article class="cell{% if l.count is defined and l.count or location.id is defined and location.id == l.id or session.location.id is defined and session.location.id == l.id %} highlight{% endif %}">
29 <header>
30 {# TODO XXX virer le if l.link id defined when user view is fixed !!! #}
31 <h3><a href="{{ l.link }}">{% if multimap is defined and multimap %}{{ i }} {% endif %}{{ l.title }}</a></h3>
32 </header>
33 {% if forms.snippets[i] is defined and forms.snippets[i] %}
34 {{ form_start(forms.snippets[i]) }}
35 <div>
36 {% if forms.snippets[i].description is defined %}
37 {{ form_row(forms.snippets[i].description) }}
38 {% endif %}
39
40 {% if forms.snippets[i].class is defined %}
41 {{ form_row(forms.snippets[i].class) }}
42 {% endif %}
43
44 {% if forms.snippets[i].short is defined %}
45 {{ form_row(forms.snippets[i].short) }}
46 {% endif %}
47
48 {% if forms.snippets[i].rate is defined %}
49 {{ form_row(forms.snippets[i].rate) }}
50 {% endif %}
51
52 {% if forms.snippets[i].hat is defined %}
53 {{ form_row(forms.snippets[i].hat) }}
54 {% endif %}
55
56 {% if forms.snippets[i].contact is defined %}
57 {{ form_row(forms.snippets[i].contact) }}
58 {% endif %}
59
60 {% if forms.snippets[i].donate is defined %}
61 {{ form_row(forms.snippets[i].donate) }}
62 {% endif %}
63
64 {% if forms.snippets[i].link is defined %}
65 {{ form_row(forms.snippets[i].link) }}
66 {% endif %}
67
68 {% if forms.snippets[i].profile is defined %}
69 {{ form_row(forms.snippets[i].profile) }}
70 {% endif %}
71
72 {{ form_row(forms.snippets[i].submit) }}
73 </div>
74
75 {# render csrf token etc .#}
76 <footer style="display:none">{{ form_rest(forms.snippets[i]) }}</footer>
77 {{ form_end(forms.snippets[i]) }}
78 {% endif %}
79 {% if l.image is defined and l.image %}
80 <div class="thumb">
81 <a href="{{ l.image.link }}" title="{{ l.image.caption }}">
82 <figure>
83 <img src="{{ l.image.src }}" alt="{{ l.image.caption }}" width="{{ l.image.width }}" height="{{ l.image.height }}" />
84 <figcaption>{{ l.image.caption }}</figcaption>
85 </figure>
86 </a>
87 </div>
88 {% endif %}
89 {% if forms.images is defined and forms.images[i] is defined and forms.images[i] %}
90 {{ form_start(forms.images[i]) }}
91 <div>
92 {% if forms.images[i].image is defined %}
93 {{ form_row(forms.images[i].image) }}
94 {% endif %}
95
96 {{ form_row(forms.images[i].submit) }}
97
98 {% if forms.images[i].delete is defined %}
99 {{ form_row(forms.images[i].delete) }}
100 {% endif %}
101 </div>
102
103 {# render csrf token etc .#}
104 <footer style="display:none">{{ form_rest(forms.images[i]) }}</footer>
105 {{ form_end(forms.images[i]) }}
106 {% endif %}
107 </article>
108 {% endfor %}
109 </div>
110 {% else %}
111 <ul class="grid{% if locations|length > 1 %} two{% endif %}">
112 {% for i, l in locations %}
113 {# TODO XXX virer le if l.link id defined when user view is fixed !!! #}
114 <li><a href="{{ l.link }}">{% if multimap is defined and multimap %}{{ i }} {% endif %}{{ l.title }}</a></li>
115 {% endfor %}
116 </ul>
117 {% endif %}
118 </div>
119 </article>
120 {% endif %}