index.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. use yii\helpers\Html;
  3. use yii\grid\GridView;
  4. /* @var $this yii\web\View */
  5. /* @var $searchModel backend\models\search\CarGroupSearch */
  6. /* @var $dataProvider yii\data\ActiveDataProvider */
  7. $this->title = Yii::t('common', 'Car Groups');
  8. $this->params['breadcrumbs'][] = $this->title;
  9. ?>
  10. <?php $this->beginBlock('content-header') ?>
  11. <?= $this->title . ' ' . Html::a(Yii::t('common', 'Create Car Group'), ['create'], ['class' => 'btn btn-success']) ?>
  12. <?php $this->endBlock() ?>
  13. <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
  14. <div class="box box-success">
  15. <div class="box-body">
  16. <?= GridView::widget([
  17. 'dataProvider' => $dataProvider,
  18. 'filterModel' => $searchModel,
  19. 'columns' => [
  20. 'id',
  21. 'brand_id',
  22. 'user_id',
  23. 'title',
  24. 'province',
  25. 'city',
  26. 'quantity',
  27. 'amount',
  28. [
  29. 'attribute' => 'qrcode',
  30. 'format' => ['image', ['style' => 'height: 40px; width: 40px;border-radius: 50%;border: none;']],
  31. 'contentOptions' => ['class' => 'media-content']
  32. ],
  33. // 'wechat',
  34. // 'created_at',
  35. // 'updated_at',
  36. // 'status',
  37. [
  38. 'class' => 'backend\widgets\grid\SwitcherColumn',
  39. 'attribute' => 'status'
  40. ],
  41. ['class' => 'yii\grid\ActionColumn'],
  42. ],
  43. ]); ?>
  44. </div>
  45. </div>