<?php endif; ?> | <?php endif; ?> | ||||
<?= $form->field($model, 'id_product_category')->dropDownList($productCategoryModule->populateProductCategoriesDropdownList()); ?> | <?= $form->field($model, 'id_product_category')->dropDownList($productCategoryModule->populateProductCategoriesDropdownList()); ?> | ||||
<?= $form->field($model, 'description')->textInput(['maxlength' => 255]) ?> | <?= $form->field($model, 'description')->textInput(['maxlength' => 255]) ?> | ||||
<?= $form->field($model, 'recipe')->textarea()->label('Description longue') ?> | |||||
<?= $form->field($model, 'recipe')->label('Description longue') | |||||
->widget(letyii\tinymce\Tinymce::class, [ | |||||
'configs' => [ | |||||
'plugins' => Yii::$app->parameterBag->get('tinyMcePlugins') | |||||
], | |||||
]); ?> | |||||
<?= $form->field($model, 'unit') | <?= $form->field($model, 'unit') | ||||
->dropDownList(ArrayHelper::map(Product::$unitsArray, 'unit', 'wording')) | ->dropDownList(ArrayHelper::map(Product::$unitsArray, 'unit', 'wording')) | ||||
->label('Unité (pièce, poids ou volume)'); ?> | ->label('Unité (pièce, poids ou volume)'); ?> |
<div class="description-long" v-if="product.recipe.length"> | <div class="description-long" v-if="product.recipe.length"> | ||||
<a href="javascript:void(0);" class="show-more-link">En savoir | <a href="javascript:void(0);" class="show-more-link">En savoir | ||||
plus</a> | plus</a> | ||||
<div class="content"> | |||||
{{ product.recipe }} | |||||
<div class="content" v-html="product.recipe"> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</td> | </td> |
$html .= '<div class="description">' . Html::encode($model->description).'</div>'; | $html .= '<div class="description">' . Html::encode($model->description).'</div>'; | ||||
} | } | ||||
if (strlen($model->recipe)) { | if (strlen($model->recipe)) { | ||||
$html .= '<div class="description-long"><a href="javascript:void(0);" class="show-more-link">En savoir plus</a><div class="content">' . nl2br(Html::encode($model->recipe)).'</div></div>'; | |||||
$html .= '<div class="description-long"><a href="javascript:void(0);" class="show-more-link">En savoir plus</a><div class="content">' . $model->recipe .'</div></div>'; | |||||
} | } | ||||
return $html; | return $html; | ||||
} | } |