index.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. use yii\helpers\Html;
  3. use yii\grid\GridView;
  4. /* @var $this yii\web\View */
  5. /* @var $searchModel backend\models\search\ClockSearch */
  6. /* @var $dataProvider yii\data\ActiveDataProvider */
  7. $this->title = Yii::t('common', 'Clocks');
  8. $this->params['breadcrumbs'][] = $this->title;
  9. ?>
  10. <?php $this->beginBlock('content-header') ?>
  11. <?= $this->title ?>
  12. <?php $this->endBlock() ?>
  13. <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
  14. <div class="box box-success">
  15. <div class="box-body">
  16. <?= GridView::widget([
  17. 'dataProvider' => $dataProvider,
  18. // 'filterModel' => $searchModel,
  19. 'columns' => [
  20. 'id',
  21. 'user_id:user',
  22. 'cat_id:circleCat',
  23. 'content',
  24. 'poiname',
  25. // 'poiaddress',
  26. //'lng',
  27. // 'lat',
  28. // 'province',
  29. // 'city',
  30. // 'remark',
  31. 'created_at:datetime',
  32. // 'updated_at',
  33. // 'status',
  34. [
  35. 'class' => 'backend\widgets\grid\SwitcherColumn',
  36. 'attribute' => 'status'
  37. ],
  38. [
  39. 'class' => 'common\helpers\DiyActionColumn',
  40. 'template' => '{update} {delete}',
  41. ]
  42. ],
  43. ]); ?>
  44. </div>
  45. </div>