<?php

use yii\helpers\Html;
use yii\widgets\DetailView;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $model common\models\CardPackage */

$this->title = "Kártya csomag: "+$model->id_card_package;
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/card_package', 'Kártya csomagok'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="card-package-view">

    <h1><?= Html::encode($this->title) ?></h1>

    <p>
        <?= Html::a(Yii::t('common/card_package', 'Excel letöltés'), ['download', 'id' => $model->id_card_package], ['class' => 'btn btn-primary']) ?>
    </p>

    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
            'id_card_package',
        	['attribute' => 'user','value' => $model->userName],
            'id_user',
            'count',
        	'printed',
            'created_at:datetime',
            'printedDate:datetime',
        ],
    ]) ?>
    
     <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'columns' => [
        		[
        		'attribute' => 'id_card',
        		'label' => "Kártya azonosító"
     		],
        		[
        		'attribute' => 'number',
        		'label' => "Kártyaszám"
     		],
        		[
        		'attribute' => 'rfid_key',
        		'label' => "RFID szám"
     		],
           [
        		'attribute' => 'created_at',
        		'label' => "Létrehozva",
           		'format' => 'datetime'
     		],
        		]
     		]);
     ?>

</div>
