title = Yii::t('common/card', 'Cards'); $this->params['breadcrumbs'][] = $this->title; ?>
= Html::a(Yii::t('common/card', 'Create Card'), ['create'], ['class' => 'btn btn-success']) ?>
= GridView::widget([ 'dataProvider' => $dataProvider, 'columns' => [ ['class' => 'yii\grid\SerialColumn'], [ 'attribute' => 'card_number', 'label' => 'Kártyaszám' ], [ 'attribute' => 'card_rfid_key', 'label' => 'RFID szám' ], [ 'attribute' => 'card_status', 'label' => 'Státusz', 'value' => function ($model, $key, $index, $column){ return Card::toStatusName($model['card_status'],'-'); } ], [ 'attribute' => 'card_type', 'label' => 'Típus', 'value' => function ($model, $key, $index, $column){ return Card::toTypeName($model['card_type'],'-'); } ], [ 'attribute' => 'customer_id_customer', 'label' => 'Vendég azonosító' ], [ 'attribute' => 'customer_name', 'label' => 'Vendég név' ], [ 'attribute' => 'key_number', 'label' => 'Kulcs száma' ], [ 'attribute' => 'card_flag', 'label' => 'Info', 'value' => function ($model, $key, $index, $column){ return Helper::getArrayValue(DoorLog::getCardFlagTexts(), $model['card_flag'], "Ismeretlen ok"); } ], [ 'class' => 'yii\grid\ActionColumn', 'template' => '{view}{update}', 'urlCreator' => function ($action, $model, $key, $index){ $result = ""; if ( 'view' == $action ){ $result = Url::toRoute(['card/view' , 'id' => $model['card_id_card'] ]); }else if ( 'update' == $action ){ $result = Url::toRoute(['card/update' , 'id' => $model['card_id_card'] ]); } return $result; }, 'buttons' =>[ 'view' => function ($url, $model, $key) { return Html::a("Nézet" ,$url,['class' =>'btn btn-primary btn-xs']); }, 'update' => function ($url, $model, $key) { return Html::a("Módosít" ,$url,['class' =>'btn btn-primary btn-xs']); }, ] ], ], ]); ?>