index.php 959 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. use yii\grid\GridView;
  3. use yii\helpers\Html;
  4. use yii\widgets\Pjax;
  5. /*
  6. * @var yii\web\View $this
  7. * @var yii\data\ActiveDataProvider $dataProvider
  8. * @var rbac\models\AuthItemSearch $searchModel
  9. */
  10. $this->title = Yii::t('rbac', 'Rules');
  11. $this->params['breadcrumbs'][] = $this->title;
  12. ?>
  13. <?php $this->beginBlock('content-header') ?>
  14. <?= $this->title . ' ' . Html::a(Yii::t('app', '新规则'), ['create'], ['class' => 'btn btn-primary btn-flat btn-xs']) ?>
  15. <?php $this->endBlock() ?>
  16. <div class="box box-primary">
  17. <div class="box-body">
  18. <?php
  19. Pjax::begin([
  20. 'enablePushState' => false,
  21. ]);
  22. echo GridView::widget([
  23. 'dataProvider' => $dataProvider,
  24. 'filterModel' => $searchModel,
  25. 'columns' => [
  26. ['class' => 'yii\grid\SerialColumn'],
  27. 'name',
  28. 'className',
  29. ['class' => 'yii\grid\ActionColumn'],
  30. ],
  31. ]);
  32. Pjax::end();
  33. ?>
  34. </div>
  35. </div>