title = Yii::t('common', 'Stores');
$this->params['breadcrumbs'][] = $this->title;
?>
beginBlock('content-header') ?>
= $this->title . ' ' . Html::a(Yii::t('common', 'Create Store'), ['create'], ['class' => 'btn btn-success']) ?>
endBlock() ?>
render('_search', ['model' => $searchModel]); ?>
= GridView::widget([
'dataProvider' => $dataProvider,
//'filterModel' => $searchModel,
'columns' => [
'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' => function ($model) {
return Store::getStatusList($model->status);
},
],
['class' => 'common\helpers\DiyActionColumn'],
],
]); ?>