<commit_before>{% extends 'PiggyBoxUserBundle::layout.html.twig' %}

{% block content %}
<h1>Product list</h1>

<table class="records_list">
    <thead>
        <tr>
			<th>Image</th>
            <th>Name</th>
            <th>Description</th>
			<th>Prix</th>
			<th>Actions</th>
        </tr>
    </thead>
    <tbody>
    {% for product in products %}
        <tr>
			<td><img src="{{product.getWebPath | apply_filter('my_thumb') }}" alt=""></td>			
            <td>{{ product.name }}</td>
            <td>{{ product.description }}</td>
			<td>
				<form action="{{ path('cart_add_product')}}">
					{%for price in product.prices %}
       				     {% if price.slice_nbr is not defined %}
							CACAAAAA	
			  			 {% endif %}
					{% endfor %}
					<input type="hidden" name="id" value="{{product.id}}">											
				<button type="submit" href="" class="btn btn-info btn-large"><i class="icon icon-plus icon-white"></i> Ajouter</button>
					
				</form>
			</td>
			<td>
			</td>
        </tr>
    {% endfor %}
    </tbody>
</table>

				<section id="shopping-cart" class="span4">
					<div class="well">

						<h2>
							<img src="{{ asset('bundles/piggyboxconsumer/img/shopping_cart.png') }}" width="38">
							Votre panier
						</h2>

						<br /><br />

						{% set orders  = piggybox_orders_get() %}
							{% for order in orders %}
								<h2>{{order.shop.name}}</h2>
									{% for order_detail in order.orderdetail %}
										<table class="table">
											<tr>
												<td>{{ order_detail.product.name }}</td>
												<td>{{ order_detail.price.price}}</td>
												<td>
													<a href="{{ path('cart_remove_product', {'order_detail_id': order_detail.id}) }}">Enlever un produit</td>
												</td>	

											</tr>
										</table>
									{% endfor %}
							{% endfor %}
					</div>
					<br /><br />
					<a href="{{ path('validation_page') }}">Valider le panier</td>
					<br /><br />
					</section>


{% endblock %}
<commit_msg>Changement de l'affichage du produit<commit_after>{% extends 'PiggyBoxUserBundle::layout.html.twig' %}

{% block content %}
<h1>Product list</h1>

<table class="records_list">
    <thead>
        <tr>
			<th>Image</th>
            <th>Name</th>
            <th>Description</th>
			<th>Prix</th>
			<th>Actions</th>
        </tr>
    </thead>
    <tbody>
    {% for product in products %}
        <tr>
			<td><img src="{{product.getWebPath | apply_filter('my_thumb') }}" alt=""></td>			
            <td>{{ product.name }}</td>
            <td>{{ product.description }}</td>
			<td>{{product.pricekg}}
				<form action="{{ path('cart_add_product')}}">
					{#	{%for price in product.prices %}
						{{price.price}}
						{% endfor %} #}
					<input type="hidden" name="id" value="{{product.id}}">											
				<button type="submit" href="" class="btn btn-info btn-large"><i class="icon icon-plus icon-white"></i> Ajouter</button>
					
				</form>
			</td>
			<td>
			</td>
        </tr>
    {% endfor %}
    </tbody>
</table>

				<section id="shopping-cart" class="span4">
					<div class="well">

						<h2>
							<img src="{{ asset('bundles/piggyboxconsumer/img/shopping_cart.png') }}" width="38">
							Votre panier
						</h2>

						<br /><br />

						{% set orders  = piggybox_orders_get() %}
							{% for order in orders %}
								<h2>{{order.shop.name}}</h2>
									{% for order_detail in order.orderdetail %}
										<table class="table">
											<tr>
												<td>{{ order_detail.product.name }}</td>
												<td>{{ order_detail.price.price}}</td>
												<td>
													<a href="{{ path('cart_remove_product', {'order_detail_id': order_detail.id}) }}">Enlever un produit</td>
												</td>	

											</tr>
										</table>
									{% endfor %}
							{% endfor %}
					</div>
					<br /><br />
					<a href="{{ path('validation_page') }}">Valider le panier</td>
					<br /><br />
					</section>


{% endblock %}

{'fraction_non_alphanumeric': 0.20065872814796049, 'fraction_numerical': 0.004560425639726374, 'mean_word_length': 2.0462962962962963, 'pattern_counts': {'":': 0, '<': 141, '<?xml version=': 0, '>': 141, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '934997', 'n_tokens_mistral': 1916, 'n_tokens_neox': 1344, 'n_words': 266}