34 lines
836 B
PHP
34 lines
836 B
PHP
<?php
|
|
|
|
use yii\helpers\Html;
|
|
use backend\assets\InventoryItemCreateAsset;
|
|
use yii\helpers\Url;
|
|
|
|
|
|
/* @var $this yii\web\View */
|
|
/* @var $model common\models\InventoryItem */
|
|
|
|
$this->title = Yii::t('common/inventory-item', 'Új leltár elem');
|
|
$this->params['breadcrumbs'][] = ['label' => 'Leltár' , 'url' => ['inventory/view', 'id' => $model->inventory->id_inventory]];
|
|
$this->params['breadcrumbs'][] = $this->title;
|
|
|
|
InventoryItemCreateAsset::register($this);
|
|
|
|
|
|
$options = [];
|
|
$options['products'] = $model->productOptions;
|
|
$options['url_product_find'] = Url::toRoute(['product/find']);
|
|
|
|
$this-> registerJs('inventoryItemCreate.init( '. json_encode($options) .' );');
|
|
|
|
?>
|
|
<div class="inventory-item-create">
|
|
|
|
<h1><?= Html::encode($this->title) ?></h1>
|
|
|
|
<?= $this->render('_form', [
|
|
'model' => $model,
|
|
]) ?>
|
|
|
|
</div>
|