improve customer api & gui

This commit is contained in:
Roland Schneider
2021-10-02 22:21:14 +02:00
parent 1d065cc729
commit f98dcb656f
44 changed files with 893 additions and 298 deletions

View File

@@ -13,6 +13,7 @@ use yii\widgets\ActiveForm;
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'theme')->dropDownList(\common\models\EventType::themes()) ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? Yii::t('event-type', 'Create') : Yii::t('event-type', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>

View File

@@ -26,7 +26,13 @@ $this->params['breadcrumbs'][] = $this->title;
'name',
'created_at:datetime',
'updated_at:datetime',
[
'attribute' => 'theme',
'label' => 'Színtéma',
'value' => function ($model, $key, $index, $column){
return isset($model['theme']) ? "Színtéma " . ($model['theme']+1) : "";
}
],
['class' => 'yii\grid\ActionColumn',
'template' => '{view} {update}'
],

View File

@@ -30,6 +30,10 @@ $this->params['breadcrumbs'][] = $this->title;
'attributes' => [
'id',
'name',
[
'label'=> 'Színtéma',
'value' => ( isset($model->theme) ? 'Színtéma ' . ($model->theme+1) : '-' )
],
'created_at',
'updated_at',
],