115 lines
3.1 KiB
PHP
115 lines
3.1 KiB
PHP
<?php
|
|
|
|
use yii\helpers\Html;
|
|
use yii\grid\GridView;
|
|
use yii\widgets\DetailView;
|
|
use yii\base\Widget;
|
|
use yii\base\Object;
|
|
use yii\data\ArrayDataProvider;
|
|
use common\components\AccountStatisticWidget;
|
|
use common\components\DataProviderTotal;
|
|
use common\components\Helper;
|
|
use common\models\Transfer;
|
|
use yii\helpers\VarDumper;
|
|
use yii\widgets\ActiveForm;
|
|
use yii\helpers\Url;
|
|
|
|
/* @var $this yii\web\View */
|
|
/* @var $searchModel backend\models\TransferSearch */
|
|
/* @var $dataProvider yii\data\ActiveDataProvider */
|
|
|
|
$this->title = Yii::t('frontend/transfer', 'Transfers');
|
|
$this->params['breadcrumbs'][] = $this->title;
|
|
|
|
?>
|
|
<style>
|
|
.table-transfer .money,
|
|
.table-transfer .count,
|
|
.table-transfer .item-price
|
|
{
|
|
text-align: right;
|
|
}
|
|
</style>
|
|
|
|
<div class="transfer-index">
|
|
|
|
<h1><?= Html::encode($this->title) ?></h1>
|
|
<?php // echo $this->render('_search', ['model' => $searchModel, 'accounts' => $accounts,'users' => $users,]); ?>
|
|
|
|
<div class="transfer-form">
|
|
|
|
<?php $form = ActiveForm::begin(
|
|
[ 'action' => Url::current() ]
|
|
); ?>
|
|
|
|
<?= GridView::widget([
|
|
'tableOptions' => ['class' => 'table table-striped table-bordered table-transfer'],
|
|
'dataProvider' => $dataProvider,
|
|
'showFooter'=>TRUE,
|
|
|
|
'columns' => [
|
|
[
|
|
'label' => '',
|
|
'value' => function ($model, $key, $index, $column) use ( &$searchModel){
|
|
|
|
|
|
return Html::checkbox(Html::getInputName($searchModel, 'selected[]') , in_array($model['transfer_id_transfer'], $searchModel->selected) , [ 'class' => 'cart-item', 'value' => $model['transfer_id_transfer']] );
|
|
},
|
|
'format' => 'raw'
|
|
],
|
|
[
|
|
'attribute' => 'user_username',
|
|
'label' => 'Felhasználó'
|
|
],
|
|
[
|
|
'attribute' => 'customer_name',
|
|
'label' => 'Vendég'
|
|
],
|
|
[
|
|
'attribute' => 'ticket_type_name',
|
|
'label' => 'Bérlet típus'
|
|
],
|
|
[
|
|
'attribute' => 'ticket_start',
|
|
'label' => 'Érvényes -tól',
|
|
'format' => 'date'
|
|
],
|
|
[
|
|
'attribute' => 'ticket_end',
|
|
'label' => 'Érvényes -ig',
|
|
'format' => 'date'
|
|
],
|
|
[
|
|
'attribute' => 'product_name',
|
|
'label' => 'Termék'
|
|
],
|
|
[
|
|
'attribute' => 'transfer_created_at',
|
|
'label' => 'Kiadva',
|
|
'format' => 'datetime'
|
|
],
|
|
[
|
|
'attribute' => 'transfer_money',
|
|
'label' => 'Összeg'
|
|
],
|
|
[
|
|
'attribute' => 'transfer_status',
|
|
'label' => 'Státusz',
|
|
'value' => function ($model, $key, $index, $column){
|
|
return Helper::getArrayValue(Transfer::statuses(), $model['transfer_status'],'');
|
|
},
|
|
],
|
|
],
|
|
]); ?>
|
|
|
|
|
|
<div class="form-group">
|
|
<?= Html::submitButton( 'Fizetettnek jelöl', [ 'class' => 'btn btn-success' ] ) ?>
|
|
</div>
|
|
|
|
<?php ActiveForm::end(); ?>
|
|
|
|
</div>
|
|
|
|
</div>
|