<?php

use yii\helpers\Html;
use yii\widgets\DetailView;
use common\models\Key;
use common\components\Helper;

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

$this->title = "Kulcs részletek";
$this->params['breadcrumbs'][] = ['label' => Yii::t('backend/key', 'Keys'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="key-view">

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

    <p>
        <?= Html::a(Yii::t('backend/key', 'Update'), ['update', 'id' => $model->id_key], ['class' => 'btn btn-primary']) ?>
    </p>

    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
        	[
        		'attribute' => 'id_key',
        		'label' =>"Kulcs azon."
    		],
            'number',
            'rfid_key',
        	[
        		'attribute' => 'status',
        		'value' => Helper::getArrayValue( Key::statuses() ,$model->status, "Ismeretlen" )
    		],
        	[
        		'attribute' => 'type',
        		'value' => Helper::getArrayValue( Key::types() ,$model->type, "Ismeretlen" )
    		],
            'created_at:datetime',
        ],
    ]) ?>

</div>
