add kulcsok, add tartós beszedés, add ticket type with intallments
This commit is contained in:
29
frontend/views/key/_form.php
Normal file
29
frontend/views/key/_form.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Key */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
|
||||
<div class="key-form">
|
||||
|
||||
<?php $form = ActiveForm::begin(); ?>
|
||||
|
||||
<?= $form->field($model, 'number')->textInput(['maxlength' => true]) ?>
|
||||
|
||||
<?= $form->field($model, 'status')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'type')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'rfid_key')->textInput(['maxlength' => true]) ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton($model->isNewRecord ? Yii::t('frontend/key', 'Create') : Yii::t('frontend/key', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
||||
39
frontend/views/key/_search.php
Normal file
39
frontend/views/key/_search.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model frontend\models\KeySearch */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
|
||||
<div class="key-search">
|
||||
|
||||
<?php $form = ActiveForm::begin([
|
||||
'action' => ['index'],
|
||||
'method' => 'get',
|
||||
]); ?>
|
||||
|
||||
<?= $form->field($model, 'id_key') ?>
|
||||
|
||||
<?= $form->field($model, 'number') ?>
|
||||
|
||||
<?= $form->field($model, 'status') ?>
|
||||
|
||||
<?= $form->field($model, 'type') ?>
|
||||
|
||||
<?= $form->field($model, 'created_at') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'updated_at') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'rfid_key') ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton(Yii::t('frontend/key', 'Search'), ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::resetButton(Yii::t('frontend/key', 'Reset'), ['class' => 'btn btn-default']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
||||
21
frontend/views/key/create.php
Normal file
21
frontend/views/key/create.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Key */
|
||||
|
||||
$this->title = Yii::t('frontend/key', 'Create Key');
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('frontend/key', 'Keys'), 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="key-create">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<?= $this->render('_form', [
|
||||
'model' => $model,
|
||||
]) ?>
|
||||
|
||||
</div>
|
||||
59
frontend/views/key/index.php
Normal file
59
frontend/views/key/index.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\grid\GridView;
|
||||
use yii\helpers\Url;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $searchModel frontend\models\KeySearch */
|
||||
/* @var $dataProvider yii\data\ActiveDataProvider */
|
||||
|
||||
$this->title = Yii::t('frontend/key', 'Vendéghez rendelt kulcsok');
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="key-index">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
|
||||
|
||||
<h2>Vendég: <?php echo $searchModel->card->customer->name ;?></h2>
|
||||
<h2>Kártyaszám: <?php echo $searchModel->card->number ;?></h2>
|
||||
<?= GridView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'columns' => [
|
||||
[
|
||||
'attribute' => 'key_number',
|
||||
'label' => 'Kulcs'
|
||||
|
||||
],
|
||||
[
|
||||
'attribute' => 'assign_created_at',
|
||||
'label' => 'Kiadás dátuma',
|
||||
'format' => 'datetime'
|
||||
|
||||
],
|
||||
[
|
||||
'attribute' => 'user_username',
|
||||
'label' => 'Felhasználó',
|
||||
],
|
||||
|
||||
['class' => 'yii\grid\ActionColumn',
|
||||
'template' => '{delete}',
|
||||
'buttons' => [
|
||||
'delete' => function ($url, $model, $key) {
|
||||
return Html::a('Visszaad', $url, ['class'=> 'btn btn-xs btn-danger','data-method' => 'post' ]) ;
|
||||
},
|
||||
],
|
||||
'urlCreator' => function ($action, $model, $key, $index){
|
||||
$url = "";
|
||||
if ( 'delete' == $action ){
|
||||
$url = Url::to(['key/delete','id_key' => $model['key_id_key']]);
|
||||
}
|
||||
return $url;
|
||||
}
|
||||
|
||||
],
|
||||
],
|
||||
]); ?>
|
||||
|
||||
</div>
|
||||
23
frontend/views/key/update.php
Normal file
23
frontend/views/key/update.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Key */
|
||||
|
||||
$this->title = Yii::t('frontend/key', 'Update {modelClass}: ', [
|
||||
'modelClass' => 'Key',
|
||||
]) . ' ' . $model->id_key;
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('frontend/key', 'Keys'), 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = ['label' => $model->id_key, 'url' => ['view', 'id' => $model->id_key]];
|
||||
$this->params['breadcrumbs'][] = Yii::t('frontend/key', 'Update');
|
||||
?>
|
||||
<div class="key-update">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<?= $this->render('_form', [
|
||||
'model' => $model,
|
||||
]) ?>
|
||||
|
||||
</div>
|
||||
41
frontend/views/key/view.php
Normal file
41
frontend/views/key/view.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\DetailView;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Key */
|
||||
|
||||
$this->title = $model->id_key;
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('frontend/key', 'Keys'), 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="key-view">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<p>
|
||||
<?= Html::a(Yii::t('frontend/key', 'Update'), ['update', 'id' => $model->id_key], ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::a(Yii::t('frontend/key', 'Delete'), ['delete', 'id' => $model->id_key], [
|
||||
'class' => 'btn btn-danger',
|
||||
'data' => [
|
||||
'confirm' => Yii::t('frontend/key', 'Are you sure you want to delete this item?'),
|
||||
'method' => 'post',
|
||||
],
|
||||
]) ?>
|
||||
</p>
|
||||
|
||||
<?= DetailView::widget([
|
||||
'model' => $model,
|
||||
'attributes' => [
|
||||
'id_key',
|
||||
'number',
|
||||
'status',
|
||||
'type',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'rfid_key',
|
||||
],
|
||||
]) ?>
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user