index.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. use yii\helpers\Html;
  3. use yii\grid\GridView;
  4. use yii\widgets\Pjax;
  5. /* @var $this yii\web\View */
  6. /* @var $dataProvider yii\data\ActiveDataProvider */
  7. $this->title = $module->name;
  8. $this->params['breadcrumbs'][] = $this->title;
  9. ?>
  10. <div class="page-header">
  11. <h1>
  12. <?= Html::encode($this->title) ?> <small class="text-muted pull-right">[v.<?= $module->version ?>]</small>
  13. </h1>
  14. <?php if ($feed_url = $module->getFeedURL()) : ?>
  15. <p><?= Yii::t('app/modules/rss', 'Turbo-pages feed of the current site is available at: {url}',
  16. ['url' => Html::a($feed_url, $feed_url, ['target' => '_blank', 'data-pjax' => 0])]
  17. ) ?></p>
  18. <?php endif; ?>
  19. </div>
  20. <div class="turbo-index">
  21. <?php Pjax::begin(); ?>
  22. <?= GridView::widget([
  23. 'dataProvider' => $dataProvider,
  24. 'filterModel' => null,
  25. 'layout' => '{summary}<br\/>{items}<br\/>{summary}<br\/><div class="text-center">{pager}</div>',
  26. 'columns' => [
  27. ['class' => 'yii\grid\SerialColumn'],
  28. 'url',
  29. 'name',
  30. 'title',
  31. 'image',
  32. 'description',
  33. /*'content',*/
  34. 'updated_at',
  35. 'status'
  36. ],
  37. 'pager' => [
  38. 'options' => [
  39. 'class' => 'pagination',
  40. ],
  41. 'maxButtonCount' => 5,
  42. 'activePageCssClass' => 'active',
  43. 'prevPageCssClass' => '',
  44. 'nextPageCssClass' => '',
  45. 'firstPageCssClass' => 'previous',
  46. 'lastPageCssClass' => 'next',
  47. 'firstPageLabel' => Yii::t('app/modules/rss', 'First page'),
  48. 'lastPageLabel' => Yii::t('app/modules/rss', 'Last page'),
  49. 'prevPageLabel' => Yii::t('app/modules/rss', '&larr; Prev page'),
  50. 'nextPageLabel' => Yii::t('app/modules/rss', 'Next page &rarr;')
  51. ],
  52. ]); ?>
  53. <hr/>
  54. <div class="btn-group">
  55. <?= Html::a(Yii::t('app/modules/rss', 'Clear cache'), ['list/clear'], ['class' => 'btn btn-info']) ?>
  56. </div>
  57. <?php Pjax::end(); ?>
  58. </div>
  59. <?php echo $this->render('../_debug'); ?>