add inventory to frontend

This commit is contained in:
2016-03-24 07:44:00 +01:00
parent e7b16f20ce
commit ed837d6580
27 changed files with 1259 additions and 71 deletions

View File

@@ -0,0 +1,33 @@
<?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>