Exemple #1
0
            <p class="text-center"><iframe width="100%" height="315" src="https://www.youtube.com/embed/-Z9PhUI5oUE" frameborder="0" allowfullscreen></iframe></p>

            <p class="text-center">Медитация Крыльев Ангела</p>
            <p class="text-center"><iframe allowfullscreen=""  frameborder="0" height="315" src="https://www.youtube.com/embed/P8ZDQ3fPVOA" width="100%"></iframe></p>

            <p class="text-center">Принцип работы тренажера Birdly®</p>
            <p class="text-center"><img src="/images/controller/site/media/11990631_10208204145722207_6888214533972897372_n.jpg" class="img-center" style="border-radius: 10px; width:100%;"></p>


            <p class="text-center">Изображения</p>
            <?php 
\app\assets\SlideShow\Asset::register($this);
?>
            <div class="row">
            <?php 
foreach (\app\models\Picture::query()->all() as $foto) {
    ?>
                <div class="col-sm-2">
                    <a href="<?php 
    echo \cs\Widget\FileUpload2\FileUpload::getOriginal($foto['image']);
    ?>
" rel="lightbox[example]" class="highslide" onclick="return hs.expand(this)">
                        <img src="<?php 
    echo $foto['image'];
    ?>
"  alt="<?php 
    echo $foto['name'];
    ?>
" width="100%" style="margin-bottom: 20px;">
                    </a>
                </div>
Exemple #2
0
    \$('.rowTable').click(function() {
        window.location = '/admin/pictures/' + \$(this).data('id');
    });


JS
);
?>

<div class="container">
    <h1 class="page-header">Картинки</h1>


    <?php 
echo \yii\grid\GridView::widget(['dataProvider' => new \yii\data\ActiveDataProvider(['query' => \app\models\Picture::query(), 'pagination' => ['pageSize' => 20]]), 'tableOptions' => ['class' => 'table table-hover table-striped'], 'rowOptions' => function ($item) {
    return ['role' => 'button', 'data-id' => $item['id'], 'class' => 'rowTable'];
}, 'columns' => ['id', ['header' => 'Картинка', 'content' => function ($item) {
    if (\yii\helpers\ArrayHelper::getValue($item, 'image', '') == '') {
        return '';
    }
    return Html::img($item['image'], ['width' => 50, 'class' => 'thumbnail', 'style' => 'margin-bottom: 0px;']);
}], 'name', ['header' => 'Удалить', 'content' => function ($item) {
    return Html::button('Удалить', ['class' => 'btn btn-danger btn-xs buttonDelete', 'data-id' => $item['id']]);
}]]]);
?>


    <div class="col-lg-6">
        <div class="row">
            <!-- Split button -->