index.php 893 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. use yii\grid\GridView;
  3. use yii\helpers\Html;
  4. /* @var $this yii\web\View */
  5. /* @var $dataProvider yii\data\ActiveDataProvider */
  6. $this->title = Yii::t('backend', 'Carousel');
  7. $this->params['breadcrumbs'][] = $this->title;
  8. ?>
  9. <?php $this->beginBlock('content-header') ?>
  10. <?= $this->title . ' ' . Html::a('新幻灯片', ['create'], ['class' => 'btn btn-success']) ?>
  11. <?php $this->endBlock() ?>
  12. <div class="box box-success">
  13. <div class="box-body">
  14. <?php echo GridView::widget([
  15. 'dataProvider' => $dataProvider,
  16. 'columns' => [
  17. 'id',
  18. 'key',
  19. 'title',
  20. [
  21. 'class' => 'backend\widgets\grid\SwitcherColumn',
  22. 'attribute' => 'status',
  23. 'reload' => 0
  24. ],
  25. [
  26. 'class' => 'common\helpers\DiyActionColumn',
  27. 'template'=>'{update} {delete}'
  28. ],
  29. ],
  30. ]); ?>
  31. </div>
  32. </div>