inventory changes

This commit is contained in:
2016-03-11 21:46:59 +01:00
parent 80507fce43
commit 0fc5ab01bc
11 changed files with 160 additions and 21 deletions

View File

@@ -11,9 +11,10 @@ use yii\widgets\ActiveForm;
<div class="inventory-form">
<?php $form = ActiveForm::begin(); ?>
<div class="form-group">
<?php echo $form->field($model, "name")->textInput()?>
<?= Html::submitButton($model->isNewRecord ? Yii::t('common/inventory', 'Létrehoz') : Yii::t('common/inventory', 'Módosít'), [ 'name'=>'Inventory[submit]' ,'class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>

View File

@@ -25,7 +25,8 @@ $this->params['breadcrumbs'][] = $this->title;
'columns' => [
'id_inventory',
'id_user',
'name',
[ 'attribute' => 'id_user', "value" =>"userName" ],
'created_at:datetime',
['class' => 'yii\grid\ActionColumn',
@@ -34,7 +35,13 @@ $this->params['breadcrumbs'][] = $this->title;
if ( $action == 'view' ){
return Url::to(['inventory-item/index' , 'id'=> $model->id_inventory]);
}
}
},
'buttons' =>[
'view' =>function ($url, $model, $key) {
return Html::a('Részletek', $url,['class' => 'btn btn-xs btn-primary',
]) ;
}
]
],
],

View File

@@ -21,6 +21,7 @@ $this->params['breadcrumbs'][] = "Leltár";
'model' => $model,
'attributes' => [
'id_inventory',
'name',
['attribute'=>'id_user',
'value'=>$model->userName
],