add ticket installment
This commit is contained in:
@@ -6,6 +6,7 @@ use frontend\components\ReceptionMenuWidget;
|
||||
use frontend\components\ReceptionCardNumberWidget;
|
||||
use frontend\components\ReceptionWidget;
|
||||
use yii\base\Widget;
|
||||
use common\models\Ticket;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $searchModel frontend\models\TicketSearch */
|
||||
@@ -34,7 +35,11 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<?= GridView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'columns' => [
|
||||
|
||||
[
|
||||
'attribute' => 'id_ticket',
|
||||
'value' => 'id_ticket',
|
||||
'label' => "B. Azonosító"
|
||||
],
|
||||
[
|
||||
'attribute' => 'id_account',
|
||||
'value' => 'accountName'
|
||||
@@ -51,6 +56,10 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
'attribute' => 'id_user',
|
||||
'value' => 'userName'
|
||||
],
|
||||
[
|
||||
'attribute' => 'status',
|
||||
'value' => 'statusName'
|
||||
],
|
||||
/*
|
||||
[
|
||||
'attribute' => 'id_discount',
|
||||
@@ -58,9 +67,31 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
],
|
||||
*/
|
||||
'price_brutto',
|
||||
|
||||
'created_at:datetime',
|
||||
['class' => 'yii\grid\ActionColumn',
|
||||
'template' =>'{delete}',
|
||||
'template' =>'{delete} {update}',
|
||||
'buttons' => [
|
||||
'update' => function($url, $model, $key){
|
||||
return $model->status == Ticket::STATUS_DELETED ? "" : Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url,
|
||||
[ 'title' => "Bérlet törlése", 'class'=>'btn btn-primary btn-xs', ]) ;
|
||||
},
|
||||
'delete' => function($url, $model, $key){
|
||||
return $model->status == Ticket::STATUS_DELETED ? "" : Html::a('<span class="glyphicon glyphicon-trash"></span>', $url,
|
||||
[ 'title' => "Bérlet módosítása", 'class'=>'btn btn-primary btn-xs', 'data-method' =>'post']) ;
|
||||
},
|
||||
],
|
||||
// 'buttons ' => [
|
||||
|
||||
// 'update' =>function ($url, $model, $key){
|
||||
// return "update";
|
||||
// },
|
||||
// 'delete' =>function ($url, $model, $key){
|
||||
// return "delete";
|
||||
|
||||
// }
|
||||
// ]
|
||||
// 'template' => function($model){ return $model->status == Ticket::STATUS_DELETED ? "" : "'{delete} {update}'" ;},
|
||||
],
|
||||
],
|
||||
]); ?>
|
||||
|
||||
Reference in New Issue
Block a user