Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mathieu
potage
Commits
d0abd7ea
Commit
d0abd7ea
authored
May 13, 2018
by
Mat
Browse files
boucle twig pour les boutons asc et desc sur les colonnes
parent
4ccffb6d
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/PotageBundle/Resources/views/Legume/read.html.twig
View file @
d0abd7ea
...
...
@@ -17,42 +17,20 @@
<table
id=
"maintab"
class=
"table legumes"
>
<thead>
<tr>
<th
scope=
"col"
>
#
</th>
<th
scope=
"col"
>
Nom
<a
href=
"#"
class=
"btn-tri"
id=
"btncol0_asc"
><i
class=
"fa fa-caret-down"
></i></a>
<a
href=
"#"
class=
"btn-tri"
id=
"btncol0_desc"
><i
class=
"fa fa-caret-up"
></i></a>
</th>
<th
scope=
"col"
>
Description
<a
href=
"#"
class=
"btn-tri"
id=
"btncol1_asc"
><i
class=
"fa fa-caret-down"
></i></a>
<a
href=
"#"
class=
"btn-tri"
id=
"btncol1_desc"
><i
class=
"fa fa-caret-up"
></i></a>
</th>
<th
scope=
"col"
>
Unité
<a
href=
"#"
class=
"btn-tri"
id=
"btncol2_asc"
><i
class=
"fa fa-caret-down"
></i></a>
<a
href=
"#"
class=
"btn-tri"
id=
"btncol2_desc"
><i
class=
"fa fa-caret-up"
></i></a>
</th>
<th
scope=
"col"
>
Qté min
<a
href=
"#"
class=
"btn-tri"
id=
"btncol3_asc"
><i
class=
"fa fa-caret-down"
></i></a>
<a
href=
"#"
class=
"btn-tri"
id=
"btncol3_desc"
><i
class=
"fa fa-caret-up"
></i></a>
</th>
<th
scope=
"col"
>
Max
<a
href=
"#"
class=
"btn-tri"
id=
"btncol3_asc"
><i
class=
"fa fa-caret-down"
></i></a>
<a
href=
"#"
class=
"btn-tri"
id=
"btncol3_desc"
><i
class=
"fa fa-caret-up"
></i></a>
</th>
<th
scope=
"col"
>
Step
<a
href=
"#"
class=
"btn-tri"
id=
"btncol3_asc"
><i
class=
"fa fa-caret-down"
></i></a>
<a
href=
"#"
class=
"btn-tri"
id=
"btncol3_desc"
><i
class=
"fa fa-caret-up"
></i></a>
</th>
<th
scope=
"col"
>
Prix unitaire
<a
href=
"#"
class=
"btn-tri"
id=
"btncol4_asc"
><i
class=
"fa fa-caret-down"
></i></a>
<a
href=
"#"
class=
"btn-tri"
id=
"btncol4_desc"
><i
class=
"fa fa-caret-up"
></i></a>
{%
set
cols
=
[
"#"
,
"Nom"
,
"Description"
,
"Unité"
,
"Qté min"
,
"Max"
,
"Step"
,
"Prix unitaire"
]
%}
{%
for
col
in
cols
%}
<th
scope=
"col"
>
{{
col
}}
<a
href=
"#"
class=
"btn-tri"
id=
"btncol
{{
loop.index0
}}
_asc"
><i
class=
"fa fa-caret-down"
></i></a>
<a
href=
"#"
class=
"btn-tri"
id=
"btncol
{{
loop.index0
}}
_desc"
><i
class=
"fa fa-caret-up"
></i></a>
</th>
{%
endfor
%}
<th
scope=
"col"
>
Action
</th>
</tr>
</thead>
<tbody>
{%
for
legume
in
legumes
%}
<tr
id=
"row
{{
legume.id
}}
"
>
<t
h
scope=
"row"
>
{{
legume.id
}}
</t
h
>
<t
d
scope=
"row"
>
{{
legume.id
}}
</t
d
>
<td>
{{
legume.nom
}}
</td>
<td>
{{
legume.description
}}
</td>
<td>
{{
legume.unite
}}
</td>
...
...
src/PotageBundle/Resources/views/layout.html.twig
View file @
d0abd7ea
...
...
@@ -71,39 +71,37 @@
</header>
<div
id=
"content"
>
<div
class=
"container"
>
{%
block
body
%}
<aside>
{%
block
sidebar
%}
{%
block
body
%}
<aside>
{%
block
sidebar
%}
{%
endblock
%}
</aside>
<section>
{%
block
content
%}
{%
block
breadcrumb
%}
<nav
aria-label=
"breadcrumb"
>
<ol
class=
"breadcrumb"
>
<li
class=
"breadcrumb-item"
>
<a
href=
"
{{
path
(
'potage_homepage'
)
}}
"
>
Accueil
</a>
</li>
<li
class=
"breadcrumb-item active"
aria-current=
"page"
>
{{
block
(
'title'
)
}}
</li>
</ol>
</nav>
{%
endblock
%}
<h1>
{{
block
(
'title'
)
}}
</h1>
{%
endblock
%}
</aside>
<section>
{%
block
content
%}
{%
block
breadcrumb
%}
<nav
aria-label=
"breadcrumb"
>
<ol
class=
"breadcrumb"
>
<li
class=
"breadcrumb-item"
>
<a
href=
"
{{
path
(
'potage_homepage'
)
}}
"
>
Accueil
</a>
</li>
<li
class=
"breadcrumb-item active"
aria-current=
"page"
>
{{
block
(
'title'
)
}}
</li>
</ol>
</nav>
{%
endblock
%}
</section>
{%
endblock
%}
<br
class=
"clearfix"
/>
<h1>
{{
block
(
'title'
)
}}
</h1>
</div>
{%
endblock
%}
</section>
{%
endblock
%}
<br
class=
"clearfix"
/>
<div
class=
"container"
></div>
</div>
{%
block
hero
%}{%
endblock
%}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment