#1: Log Card Read In Botond

This commit is contained in:
2018-02-07 08:23:26 +01:00
parent acb5b040c5
commit cf08823d3f
13 changed files with 149 additions and 54 deletions

View File

@@ -19,6 +19,8 @@ use common\models\Account;
<?= $form->field($model, 'type')->dropDownList(Account::types()) ?>
<?= $form->field($model, 'log_card_read_in_reception')->checkbox([], false) ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? Yii::t('common/account', 'Create') : Yii::t('common/account', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>

View File

@@ -22,26 +22,33 @@ $this->params['breadcrumbs'][] = $this->title;
</p>
<?php }?>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
'name',
[
'attribute' => 'status',
'value' => 'statusHuman',
],
[
'attribute' => 'type',
'value' => 'typeHuman',
],
'created_at:datetime',
'updated_at:datetime',
<?=
/** @noinspection PhpUnhandledExceptionInspection */
GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
'name',
[
'attribute' => 'status',
'value' => 'statusHuman',
],
[
'attribute' => 'type',
'value' => 'typeHuman',
],
[
'attribute' => 'log_card_read_in_reception',
'value' => function($model) { return $model->log_card_read_in_reception == '1' ? 'Igen' : 'Nem'; }
],
'created_at:datetime',
'updated_at:datetime',
['class' => 'yii\grid\ActionColumn',
'template' => RoleDefinition::getRoleTemplate( ['admin' => '{view} {update}','employee' => '{view}' , 'reception' => '{view}']),
],
],
]); ?>
['class' => 'yii\grid\ActionColumn',
'template' => RoleDefinition::getRoleTemplate(['admin' => '{view} {update}', 'employee' => '{view}', 'reception' => '{view}']),
],
],
]);
?>
</div>

View File

@@ -21,7 +21,8 @@ $this->params['breadcrumbs'][] = $this->title;
</p>
<?php }?>
<?= DetailView::widget([
<?= /** @noinspection PhpUnhandledExceptionInspection */
DetailView::widget([
'model' => $model,
'attributes' => [
'name',
@@ -34,6 +35,10 @@ $this->params['breadcrumbs'][] = $this->title;
'attribute' => 'type',
'value' => $model->typeHuman
],
[
'attribute' => 'log_card_read_in_reception',
'value' => $model->log_card_read_in_reception == '1' ? 'Igen' : 'Nem'
],
'created_at:datetime',
'updated_at:datetime',
],