Recettes : on affiche toujours...
This commit is contained in:
@@ -7,5 +7,8 @@
|
||||
<route id="recipe.save" path="/admin/module/Recettes/save" methods="post">
|
||||
<default key="_controller">Recettes\Controller\MainController::saveRecipe</default>
|
||||
</route>
|
||||
<route id="recipe.addtocart" path="/admin/module/Recettes/addtocart" methods="post">
|
||||
<default key="_controller">Recettes\Controller\MainController::addToCart</default>
|
||||
</route>
|
||||
|
||||
</routes>
|
||||
|
||||
@@ -10,10 +10,12 @@ return array(
|
||||
'Quantity' => 'Quantité',
|
||||
'Summary' => 'Description de la recette',
|
||||
'Other ingredients' => 'Ingrédients supplémentaires',
|
||||
'Ingredient' => 'Ingrédient',
|
||||
'Ingredients' => 'Ingrédients',
|
||||
'Ingredient' => 'Nos produits',
|
||||
'Ingredients from us' => 'Ce que vous pouvez trouver chez nous :',
|
||||
'Additional ingredients' => 'Vous aurez également besoin de :',
|
||||
'Quantity needed' => 'Quantité nécessaire',
|
||||
'Add to cart' => 'Ajouter à mon panier',
|
||||
'Quantity proposed' => 'Quantité proposée',
|
||||
'Select' => 'Sélectionner',
|
||||
'Add to cart' => 'Ajouter ces produits au panier',
|
||||
);
|
||||
|
||||
@@ -39,7 +39,8 @@ class ProductsLoop extends BaseLoop implements PropelSearchLoopInterface
|
||||
->set("RECIPE_ID", $product->getRecipeId())
|
||||
->set("PSE_ID", $product->getPseId())
|
||||
->set("PRODUCT_LABEL", $productLabel)
|
||||
->set("QUANTITY", $product->getQuantity())
|
||||
->set("QUANTITY_NEEDED", $product->getQuantity())
|
||||
->set("QUANTITY_PROPOSED", $product->getNbOfProducts())
|
||||
;
|
||||
$loopResult->addRow($loopResultRow);
|
||||
}
|
||||
|
||||
@@ -31,9 +31,9 @@ class StepsLoop extends BaseLoop implements PropelSearchLoopInterface
|
||||
|
||||
$loopResultRow = new LoopResultRow($step);
|
||||
$loopResultRow
|
||||
->set("RECIPE_ID", $step->getId())
|
||||
->set("STEP", $step->getContentId())
|
||||
->set("DESCRIPTION", $step->getTitle())
|
||||
->set("RECIPE_ID", $step->getRecipeId())
|
||||
->set("STEP", $step->getStep())
|
||||
->set("DESCRIPTION", $step->getDescription())
|
||||
;
|
||||
$loopResult->addRow($loopResultRow);
|
||||
}
|
||||
@@ -58,8 +58,9 @@ class StepsLoop extends BaseLoop implements PropelSearchLoopInterface
|
||||
$steps = RecipeStepsQuery::create();
|
||||
|
||||
if (null != $id = $this->getRecipeId()) {
|
||||
$steps->filterById($id);
|
||||
$steps->filterByRecipeId($id);
|
||||
}
|
||||
$steps->orderByStep();
|
||||
|
||||
return $steps;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
article#recette {
|
||||
width: 90% !important;
|
||||
width: 95% !important;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -35,6 +35,7 @@ div.entete span b {
|
||||
width: 250px;
|
||||
box-shadow: 10px 10px 15px gray;
|
||||
border-radius: 5px;
|
||||
transform: rotate(-2deg);
|
||||
}
|
||||
|
||||
.recette-titre {
|
||||
@@ -54,8 +55,28 @@ div.entete span b {
|
||||
|
||||
.table-ingredients {
|
||||
width: 90%;
|
||||
margin: auto;
|
||||
}
|
||||
.table-ingredients th,
|
||||
.table-ingredients td {
|
||||
vertical-align: center !important;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.cellule-large {
|
||||
width: 40%;
|
||||
}
|
||||
.cellule-etroite {
|
||||
width: 1%;
|
||||
}
|
||||
|
||||
.table-steps {
|
||||
width: 80%;
|
||||
margin: auto;
|
||||
}
|
||||
.table-steps td.number{
|
||||
background-color: #95c11e;
|
||||
border-radius: 30px;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
}
|
||||
@@ -45,6 +45,7 @@
|
||||
<span class="difficulte"><b>{intl l='Difficulty' d='recettes'}</b><img src="{image file='assets/img/cellular.svg' source='Recettes'}" alt="Difficulty">{$label_difficulty}</span>
|
||||
</div>
|
||||
<br>
|
||||
<form action="/admin/module/Recettes/addtocart" method="post">
|
||||
<div class="row">
|
||||
<div class="photo-principale col-md-4">
|
||||
{loop type="image" name="image-loop" content=$content_id visible=true}
|
||||
@@ -58,16 +59,22 @@
|
||||
<thead>
|
||||
<th>{intl l="Ingredient" d="recettes"}</th>
|
||||
<th>{intl l="Quantity needed" d="recettes"}</th>
|
||||
<th>{intl l="Add to cart" d="recettes"}</th>
|
||||
<th>{intl l="Quantity proposed" d="recettes"}</th>
|
||||
<th>{intl l="Select" d="recettes"}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop type="recipe_products" name="products-loop" recipe_id=$ID}
|
||||
<tr>
|
||||
<td class="cellule-produit">{$PRODUCT_LABEL}</td>
|
||||
<td class="cellule-quantite">{$QUANTITY}</td>
|
||||
<td><input type="checkbox" id="product-{$PSE_ID}" class="cellule-checkbox"></td>
|
||||
<td class="cellule-large">{$PRODUCT_LABEL}</td>
|
||||
<td class="cellule-etroite">{$QUANTITY_NEEDED}</td>
|
||||
<td class="cellule-etroite">{$QUANTITY_PROPOSED}</td>
|
||||
<td class="cellule-etroite"><input type="checkbox" id="product-{$PSE_ID}" class="cellule-checkbox"></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
<tr>
|
||||
<td colspan="3"></td>
|
||||
<td><input type="submit" class="button recette-bouton" value="{intl l='Add to cart' d='recettes'}"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
@@ -75,12 +82,22 @@
|
||||
<label class="autres-ingredients">{$OTHER_INGREDIENTS|unescape:"html" nofilter}</label>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br>
|
||||
|
||||
<br>
|
||||
<div class="row">
|
||||
<table class="table table-striped table-steps">
|
||||
{loop type="recipe_steps" name="steps-loop" recipe_id=$ID}
|
||||
<tr>
|
||||
<td class="number">{$STEP}</td>
|
||||
<td class="description">{$DESCRIPTION}</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</table>
|
||||
</div>
|
||||
{/loop}
|
||||
|
||||
</article>
|
||||
|
||||
<br>
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
Reference in New Issue
Block a user