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
| <section class="col-md-12">
<div class="row">
{% for row in products|batch(4) %}
<div class="card-deck">
{% for product in row %}
<div class="card mb-4">
<img src="{{ product.image_file }}" class="card-img-top" style="max-height: 250px;" alt=""/>
<div class="card-body">
<h5 class="card-title">{{ product.name }}</h5>
<p class="card-text">
{{ product.description }}
</p>
</div>
<div class="card-footer text-center">
{{ form.start({action:generate('technicien_carts_add')}) }}
{{ tag.input({type:'hidden', name:'product_id', value: product.id}) }}
{{ tag.input({type:'number', name:'quantity', class:'d-inline w-50'}) }}
<button type="submit" name="remove" class="btn btn-primary"><i class="fas fa-cart-plus"></i></button>
{{ form.end() }}
</div>
</div>
{% endfor %}
</div>
{% else %}
<div class="col-md-12">
<p class="text-center lead">Aucun produit trouvé !</p>
</div>
{% endfor %}
</div>
{{ viewPagerfantaHtml | raw }}
</section> |
Partager