зеркало из https://github.com/nextcloud/cookbook.git
Added Tool to Edit and View
The "tool" is properly parsed if it is present in the json.
This commit is contained in:
Родитель
09be169eac
Коммит
cc1bfa0623
|
@ -51,6 +51,27 @@
|
|||
<label><?php p($l->t('Servings')); ?></label>
|
||||
<input type="number" name="recipeYield" value="<?php if(isset($_['recipeYield'])) { echo $_['recipeYield']; } ?>">
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<label><?php p($l->t('Tools')); ?></label>
|
||||
<ul>
|
||||
<template>
|
||||
<li>
|
||||
<input type="text" name="tool[]" value="">
|
||||
<button class="icon-delete"></button>
|
||||
</li>
|
||||
</template>
|
||||
<?php if(isset($_['tool']) && is_array($_['tool'])) { ?>
|
||||
<?php foreach ($_['tool'] as $i => $tool) { ?>
|
||||
<li>
|
||||
<input type="text" name="tool[]" value="<?php echo $tool; ?>">
|
||||
<button class="icon-delete"></button>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<button class="icon-add"></button>
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<label><?php p($l->t('Ingredients')); ?></label>
|
||||
|
|
|
@ -47,6 +47,13 @@
|
|||
</header>
|
||||
|
||||
<aside>
|
||||
<ul>
|
||||
<h3><?php p($l->t('Tools')); ?></h3>
|
||||
|
||||
<?php foreach($_['tool'] as $tools) { ?>
|
||||
<li><?php echo $tools; ?></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<ul>
|
||||
<h3><?php p($l->t('Ingredients')); ?></h3>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче