add ticket basics
This commit is contained in:
47
frontend/views/ticket/_form.php
Normal file
47
frontend/views/ticket/_form.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Ticket */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
|
||||
<div class="ticket-form">
|
||||
|
||||
<?php $form = ActiveForm::begin(); ?>
|
||||
|
||||
<?= $form->field($model, 'id_user')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'id_ticket_type')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'id_account')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'id_discount')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'start')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'end')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'max_usage_count')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'usage_count')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'status')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'price_brutto')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'comment')->textInput(['maxlength' => true]) ?>
|
||||
|
||||
<?= $form->field($model, 'created_at')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'updated_at')->textInput() ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton($model->isNewRecord ? Yii::t('common/ticket', 'Create') : Yii::t('common/ticket', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
||||
53
frontend/views/ticket/_search.php
Normal file
53
frontend/views/ticket/_search.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model frontend\models\TicketSearch */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
|
||||
<div class="ticket-search">
|
||||
|
||||
<?php $form = ActiveForm::begin([
|
||||
'action' => ['index'],
|
||||
'method' => 'get',
|
||||
]); ?>
|
||||
|
||||
<?= $form->field($model, 'id_ticket') ?>
|
||||
|
||||
<?= $form->field($model, 'id_user') ?>
|
||||
|
||||
<?= $form->field($model, 'id_ticket_type') ?>
|
||||
|
||||
<?= $form->field($model, 'id_account') ?>
|
||||
|
||||
<?= $form->field($model, 'id_discount') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'start') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'end') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'max_usage_count') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'usage_count') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'status') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'price_brutto') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'comment') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'created_at') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'updated_at') ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton(Yii::t('common/ticket', 'Search'), ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::resetButton(Yii::t('common/ticket', 'Reset'), ['class' => 'btn btn-default']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
||||
21
frontend/views/ticket/create.php
Normal file
21
frontend/views/ticket/create.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Ticket */
|
||||
|
||||
$this->title = Yii::t('common/ticket', 'Create Ticket');
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/ticket', 'Tickets'), 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="ticket-create">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<?= $this->render('_form', [
|
||||
'model' => $model,
|
||||
]) ?>
|
||||
|
||||
</div>
|
||||
47
frontend/views/ticket/index.php
Normal file
47
frontend/views/ticket/index.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\grid\GridView;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $searchModel frontend\models\TicketSearch */
|
||||
/* @var $dataProvider yii\data\ActiveDataProvider */
|
||||
|
||||
$this->title = Yii::t('common/ticket', 'Tickets');
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="ticket-index">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
|
||||
|
||||
<p>
|
||||
<?= Html::a(Yii::t('common/ticket', 'Create Ticket'), ['create'], ['class' => 'btn btn-success']) ?>
|
||||
</p>
|
||||
|
||||
<?= GridView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'filterModel' => $searchModel,
|
||||
'columns' => [
|
||||
['class' => 'yii\grid\SerialColumn'],
|
||||
|
||||
'id_ticket',
|
||||
'id_user',
|
||||
'id_ticket_type',
|
||||
'id_account',
|
||||
'id_discount',
|
||||
// 'start',
|
||||
// 'end',
|
||||
// 'max_usage_count',
|
||||
// 'usage_count',
|
||||
// 'status',
|
||||
// 'price_brutto',
|
||||
// 'comment',
|
||||
// 'created_at',
|
||||
// 'updated_at',
|
||||
|
||||
['class' => 'yii\grid\ActionColumn'],
|
||||
],
|
||||
]); ?>
|
||||
|
||||
</div>
|
||||
23
frontend/views/ticket/update.php
Normal file
23
frontend/views/ticket/update.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Ticket */
|
||||
|
||||
$this->title = Yii::t('common/ticket', 'Update {modelClass}: ', [
|
||||
'modelClass' => 'Ticket',
|
||||
]) . ' ' . $model->id_ticket;
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/ticket', 'Tickets'), 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = ['label' => $model->id_ticket, 'url' => ['view', 'id' => $model->id_ticket]];
|
||||
$this->params['breadcrumbs'][] = Yii::t('common/ticket', 'Update');
|
||||
?>
|
||||
<div class="ticket-update">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<?= $this->render('_form', [
|
||||
'model' => $model,
|
||||
]) ?>
|
||||
|
||||
</div>
|
||||
48
frontend/views/ticket/view.php
Normal file
48
frontend/views/ticket/view.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\DetailView;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Ticket */
|
||||
|
||||
$this->title = $model->id_ticket;
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/ticket', 'Tickets'), 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="ticket-view">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<p>
|
||||
<?= Html::a(Yii::t('common/ticket', 'Update'), ['update', 'id' => $model->id_ticket], ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::a(Yii::t('common/ticket', 'Delete'), ['delete', 'id' => $model->id_ticket], [
|
||||
'class' => 'btn btn-danger',
|
||||
'data' => [
|
||||
'confirm' => Yii::t('common/ticket', 'Are you sure you want to delete this item?'),
|
||||
'method' => 'post',
|
||||
],
|
||||
]) ?>
|
||||
</p>
|
||||
|
||||
<?= DetailView::widget([
|
||||
'model' => $model,
|
||||
'attributes' => [
|
||||
'id_ticket',
|
||||
'id_user',
|
||||
'id_ticket_type',
|
||||
'id_account',
|
||||
'id_discount',
|
||||
'start',
|
||||
'end',
|
||||
'max_usage_count',
|
||||
'usage_count',
|
||||
'status',
|
||||
'price_brutto',
|
||||
'comment',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
],
|
||||
]) ?>
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user