12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- <?php
- use common\models\Store;
- use slavkovrn\lightbox\LightBoxWidget;
- use yii\helpers\Html;
- use yii\widgets\DetailView;
- /* @var $this yii\web\View */
- /* @var $model common\models\Store */
- $this->title = $model->name;
- $this->params['breadcrumbs'][] = ['label' => Yii::t('common', 'Stores'), 'url' => ['index']];
- $this->params['breadcrumbs'][] = $this->title;
- ?>
- <?= $this->render('../site/view_menu', [ 'model' => $model]) ?>
- <div class="box box-success">
- <div class="box-body">
- <?= DetailView::widget([
- 'model' => $model,
- 'attributes' => [
- 'id',
- 'user_id:user',
- 'proxy_user_id:user',
- 'name',
- 'code',
- 'address',
- [
- 'attribute' => 'logo',
- 'format' => 'raw',
- 'value' => function ($model){
- $images = [ // images at popup window of prettyPhoto galary
- 1 => [
- 'src' => $model->logo,
- 'title' => '',
- ],
- ];
- return $model->logo ? LightBoxWidget::widget([
- 'id' =>'cover', // id of plugin should be unique at page
- 'class' =>'galary', // class of plugin to define style
- 'height' =>'100px', // height of image visible in widget
- 'width' =>'100px', // width of image visible in widget
- 'images' => $images,
- ]) : null;
- }
- ],
- [
- 'attribute' => 'license',
- 'format' => 'raw',
- 'value' => function ($model){
- $images = [ // images at popup window of prettyPhoto galary
- 1 => [
- 'src' => $model->license,
- 'title' => '',
- ],
- ];
- return $model->license ? LightBoxWidget::widget([
- 'id' =>'cover', // id of plugin should be unique at page
- 'class' =>'galary', // class of plugin to define style
- 'height' =>'100px', // height of image visible in widget
- 'width' =>'100px', // width of image visible in widget
- 'images' => $images,
- ]) : null;
- }
- ],
- /*[
- 'attribute' => 'photos',
- 'format' => 'raw',
- 'value' => function ($model){
- $images = [];
- foreach ($model->photos as $index=>$photos) {
- $images[$index] = ['src'=>$photos, 'title'=>''];
- }
- return $model->photos ? LightBoxWidget::widget([
- 'id' =>'photos', // id of plugin should be unique at page
- 'class' =>'galary', // class of plugin to define style
- 'height' =>'100px', // height of image visible in widget
- 'width' =>'100px', // width of image visible in widget
- 'images' => $images,
- ]) : null;
- }
- ],*/
- 'contacts',
- 'tel',
- 'desc',
- 'created_at:datetime',
- 'updated_at:datetime',
- [
- 'attribute' => 'status',
- 'value' => Store::getStatusList($model->status),
- ],
- ],
- ]) ?>
- </div>
- </div>
|