| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <?php
- use common\helpers\Html;
- use common\helpers\Url;
- use yii\grid\GridView;
- /* @var $this yii\web\View */
- /* @var $dataProvider yii\data\ActiveDataProvider */
- $this->title = 'Activities';
- $this->params['breadcrumbs'][] = $this->title;
- ?>
- <div class="row">
- <div class="col-12">
- <div class="box">
- <div class="box-header">
- <h3 class="box-title"><?= Html::encode($this->title) ?></h3>
- <div class="box-tools">
- <?= Html::create(['edit']) ?>
- </div>
- </div>
- <div class="box-body table-responsive">
- <?= GridView::widget([
- 'dataProvider' => $dataProvider,
- 'tableOptions' => ['class' => 'table table-hover'],
- 'columns' => [
- [
- 'class' => 'yii\grid\SerialColumn',
- 'visible' => false,
- ],
- 'id',
- 'title',
- //'cover',
- //'seo_content',
- 'description',
- //'seo_key',
- //'content',
- 'view',
- //'sort',
- 'check_max',
- 'check',
- 'author',
- //'status',
- //'created_at',
- //'updated_at',
- [
- 'class' => 'yii\grid\ActionColumn',
- 'header' => '操作',
- 'template' => '{edit} {status} {delete}',
- 'buttons' => [
- 'edit' => function($url, $model, $key){
- return Html::edit(['edit', 'id' => $model->id]);
- },
- 'status' => function($url, $model, $key){
- return Html::status($model['status']);
- },
- 'delete' => function($url, $model, $key){
- return Html::delete(['delete', 'id' => $model->id]);
- },
- ]
- ]
- ]
- ]); ?>
- </div>
- </div>
- </div>
- </div>
|