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