add inventory changes
This commit is contained in:
@@ -4,6 +4,7 @@ use yii\helpers\Html;
|
||||
use yii\grid\GridView;
|
||||
use yii\widgets\DetailView;
|
||||
use yii\helpers\Url;
|
||||
use backend\assets\InventoryItemIndexAsset;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $searchModel backend\models\InventoryItemSearch */
|
||||
@@ -11,6 +12,15 @@ use yii\helpers\Url;
|
||||
|
||||
$this->title = Yii::t('common/inventory-item', 'Leltár részletei');
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
|
||||
|
||||
InventoryItemIndexAsset::register($this);
|
||||
|
||||
$options = [];
|
||||
$options['products'] = $productOptions;
|
||||
|
||||
$this->registerJs('inventoryItemIndex.init( '. json_encode($options) .' );');
|
||||
|
||||
?>
|
||||
<div class="inventory-item-index">
|
||||
|
||||
@@ -23,17 +33,17 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
'name',
|
||||
['attribute'=>'id_user',
|
||||
'value'=>$model->userName
|
||||
],
|
||||
['attribute'=>'id_account',
|
||||
'value'=>$model->accountName
|
||||
],
|
||||
'created_at:datetime',
|
||||
],
|
||||
]) ?>
|
||||
|
||||
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
|
||||
<?php echo $this->render('_search', ['model' => $searchModel]); ?>
|
||||
|
||||
|
||||
<p>
|
||||
<?= Html::a(Yii::t('common/inventory', 'Új termék felvétele a leltárba'), ['inventory-item/create','id' =>$model->id_inventory], ['class' => 'btn btn-success']) ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Magyarázat:
|
||||
@@ -59,6 +69,10 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo Html::a("XLS letöltése", Url::current(['InventoryItemSearch[output]' =>'xls']),['class' =>'btn btn-primary'])?>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
echo GridView::widget( [
|
||||
'dataProvider' => $dataProvider,
|
||||
@@ -114,16 +128,14 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
|
||||
],
|
||||
['class' => 'yii\grid\ActionColumn',
|
||||
'template' => '{delete}',
|
||||
'template' => '{update}',
|
||||
'urlCreator' => function ($action, $model, $key, $index){
|
||||
return Url::to(['inventory-item/delete', 'id' => $model['item_id_inventory_item' ] ]) ;
|
||||
return Url::to(['inventory-item/update', 'id' => $model['item_id_inventory_item' ] ]) ;
|
||||
},
|
||||
'buttons' =>[
|
||||
'delete' =>function ($url, $model, $key) {
|
||||
return Html::a('Törlés', $url,['class' => 'btn btn-xs btn-danger',
|
||||
'update' =>function ($url, $model, $key) {
|
||||
return Html::a('Módosítás', $url,['class' => 'btn btn-xs btn-success',
|
||||
'data' => [
|
||||
'confirm' => Yii::t('common/inventory-item', 'Biztosan törlöd ezt az elemet?'),
|
||||
'method' => 'post',
|
||||
],
|
||||
]) ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user