index.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. use yii\helpers\Html;
  3. use yii\grid\GridView;
  4. /* @var $this yii\web\View */
  5. /* @var $searchModel backend\models\search\WarehouseSearch */
  6. /* @var $dataProvider yii\data\ActiveDataProvider */
  7. $this->title = Yii::t('common', 'Warehouses');
  8. $this->params['breadcrumbs'][] = $this->title;
  9. ?>
  10. <?php $this->beginBlock('content-header') ?>
  11. <?= $this->title . ' ' . Html::a(Yii::t('common', 'Create Warehouse'), ['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. 'name',
  22. 'fullArea',
  23. [
  24. 'attribute' => 'icon',
  25. 'format' => ['image', ['style' => 'height: 40px; width: 40px;border-radius: 50%;border: none;']],
  26. 'contentOptions' => ['class' => 'media-content']
  27. ],
  28. [
  29. 'class' => 'backend\widgets\grid\SwitcherColumn',
  30. 'attribute' => 'status'
  31. ],
  32. ['class' => 'common\helpers\DiyActionColumn'],
  33. ],
  34. ]); ?>
  35. </div>
  36. </div>