示例#1
0
	</div><!-- /.box-header -->
	<div class="box-body" style="display: none;">
		<!-- Conversations are loaded here -->
		<div class="direct-chat-messages">
			<!-- Message. Default to the left -->
			<?php 
/** @author wawan || _message_left
 *if image equal null then default image
 *using fotorama widget display image(base64)
 */
if (count($attach_image) == 0) {
    for ($a = 0; $a < 2; $a++) {
        echo Html::img(Yii::getAlias('@web') . '/upload/barang/df.jpg', ['width' => '130', 'height' => '130', 'align' => 'center', 'class' => 'img-thumbnail']);
    }
} else {
    $fotorama = \metalguardian\fotorama\Fotorama::begin(['options' => ['loop' => true, 'hash' => true, 'ratio' => 800 / 600, 'width' => '50%'], 'spinner' => ['lines' => 20], 'tagName' => 'span', 'useHtmlData' => false, 'htmlOptions' => ['class' => 'custom-class', 'id' => 'custom-id-left' . $id]]);
    ?>
		<?php 
    foreach ($attach_image as $key => $value) {
        echo '<img src=data:image/jpg;base64,' . $value->ATTACH64 . '></img>';
    }
    ?>

    <?php 
    $fotorama->end();
}
?>

			<!-- Message to the right -->
		</div><!--/.direct-chat-messages-->
		<!-- Contacts are loaded here -->
示例#2
0
foreach ($freeObj as $obj) {
    $k = $k++;
    ?>
                        <div class="item-card">
                            <div class="col-sm-8">
                                <?php 
    $imgs = array();
    foreach ($obj->getBehavior('galleryBehavior')->getImages() as $image) {
        $imgUrl = $image->getUrl('medium');
        if ($imgUrl == null) {
            $imgUrl = Yii::getAlias('@web') . '/images/nophoto/nophoto_sea.jpg';
            Yii::info('Нет картинки');
        }
        $imgs[] = ['img' => $imgUrl];
    }
    echo \metalguardian\fotorama\Fotorama::widget(['items' => $imgs, 'options' => ['nav' => 'thumbs']]);
    ?>

                            </div><!-- /.col-sm-8 -->
                            <div class="col-sm-4">
                                <h1>
                                    <a href="<?php 
    echo Url::to(['/tour/view', 'id' => $obj->id, 'datebegin' => '']);
    ?>
">
                                        <?php 
    echo $obj->name;
    ?>
                                    </a>
                                </h1>
                                <h2>Описание</h2>
示例#3
0
/**
 * @link http://www.yiiframework.com/
 * @copyright Copyright (c) 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */
namespace frontend\widgets;

use Yii;
use yii\helpers\Url;
use yii\helpers\Html;
use yii\helpers\ArrayHelper;
$items = [];
foreach ($medias as $image) {
    $items[] = ['img' => Url::to('/images/cards/' . $image->ime)];
}
?>
<div class="media-area <?php 
echo $version == 1 ? null : 'square';
?>
 <?php 
echo $class;
?>
">                
    <div class="image">
		<?php 
echo \metalguardian\fotorama\Fotorama::widget(['items' => $items, 'options' => ['loop' => 'true', 'width' => '100%', 'ratio' => $version == 1 ? '16/9' : '1/1', 'fit' => 'cover', 'autoplay' => 3000, 'nav' => 'false', 'allowfullscreen' => 'native', 'transition' => 'dissolve']]);
?>
    </div>
</div>
<?php 
echo $hr ? '<hr class="no-margin">' : null;
示例#4
0
        //echo Html::img($image->getUrl('medium'));
        break;
    }
}
?>
<div class="ksk-posts-index" <?php 
if (count($img_items) === 0) {
    echo 'style="background-color: transparent;"';
}
?>
>
    <!-- Full Page Image Background Carousel Header -->
    <header id="myCarousel" class="carousel slide">
        <?php 
//$fotorama = \metalguardian\fotorama\Fotorama::begin(
echo \metalguardian\fotorama\Fotorama::widget(['items' => $img_items, 'options' => ['width' => '100%', 'height' => '90%', 'click' => false]]);
//echo $img_items_str;
//$fotorama->end();
?>
    </header>
    <!-- header -->

    <div class="container">
        <?php 
if (count($img_items) === 0) {
    ?>
            <h1>Работы в категории "<?php 
    echo Html::encode($category_name);
    ?>
" отсутствуют</h1>
        <?php 
示例#5
0
function getFotorama($model)
{
    $imgs = array();
    foreach ($model->getBehavior('galleryBehavior')->getImages() as $image) {
        $imgUrl = $image->getUrl('medium');
        if ($imgUrl == null) {
            $imgUrl = Yii::getAlias('@web') . '/images/nophoto/nophoto_sea.jpg';
        }
        $imgs[] = ['img' => $imgUrl];
    }
    return \metalguardian\fotorama\Fotorama::widget(['items' => $imgs, 'options' => ['nav' => 'thumbs']]);
}
示例#6
0
 public function fotorama($options, $full = null)
 {
     if ($this->files) {
         foreach ($this->files as $media) {
             $media_items[] = ['img' => '../images/presentations/' . $full . $media->ime, 'thumb' => '../images/presentations/thumbs/' . $media->ime, 'full' => '../images/presentations/full/' . $media->ime, 'fit' => 'cover'];
         }
         return \metalguardian\fotorama\Fotorama::widget(['options' => $options, 'useHtmlData' => false, 'htmlOptions' => ['style' => 'text-align:center; margin:0 auto;', 'class' => 'full-width-cover'], 'items' => $media_items]);
     }
     return null;
 }
示例#7
0
    <!-- Portfolio Item Row -->
    <div class="row">
        <div class="col-md-8">
            <?php 
//class="thumbnail"
$img_items_str = '';
foreach ($model->getBehavior('galleryBehavior')->getImages() as $image) {
    $img_items_str .= '<div data-img="' . $image->getUrl('medium') . '">&nbsp;</div>';
    //echo Html::img($image->getUrl('medium'), ['class' => 'thumbnail']);
    //break;
}
if ($img_items_str === '') {
    $img_items_str = '<div data-img="http://placehold.it/750x500">&nbsp;</div>';
}
$fotorama = \metalguardian\fotorama\Fotorama::begin(['options' => ['nav' => 'thumbs', 'width' => '750px', 'click' => false], 'spinner' => ['lines' => 20]]);
echo $img_items_str;
$fotorama->end();
?>
        </div>

        <div class="col-md-4">
            <h4>Описание работы</h4>
            <p><?php 
echo $model->content;
?>
</p>
            <!--h3>Project Details</h3>
            <ul>
                <li>Lorem Ipsum</li>
                <li>Dolor Sit Amet</li>
示例#8
0
            if (!ti.__loader){ti.__loader=true;var d=w.document,p=d.location.protocol,s=d.createElement('script');s.type='text/javascript';s.async=true;s.src=(p=='https:'?p:'http:')+'//www.travelline.ru/integration/loader.js';(d.getElementsByTagName('head')[0]||d.getElementsByTagName('body')[0]).appendChild(s);}
        })(window);
    </script>
    <!-- end TL search form 2.0 -->
    <div id="single-rooms-wrapper">
        <h1><?php 
echo $model->category->name . ' (' . $model->category->class->name . ') ' . Html::encode($model->name);
?>
</h1>
        <div class="rooms-row-img">
            <?php 
if ($images) {
    ?>

                <?php 
    $fotorama = Fotorama::begin(['options' => ['nav' => 'thumbs', 'loop' => TRUE, 'hash' => TRUE, 'ratio' => 750 / 500], 'spinner' => ['lines' => 20], 'tagName' => 'span', 'useHtmlData' => FALSE, 'htmlOptions' => ['class' => 'custom-class', 'id' => 'custom-id']]);
    ?>

                <?php 
    foreach ($images as $image) {
        ?>


                    <?php 
        echo Html::img('/' . $image->getPath('750x500'), ['class' => 'img-responsive']);
        ?>
                <?php 
    }
    ?>
                <?php 
    $fotorama->end();
示例#9
0
    ?>
 hidden-content fadeIn animated">
            <?php 
    echo $orderService->note;
    ?>
                
        </div>
        <?php 
    if ($orderService->files) {
        ?>
        <div class="media-area <?php 
        echo $orderServicesCount > 1 ? 'hidden' : '';
        ?>
 hidden-content">
        <?php 
        $fotorama = \metalguardian\fotorama\Fotorama::begin(['options' => ['loop' => true, 'hash' => true, 'allowfullscreen' => true, 'width' => '100%', 'minwidth' => '400', 'maxwidth' => '875', 'minheight' => '300', 'maxheight' => '100%', 'height' => '492', 'ratio' => 875 / 492, 'nav' => false], 'useHtmlData' => false, 'htmlOptions' => ['style' => '', 'class' => 'card-width-cover']]);
        ?>
            <?php 
        foreach ($orderService->files as $media) {
            ?>
                <?php 
            echo Html::img('@web/images/user_objects/' . $media->file->ime);
            ?>
            <?php 
        }
        ?>
            <?php 
        $fotorama->end();
        ?>
        </div>
        <?php 
示例#10
0

        $fotorama = \metalguardian\fotorama\Fotorama::begin(
            [
                'options'     => [
                    'allowfullscreen' => true,
                    'nav'             => 'thumbs',
                    'thumbmargin'     => 10,
                    'thumbfit'        => 'scaledown',
                    'fit'             => 'scaledown',
                    'width'           => '500',
                    'height'          => '350',
                    'class'           => 'img-responsive',
                    // 'margin-top'=>'20',
                    // 'ratio' => 1024/768,

                ],
                'spinner'     => [
                    'lines' => 20,
                ],
                'tagName'     => 'div',
                'useHtmlData' => false,
                'htmlOptions' => [
                    'class' => 'custom-class',
                    'id'    => 'custom-id',
                    'style' => 'margin-top:15px;',

                ],
            ]
        );

        foreach ($model->getImages() as $photo) {
示例#11
0
} else {
    ?>
            <h1 ><?php 
    echo $model->name;
    ?>
</h1>
        <?php 
}
?>
    </div>
    <?php 
if ($model->description) {
    echo Html::tag('div', Html::tag('p', descbeautify($desc = trim($model->description))) . (($t = count($desca = explode("\n", $desc)) > 1 || mb_strlen($desca[0]) > 50) ? Html::a((mb_strlen($desca[0]) > 50 ? mb_substr($desca[0], 0, 30) : $desca[0]) . '…', null) : ''), ['class' => 'desc' . ($t ? '' : ' no-events')]);
}
$like = [];
$fotorama = \metalguardian\fotorama\Fotorama::begin(['options' => ['fit' => 'scaledown', 'nav' => 'thumbs', 'width' => '100%', 'height' => '100%', 'hash' => 1, 'allowfullscreen' => 'native', 'thumbheight' => Yii::$app->params['thumbHeight'], 'clicktransition' => 'crossfade', 'keyboard' => ['space' => 1]]]);
foreach ($gallery->getImages(true) as $image) {
    /* @var \app\models\GalleryImage $image */
    $is = getimagesize($image->getFilePath('thumb'));
    if ($image->liked > 0) {
        $like['i' . $image->id] = $image->liked;
    }
    echo Html::a('<img src="' . $image->getUrl('thumb') . ($is ? '" ' . $is[3] : '"') . '>', $image->getUrl('original'), ['data' => ['caption' => $image->name . ($image->description ? ($image->name ? ' – ' : '') . descbeautify($image->description) : ''), 'id' => 'i' . $image->id]]);
}
$liked = Yii::$app->request->cookies->getValue('liked', []);
foreach ($liked as &$elem) {
    $elem = 'i' . $elem;
    if (isset($like[$elem])) {
        $like[$elem] -= 1;
    }
}
示例#12
0
                <?php 
echo Fotorama::widget($betegeling);
?>
                <div class="portfolio-caption">
                    <h4>Betegeling</h4>
                </div>
            </div>
        </div>
        <div class="row ">
            <div class="col-md-6  project__item">
                <?php 
echo Fotorama::widget($gyproc);
?>
                <div class="portfolio-caption">
                    <h4>Gyproc</h4>
                </div>
            </div>
            <div class="col-md-6  project__item">
                <?php 
echo Fotorama::widget($renovaties);
?>
                <div class="portfolio-caption">
                    <h4>Renovaties</h4>
                </div>
            </div>
        </div>
    </div>
</div>
</section>

示例#13
0
                            <?php 
    echo $obj->name;
    ?>
                        </a>
                    </h2>
                    <?php 
    $imgs = array();
    foreach ($obj->getBehavior('galleryBehavior')->getImages() as $image) {
        $imgUrl = $image->getUrl('medium');
        if ($imgUrl == null) {
            $imgUrl = Yii::getAlias('@web') . '/images/nophoto/nophoto_sea.jpg';
            Yii::info('Нет картинки');
        }
        $imgs[] = ['img' => $imgUrl];
    }
    echo Fotorama::widget(['items' => $imgs, 'options' => ['nav' => 'thumbs']]);
    ?>
                    <h3><?php 
    echo $obj->description;
    ?>
</h3>
                    <h2>Цена</h2>
                    <?php 
    echo $obj->price;
    ?>
                </div><!-- /.item -->
            </div><!-- /.col-sm-4 -->
            <?php 
}
?>
    </div><!-- /.col-sm-12 -->