Files
aux-bieaux-legumes/templates/frontOffice/custom/recette.html

108 lines
5.0 KiB
HTML

{extends file="layout.tpl"}
{block name='init'}
{assign var="content_id" value={content attr="id"}}
{/block}
{* Body Class *}
{block name="body-class"}page-content{/block}
{* Page Title *}
{block name='no-return-functions' append}
{if {$content_id}}
{$page_title = $TITLE}
{/if}
{/block}
{* Breadcrumb *}
{block name='no-return-functions' append}
{if $content_id}
{$breadcrumbs = []}
{loop type="content" name="content-breadcrumb" id=$content_id limit="1"}
{loop name="folder_path" type="folder-path" folder={$DEFAULT_FOLDER}}
{$breadcrumbs[] = ['title' => {$TITLE}, 'url'=> {$URL nofilter}]}
{/loop}
{$breadcrumbs[] = ['title' => {$TITLE}, 'url'=> {$URL nofilter}]}
{/loop}
{/if}
{/block}
{block name="main-content"}
{if $content_id}
<div class="container">
<article id="recette" role="main">
{loop type="recipe" name="recipe-loop" content_id=$content_id limit="1"}
{if $DIFFICULTY eq 0}{assign var="label_difficulty" value="Facile"}{/if}
{if $DIFFICULTY eq 1}{assign var="label_difficulty" value="Moyen"}{/if}
{if $DIFFICULTY eq 2}{assign var="label_difficulty" value="Difficile"}{/if}
<h1 class="titre-recette">{$TITLE}</h1>
<br>
<div class="entete">
<span class="preparation"><b>{intl l='Preparation time' d='recettes'}</b><img src="{image file='assets/img/timer.svg' source='Recettes'}" alt="Preparation time">{$PREPARATION_TIME}</span>
<span class="cuisson"><b>{intl l='Cooking time' d='recettes'}</b><img src="{image file='assets/img/thermometer.svg' source='Recettes'}" alt="Cooking time">{$COOKING_TIME}</span>
<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}
<img src="{$IMAGE_URL}" alt="Photo principale">
{/loop}
</div>
<div class="col-md-8">
<label class="recette-summary">{$SUMMARY|unescape:"html" nofilter}</label>
<p class="recette-titre">{intl l='Ingredients' d='recettes'}</p>
<table class="table table-striped table-condensed table-ingredients">
<thead>
<th>{intl l="Ingredient" d="recettes"}</th>
<th>{intl l="Quantity needed" 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-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>
<p class="recette-soustitre">{intl l="Additional ingredients" d="recettes"}</p>
<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}
{block name="stylesheet"}
{hook name="content.stylesheet"}
{/block}