index.php 1.2 KB

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