Commit d0abd7ea authored by Mat's avatar Mat
Browse files

boucle twig pour les boutons asc et desc sur les colonnes

parent 4ccffb6d
......@@ -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 }}">
<th scope="row">{{ legume.id }}</th>
<td scope="row">{{ legume.id }}</td>
<td>{{ legume.nom }}</td>
<td>{{ legume.description }}</td>
<td>{{ legume.unite }}</td>
......
......@@ -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 %}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment