<leirás>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\grid\GridView;
|
||||
use common\models\Key;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $searchModel backend\models\KeySearch */
|
||||
@@ -11,23 +12,33 @@ $this->title = Yii::t('backend/key', 'Keys');
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="key-index">
|
||||
asdf
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
|
||||
<?php echo $this->render('_search', ['model' => $searchModel]); /* ezt megcsinálni hogy csak numberre lehessen itt a fitness-web/backend/views/key/_search.php töltődik be */?>
|
||||
|
||||
<p>
|
||||
<?= Html::a(Yii::t('backend/key', 'Create Key'), ['create'], ['class' => 'btn btn-success']) ?>
|
||||
<?php
|
||||
// Új kulcs gomb kigenerálása a Yii::t('backend/key' a fitness-web/common/messages/hu/backend/key.php-ba lesz (miután létrehoztam)
|
||||
echo Html::a(Yii::t('backend/key', 'Create Key'), ['create'], ['class' => 'btn btn-success']);
|
||||
?>
|
||||
</p>
|
||||
|
||||
<?= GridView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'filterModel' => $searchModel,
|
||||
//'filterModel' => $searchModel, // ezt nem szeretjük
|
||||
'columns' => [
|
||||
['class' => 'yii\grid\SerialColumn'],
|
||||
|
||||
'id_key',
|
||||
// ['class' => 'yii\grid\SerialColumn'],
|
||||
// 'id_key',
|
||||
'number',
|
||||
'status',
|
||||
[
|
||||
'attribute' => 'status',
|
||||
'value' => function ($model, $key, $index, $column){
|
||||
$statuszok = Key::statuses();
|
||||
$result = $statuszok[$model->status];
|
||||
return $result;
|
||||
}
|
||||
],
|
||||
//'status',
|
||||
'type',
|
||||
'created_at',
|
||||
// 'updated_at',
|
||||
|
||||
Reference in New Issue
Block a user