add ticket type model + crud ( bérlet típus)
This commit is contained in:
@@ -23,19 +23,35 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
'dataProvider' => $dataProvider,
|
||||
'columns' => [
|
||||
'name',
|
||||
'max_usage_count',
|
||||
'price_brutto',
|
||||
'time_unit_type',
|
||||
'max_usage_count',
|
||||
'time_unit_count',
|
||||
'id_account',
|
||||
'flag_student',
|
||||
'status',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
[
|
||||
|
||||
'attribute' =>'time_unit_type',
|
||||
'value' =>'timeUnitHuman',
|
||||
],
|
||||
[
|
||||
'attribute' => 'id_account',
|
||||
'value' => 'accountName',
|
||||
],
|
||||
[
|
||||
'attribute' =>'flag_student',
|
||||
'value' =>function($model, $key, $index, $column){
|
||||
return $model->isStudent() ? Yii::t('common', "Yes") : Yii::t('common', "No") ;
|
||||
},
|
||||
|
||||
],
|
||||
[
|
||||
'attribute' =>'status',
|
||||
'value' =>'statusHuman',
|
||||
],
|
||||
'created_at:datetime',
|
||||
'updated_at:datetime',
|
||||
|
||||
[
|
||||
'class' => 'yii\grid\ActionColumn',
|
||||
'template' =>'{view} {edit}'
|
||||
'template' =>'{view} {update}'
|
||||
|
||||
],
|
||||
],
|
||||
|
||||
@@ -4,10 +4,9 @@ use yii\helpers\Html;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\TicketType */
|
||||
/* @var $accounts common\models\Account[] */
|
||||
|
||||
$this->title = Yii::t('common/ticket_type', 'Update {modelClass}: ', [
|
||||
'modelClass' => 'Ticket Type',
|
||||
]) . ' ' . $model->name;
|
||||
$this->title = Yii::t('common/ticket_type', 'Update ticket type:' ) . ' ' . $model->name;
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/ticket_type', 'Ticket Types'), 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id_ticket_type]];
|
||||
$this->params['breadcrumbs'][] = Yii::t('common/ticket_type', 'Update');
|
||||
@@ -18,6 +17,8 @@ $this->params['breadcrumbs'][] = Yii::t('common/ticket_type', 'Update');
|
||||
|
||||
<?= $this->render('_form', [
|
||||
'model' => $model,
|
||||
'accounts' => $accounts,
|
||||
|
||||
]) ?>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -48,10 +48,12 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
'price_brutto',
|
||||
[
|
||||
'attribute' => 'id_account',
|
||||
'value' => $model->account->name,
|
||||
'label' => Yii::t('common/ticket_type','Account')
|
||||
'value' => $model->accountName,
|
||||
],
|
||||
'flag_student',
|
||||
[
|
||||
'attribute' => 'flag_student',
|
||||
'value' => ( $model->isStudent() ? Yii::t('common', 'Yes' ) : Yii::t('common', 'No' ) ),
|
||||
],
|
||||
[
|
||||
'attribute' => 'status',
|
||||
'value' => $model->statusHuman
|
||||
|
||||
Reference in New Issue
Block a user