forked from kiloutyg/docauposte2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zone.html.twig
executable file
·87 lines (82 loc) · 2.09 KB
/
zone.html.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
{% extends 'base.html.twig' %}
{% block title %}
{{zone.name|split('.')|first|upper}}
|
{{ parent() }}
{% endblock %}
{% block body %}
<div
class="inner-container flex-grow-1 d-flex flex-column">
{% if app.user %}
{% if is_granted('ROLE_MANAGER') %}
<aside
class="position-absolute end-0">
<a
href="{{ path('app_zone_admin', {zoneId: zone.id}) }}" class="btn shadow bg-dark "
style="color:white">
<span
class="fa fa-gear"></span>
<strong>
<span
class="button-text">
Centre d'Administration de Zone
</span>
</strong>
</a>
</aside>
{% endif %}
{% endif %}
<p>
<h2
class="text-justify mb-2 mt-4">
<strong>
{{ zone.name|split('.')|first|upper }}
</strong>
</h2>
</p>
<div>
<h3
class=" text-justify">
Les lignes de la zone
{{zone.name|split('.')|first|upper}}
:
</h3>
{% set matchingProductLines = [] %}
{% for productLine in productLines %}
{% if productLine.zone.id is same as(zone.id) %}
{% set matchingProductLines = matchingProductLines|merge([productLine]) %}
{% endif %}
{% endfor %}
</div>
<div
class="inner-container d-flex flex-column justify-content-center align-items-center flex-grow-1">
{% if matchingProductLines|length > 0 %}
<div
class="d-flex mb-5 mt-5 line-list align-items-center justify-content-center flex-wrap">
{% for productLine in matchingProductLines %}
<a
class="btn btn-primary btn-lg m-5"
role="button"
aria-pressed="true"
style="color:white"
href="{{path('app_productline', {productlineId: productLine.id, zoneId: productLine.zone.id,} )}}">
<span
class="line-details text-justify">
{{ productLine.name|split('.')|first|upper }}
</span>
</a>
{% endfor %}
</div>
{% else %}
<div
class="alert alert-danger">
<a
href="#"
onclick="event.preventDefault(); window.history.back();">
Il n'y a pas de lignes dans cette zone.
</a>
</div>
{% endif %}
</div>
</div>
{% endblock %}