PHP Classes

File: views/backend/page/_list-gallery.php

Recommend this page to a friend!
  Classes of Gabriel Alejandro López López   Yii2 Website Module   views/backend/page/_list-gallery.php   Download  
File: views/backend/page/_list-gallery.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Yii2 Website Module
Add a content page management system to a site
Author: By
Last change:
Date: 1 month ago
Size: 1,277 bytes
 

Contents

Class file image Download
<?php

use yii\helpers\Html;
use
yii\widgets\ListView;

/** @var $parent \backend\models\Page */
/** @var $language string */
/** @var $dataProvider \yii\data\ArrayDataProvider */

$module = $this->context->module->id;
?>

<header class="mb-4">

    <?php
   
\yii\bootstrap4\Modal::begin([
       
'id' => 'page-gallery-modal',
       
'size' => \yii\bootstrap4\Modal::SIZE_LARGE,
       
'title' => Yii::t('website','Select an image'),
       
'toggleButton' => [
           
'label' => Yii::t('website','Add'),
           
'class' => 'btn btn-success float-right',
        ],
       
'options' => [
           
'data' => [
               
'url' => \yii\helpers\Url::toRoute(['page/add-image-to-gallery',
                   
'gallery_id' => $parent->id,
                   
'image_id' => 'image_id_param',
                ]),
            ]
        ]
    ])
   
?>

    <?= Yii::$app->runAction("/$module/media/images-gallery") ?>

    <?php \yii\bootstrap4\Modal::end() ?>

    <h3 class="font-weight-normal"><?= Yii::t('website','Images in gallery') ?></h3>
</header>



<?= ListView::widget([
   
'dataProvider' => $dataProvider,
   
'layout' => '<div class="row">{items}</div>',
   
'itemOptions' => ['class' => 'col-md-4 mb-4'],
   
'itemView' => '_view-gallery',
])
?>