<div> <div class="row"> <div class="col-sm-6"> <?php $images = null; if ($model->images != null) { $images = json_decode($model->images); /* foreach ($images as $i) { echo '<div class="col-md-4"><div class="thumbnail">'; echo Html::a(Html::img(str_replace("/upload/","/upload/.thumbs/",$i),["style"=>""]),$i,["class"=>"colorbox"]); echo '</div></div>'; } */ echo ElevateZoom::widget(['images' => $images, 'baseUrl' => $module->uploadURL, 'smallPrefix' => '/.thumbs', 'mediumPrefix' => '', 'options' => ['zoomType' => "lens", 'containLensZoom' => false, 'borderSize' => 0, 'scrollZoom' => true, 'gallery' => 'galez', 'cursor' => 'crosshair']]); } ?> <br> </div> <?php echo Html::encode($model->description); ?> <div id="item-shopcart-<?php echo $model->id; ?> " class="well col-sm-6 pull-right" style="margin-top:20px"> <?php
$this->params['breadcrumbs'][] = ['label' => 'Товары', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; ?> <div class="products-view"> <h1><?php echo Html::encode($this->title); ?> </h1> <p> <?php echo Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']); ?> <?php echo Html::a('Delete', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => 'Are you sure you want to delete this item?', 'method' => 'post']]); ?> </p> <?php echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'title', 'description:ntext', 'base_price']]); ?> <?php echo \amilna\elevatezoom\ElevateZoom::widget(['images' => \yii\helpers\ArrayHelper::map($model->images, 'id', function ($image) { return ['image' => $image->getImagePath('image'), 'small' => $image->getImagePath('small'), 'medium' => $image->getImagePath('medium')]; })]); ?> </div>