PHP Classes

File: attachmanager_views_examples/_imagelist.php

Recommend this page to a friend!
  Classes of Insolita   Ext Imperavi   attachmanager_views_examples/_imagelist.php   Download  
File: attachmanager_views_examples/_imagelist.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Ext Imperavi
Integrates the Imperavi editor in YII applications
Author: By
Last change:
Date: 2 years ago
Size: 1,347 bytes
 

Contents

Class file image Download
<?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>