1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <?php
- use app\models\news;
- use yii\helpers\Html;
- use yii\helpers\Url;
- use yii\grid\ActionColumn;
- use yii\widgets\ListView;
- use yii\widgets\ActiveForm;
- use yii\web\View;
- use yii\data\SqlDataProvider;
- /** @var yii\web\View $this */
- /** @var app\models\photoSearch $searchModel */
- /** @var yii\data\ActiveDataProvider $dataProvider */
- $page = trim(Yii::$app->request->get('page'));
- $this->title = 'Подписи фото отсутствуют';
- $this->params['breadcrumbs'][] = ['label' => 'Подписи фото', 'url' => ['phototitle']];
- $this->params['breadcrumbs'][] = $this->title;
- if ($this->beginCache('fd7fsdt8f_'.$page, ['duration' => 3600])) {
- $dataProvider = new \yii\data\ActiveDataProvider(
- [
- "query"=>\app\models\front\News::find()->andWhere(['>', 'dt_pub', Yii::$app->params['delPhotoE'] ])->andWhere([ 'or',"`photo_title`=''", ['or', '`photo_title`="\'\'"']])->orderBy(['dt_pub'=>SORT_DESC]),
- 'pagination' => [
- 'pageSize' => 30,
- ],
- ]
- );
- ?>
- <div class="content">
- <table class="table m-0 table-hover table-striped dataTable dtr-inline">
- <thead>
- <tr>
- <th>фото</th>
- <th>дата</th>
- <th>Статья</th>
- <th>Фото подпись</th>
- </tr>
- </thead>
- <?= ListView::widget([
- 'dataProvider' => $dataProvider,
- 'options' => [
- 'tag' => "div",
- 'class' => 'list-wrapper',
- 'id' => 'list-wrapper',
- ],
- "itemOptions"=>[
- "tag"=>"tr",'class' => '',
- ],
- "itemView" => "_itemtitles",
- "layout" => "{items}\n{pager}\n{summary}",
- 'pager' => [
- 'prevPageCssClass' => 'page-item',
- 'firstPageLabel' => 'Начало',
- 'lastPageLabel' => 'Конец',
- 'linkOptions' => [ 'class'=>'page-link'],
- 'pageCssClass' => 'page-item',
- 'disabledListItemSubTagOptions' => ['tag' => 'a', 'class' => 'page-link'],
- ]
- ]) ?>
- </table>
- </div>
- <?
- $this->endCache();
- }
|