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.

72 lines
2.0 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. 'dataProvider' => $dataProvider,
  16. 'filter' => $this->render("_search", ['model' => $searchModel]),
  17. 'batch' => [
  18. [
  19. "label" => "删除",
  20. "url" => "/category/deletes"
  21. ],
  22. [
  23. "label" => "其它操作",
  24. "url" => "/category/others"
  25. ],
  26. ],
  27. 'columns' => [
  28. [
  29. 'class' => 'blobt\grid\CheckboxColumn',
  30. 'width' => '2%',
  31. 'align' => 'center'
  32. ],
  33. [
  34. 'attribute' => 'id',
  35. 'width' => '5%',
  36. 'align' => 'center'
  37. ],
  38. [
  39. 'attribute' => 'created_at',
  40. 'width' => '7%',
  41. 'format' => 'date'
  42. ],
  43. [
  44. 'attribute' => 'cat_name',
  45. 'width' => '13%',
  46. ],
  47. [
  48. 'attribute' => 'icon',
  49. 'width' => '5%',
  50. ],
  51. [
  52. 'attribute' => 'icon_type',
  53. 'width' => '7%',
  54. 'showConstText' => true
  55. ],
  56. [
  57. 'attribute' => 'description',
  58. 'enableSorting' => false,
  59. 'format' => 'ntext',
  60. 'width' => '49%',
  61. ],
  62. [
  63. 'class' => 'blobt\grid\ActionColumn',
  64. ],
  65. ],
  66. ]);
  67. ?>
  68. </div>
  69. </div>