You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.5 KiB

  1. <?php
  2. use yii\helpers\Html;
  3. use blobt\grid\GridView;
  4. //use yii\grid\GridView;
  5. /* @var $this yii\web\View */
  6. /* @var $searchModel common\models\CategorySearch */
  7. /* @var $dataProvider yii\data\ActiveDataProvider */
  8. $this->title = 'Categories';
  9. $this->params['breadcrumbs'][] = $this->title;
  10. ?>
  11. <div class="row">
  12. <div class="col-xs-12">
  13. <?php
  14. echo GridView::widget([
  15. 'filter' => $this->render("_search", ['model' => $searchModel]),
  16. 'dataProvider' => $dataProvider,
  17. 'columns' => [
  18. [
  19. 'attribute' => 'id',
  20. 'width' => '5%',
  21. 'align' => 'center'
  22. ],
  23. [
  24. 'attribute' => 'created_at',
  25. 'width' => '7%',
  26. 'format' => 'date'
  27. ],
  28. [
  29. 'attribute' => 'cat_name',
  30. 'width' => '13%',
  31. ],
  32. [
  33. 'attribute' => 'icon',
  34. 'width' => '5%',
  35. ],
  36. [
  37. 'attribute' => 'icon_type',
  38. 'width' => '7%',
  39. 'showConstText' => true
  40. ],
  41. [
  42. 'attribute' => 'description',
  43. 'format' => 'ntext',
  44. 'width' => '50%',
  45. ],
  46. [
  47. 'class' => 'yii\grid\ActionColumn',
  48. ],
  49. ],
  50. ]);
  51. ?>
  52. </div>
  53. </div>