forked from kiloutyg/docauposte2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
productline.html.twig
executable file
·88 lines (82 loc) · 2.15 KB
/
productline.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
88
{% extends 'base.html.twig' %}
{% block title %}
{{productLine.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_productline_admin', {productlineId: productLine.id}) }}" class="btn shadow bg-dark "
style="color:white">
<span
class="fa fa-gear"></span>
<strong>
<span
class="button-text">
Centre d'Administration de la Ligne
</span>
</strong>
</a>
</aside>
{% endif %}
{% endif %}
<p>
<h2
class="text-justify mb-2 mt-4">
<strong>
{{ productLine.name|split('.')|first|upper}}
</strong>
</h2>
</p>
<div>
<h3
class="text-justify">
Les catégories de la ligne
{{ productLine.name|split('.')|first|upper }}
:
</h3>
</div>
<div
class="inner-container d-flex flex-column justify-content-center align-items-center flex-grow-1">
{% set matchingCategories = [] %}
{% for category in categories %}
{% if category.productLine.id is same as(productLine.id) %}
{% set matchingCategories = matchingCategories|merge([category]) %}
{% endif %}
{% endfor %}
{% if matchingCategories|length > 0 %}
<div
class="d-flex mb-5 mt-5 line-list align-items-center justify-content-center flex-wrap">
{% for category in matchingCategories %}
<a
class="btn btn-primary btn-lg m-5"
role="button"
aria-pressed="true"
style="color:white"
href="{{path('app_category', {categoryId: category.id, productlineId: productLine.id, zoneId: zone.id} )}}">
<span
class="line-details text-justify">
{{ category.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 catégories dans cette ligne.
</a>
</div>
{% endif %}
</div>
</div>
{% endblock %}