index.php 978 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. use yii\helpers\Html;
  3. use yii\grid\GridView;
  4. use yii\widgets\Pjax;
  5. /* @var $this yii\web\View */
  6. /* @var $searchModel app\models\CategoriesSearch */
  7. /* @var $dataProvider yii\data\ActiveDataProvider */
  8. $this->title = Yii::t('app', 'Categories');
  9. $this->params['breadcrumbs'][] = $this->title;
  10. ?>
  11. <div class="categories-index">
  12. <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
  13. <p>
  14. <?= Html::a(Yii::t('app', 'Create Categories'), ['create'], ['class' => 'btn btn-success']) ?>
  15. </p>
  16. <?php Pjax::begin(); ?>
  17. <?= GridView::widget([
  18. 'dataProvider' => $dataProvider,
  19. 'filterModel' => $searchModel,
  20. 'columns' => [
  21. ['class' => 'yii\grid\SerialColumn'],
  22. //'id',
  23. 'title',
  24. 'description',
  25. 'key_words',
  26. ['class' => 'yii\grid\ActionColumn'],
  27. ],
  28. ]);
  29. ?>
  30. <?php Pjax::end(); ?></div>