add changes
This commit is contained in:
parent
c5bfae9ec1
commit
f30acbc7d2
@ -9,6 +9,7 @@ use backend\assets\InventoryItemIndexAsset;
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $searchModel backend\models\InventoryItemSearch */
|
||||
/* @var $dataProvider yii\data\ActiveDataProvider */
|
||||
/* @var $model \common\models\Inventory */
|
||||
|
||||
$this->title = Yii::t('common/inventory-item', 'Leltár részletei');
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
@ -27,6 +28,7 @@ $this->registerJs('inventoryItemIndex.init( '. json_encode($options) .' );');
|
||||
.table th {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.table td {
|
||||
white-space: normal;
|
||||
}
|
||||
@ -37,11 +39,8 @@ $this->registerJs('inventoryItemIndex.init( '. json_encode($options) .' );');
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="inventory-item-index">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<?= DetailView::widget([
|
||||
'model' => $model,
|
||||
'attributes' => [
|
||||
@ -60,17 +59,12 @@ $this->registerJs('inventoryItemIndex.init( '. json_encode($options) .' );');
|
||||
'created_at:datetime',
|
||||
],
|
||||
]) ?>
|
||||
|
||||
<?php
|
||||
if ($model->isOpen()) {
|
||||
echo Html::a("Lezárás", ['inventory/close', 'id' => $model->id_inventory], ['data-method' => 'post', 'class' => 'btn btn-danger']);
|
||||
}
|
||||
?>
|
||||
|
||||
<?php echo $this->render('_search', ['model' => $searchModel]); ?>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
Magyarázat:
|
||||
<ul>
|
||||
@ -94,13 +88,10 @@ $this->registerJs('inventoryItemIndex.init( '. json_encode($options) .' );');
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo Html::a("XLS letöltése", Url::current(['InventoryItemSearch[output]' => 'xls']), ['class' => 'btn btn-primary']) ?>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
|
||||
$columns = [
|
||||
[
|
||||
'attribute' => 'item_name',
|
||||
@ -160,23 +151,18 @@ $this->registerJs('inventoryItemIndex.init( '. json_encode($options) .' );');
|
||||
|
||||
|
||||
];
|
||||
|
||||
if ($model->isOpen()) {
|
||||
|
||||
$columns[] = ['class' => 'yii\grid\ActionColumn',
|
||||
'template' => '{update}',
|
||||
'urlCreator' => function ($action, $model, $key, $index){
|
||||
return Url::to(['inventory-item/update', 'id' => $model['item_id_inventory_item' ] ]) ;
|
||||
},
|
||||
'buttons' => [
|
||||
'update' =>function ($url, $model, $key) {
|
||||
'update' => function ($url) {
|
||||
return Html::a('Módosítás', $url, ['class' => 'btn btn-xs btn-success',
|
||||
'data' => [
|
||||
],
|
||||
]);
|
||||
}
|
||||
],
|
||||
'urlCreator' => function($action, $model, $key, $index){
|
||||
'urlCreator' => function ($action, $model) {
|
||||
$result = "";
|
||||
if ($action == 'update') {
|
||||
$result = Url::toRoute(['update-item', 'id' => $model['item_id_inventory_item']]);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user