<?php
/**
* ?????? ????????? ?????? ??????????? ????????
* @var \yii\web\View $this
* @var \yii\data\ActiveDataProvider $dataProvider
**/
$images = $dataProvider->getModels();
$icnt = $dataProvider->getCount();
$pages = $dataProvider->getPagination();
$pages->route = '/route/to/imagelist/action';
?>
<p class="text-info">
<b>???????? ?? ??????? ???????????
??? ?????? ????? ???????!</b>
</p>
<div id="redactor_imagepjax">
<?php if ($icnt == 0): ?>
??? ?? ?????? ???????????? ???????????
<?php else: ?>
<table class="table table-bordered table-condensed">
<tr>
<?php
$i = 0;
foreach ($images as $img) {
if (($i % 3 == 0) && $i != 0) {
echo '</tr><tr>';
}
echo $this->render('_imageitem', ['img' => $img]);
$i++;
}
?>
</tr>
</table>
<?php echo \yii\widgets\LinkPager::widget(
[
'pagination' => $pages,
'linkOptions' => ['data-pjaxtarget_image' => 1]
]
)?>
<?php endif; ?>
</div>
|