Module Recettes : on avance encore...

This commit is contained in:
2021-04-28 20:37:58 +02:00
parent 9976d2ff76
commit 375e4e5d49
26 changed files with 657 additions and 99 deletions

View File

@@ -1,3 +1,11 @@
{loop type="recipe" name="recipe-loop" content_id=$content_id limit="1"}
{assign var="title" value=$TITLE}
{assign var="people" value=$PEOPLE}
{assign var="difficulty" value=$DIFFICULTY}
{assign var="preparation_time" value=$PREPARATION_TIME}
{assign var="cooking_time" value=$COOKING_TIME}
{/loop}
<div id="wrapper" class="container">
<div class="row">
{form name="recette_create_form"}
@@ -8,7 +16,7 @@
{form_field form=$form field="content_id"}
<input type="hidden" name="{$name}" value="{$content_id}">
{/form_field}
<br>
<div class="col-md-8">
{form_field form=$form field="title"}
@@ -18,7 +26,7 @@
{if $required}<span class="required">*</span>{/if}
</label>
<input type="text" id="{$label_attr.for}" class="form-control large" name="{$name}" value="" {if $required}required{/if} />&nbsp
<input type="text" id="{$label_attr.for}" class="form-control large" name="{$name}" value="{$title}" {if $required}required{/if} />&nbsp
</div>
{form_error form=$form field="title"}{$message}{/form_error}
{/form_field}
@@ -30,11 +38,10 @@
{intl l=$label d='recettes'}
{if $required}<span class="required">*</span>{/if}
</label>
<select id="{$label_attr.for}" name="{$name}">
<option value=0>Facile</option>
<option value=1>Moyen</option>
<option value=2>Difficile</option>
<option value="0" {if $difficulty eq 0}selected{/if}>Facile</option>
<option value="1" {if $difficulty eq 1}selected{/if}>Moyen</option>
<option value="2" {if $difficulty eq 2}selected{/if}>Difficile</option>
</select>
</div>
{form_error form=$form field="difficulty"}{$message}{/form_error}
@@ -59,7 +66,7 @@
{intl l=$label d='recettes'}
{if $required}<span class="required">*</span>{/if}
</label>
<input type="text" id="{$label_attr.for}" class="form-control etroit" name="{$name}" value="" {if $required}required{/if} />&nbsp
<input type="text" id="{$label_attr.for}" class="form-control" name="{$name}" value="{$preparation_time}" {if $required}required{/if} />&nbsp
<span class="help-block">{$label_attr.help}</span>
</div>
{form_error form=$form field="preparation_time"}{$message}{/form_error}
@@ -71,7 +78,7 @@
<label class="control-label" for="{$label_attr.for}">
{intl l=$label d='recettes'}
</label>
<input type="text" id="{$label_attr.for}" class="form-control etroit" name="{$name}" value="" />&nbsp
<input type="text" id="{$label_attr.for}" class="form-control" name="{$name}" value="{$cooking_time}" />&nbsp
<span class="help-block">{$label_attr.help}</span>
</div>
{form_error form=$form field="cooking_time"}{$message}{/form_error}
@@ -83,7 +90,7 @@
{intl l=$label d='recettes'}
</label>
{if $required}<span class="required">*</span>{/if}
<textarea id="attr-recipe" name="{$name}" rows="10" class="form-control wysiwyg">{$value}</textarea>
<textarea id="attr-recipe" name="{$name}" rows="10" class="form-control wysiwyg">{$steps}</textarea>
</div>
{form_error form=$form field="steps"}{$message}{/form_error}
{/form_field}
@@ -99,7 +106,6 @@
</table>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary">{intl l="Save" d="recettes"}</button>
</div>

View File

@@ -0,0 +1,27 @@
article#recette {
width: 90% !important;
text-align: center;
display: flex;
flex-direction: column;
}
div.entete {
background-color: #95c11e;
color: white;
width: auto;
padding: 10px 0;
border-radius: 8px;
}
div.entete img {
width: 30px;
padding-right: 10px;
}
div.entete span {
margin-right: 40px;
padding: 10px 10px;
color: white;
}
div.entete span b {
color: #0e0e0e;
}

View File

@@ -0,0 +1 @@
<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><title>Cellular</title><rect x='416' y='96' width='64' height='320' rx='8' ry='8' fill='none' stroke='currentColor' stroke-linejoin='round' stroke-width='32'/><rect x='288' y='176' width='64' height='240' rx='8' ry='8' fill='none' stroke='currentColor' stroke-linejoin='round' stroke-width='32'/><rect x='160' y='240' width='64' height='176' rx='8' ry='8' fill='none' stroke='currentColor' stroke-linejoin='round' stroke-width='32'/><rect x='32' y='304' width='64' height='112' rx='8' ry='8' fill='none' stroke='currentColor' stroke-linejoin='round' stroke-width='32'/></svg>

After

Width:  |  Height:  |  Size: 653 B

View File

@@ -0,0 +1 @@
<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><title>Thermometer</title><path d='M307.72 302.27a8 8 0 01-3.72-6.75V80a48 48 0 00-48-48h0a48 48 0 00-48 48v215.52a8 8 0 01-3.71 6.74 97.51 97.51 0 00-44.19 86.07A96 96 0 00352 384a97.49 97.49 0 00-44.28-81.73zM256 112v272' fill='none' stroke='currentColor' stroke-linecap='round' stroke-miterlimit='10' stroke-width='32'/><circle cx='256' cy='384' r='48'/></svg>

After

Width:  |  Height:  |  Size: 441 B

View File

@@ -0,0 +1 @@
<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><title>Timer</title><path d='M112.91 128A191.85 191.85 0 0064 254c-1.18 106.35 85.65 193.8 192 194 106.2.2 192-85.83 192-192 0-104.54-83.55-189.61-187.5-192a4.36 4.36 0 00-4.5 4.37V152' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='32'/><path d='M233.38 278.63l-79-113a8.13 8.13 0 0111.32-11.32l113 79a32.5 32.5 0 01-37.25 53.26 33.21 33.21 0 01-8.07-7.94z'/></svg>

After

Width:  |  Height:  |  Size: 492 B