<?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $searchModel backend\models\search\CarGroupSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = Yii::t('common', 'Car Groups');
$this->params['breadcrumbs'][] = $this->title;
?>
<?php $this->beginBlock('content-header') ?>
<?= $this->title . ' ' . Html::a(Yii::t('common', 'Create Car Group'), ['create'], ['class' => 'btn btn-success']) ?>
<?php $this->endBlock() ?>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>

<div class="box box-success">
    <div class="box-body">
        <?= GridView::widget([
            'dataProvider' => $dataProvider,
            'filterModel' => $searchModel,
            'columns' => [
                'id',
                'brand_id',
                'user_id',
                'title',
                'province',
                'city',
                'quantity',
                'amount',
                [
                    'attribute' => 'qrcode',
                    'format' => ['image', ['style' => 'height: 40px; width: 40px;border-radius: 50%;border: none;']],
                    'contentOptions' => ['class' => 'media-content']
                ],

                // 'wechat',
                // 'created_at',
                // 'updated_at',
                // 'status',

                [
                    'class' => 'backend\widgets\grid\SwitcherColumn',
                    'attribute' => 'status'
                ],
                ['class' => 'yii\grid\ActionColumn'],
            ],
        ]); ?>
    </div>
</div>
