add backend ticket stat basics

This commit is contained in:
2015-11-06 08:57:39 +01:00
parent e752352e8a
commit de8991b88f
8 changed files with 206 additions and 73 deletions

View File

@@ -2,6 +2,7 @@
use yii\helpers\Html;
use yii\grid\GridView;
use yii\helpers\ArrayHelper;
/* @var $this yii\web\View */
/* @var $searchModel backend\models\TicketSearch */
@@ -9,38 +10,41 @@ use yii\grid\GridView;
$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]); ?>
<?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',
[
'attribute' => 'id_user',
'value' => 'userName'
],
[
'attribute' => 'id_ticket_type',
'value' => 'ticketTypeName'
],
[
'attribute' => 'id_account',
'value' => 'accountName'
],
'start:date',
'end:date',
'max_usage_count',
'usage_count',
['class' => 'yii\grid\ActionColumn'],
['class' => 'yii\grid\ActionColumn',
'template' => '{view}'
],
],
]); ?>