= Html::encode($this->title) ?>
= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'name',
[
'attribute' => 'lot_id',
'header' => Yii::t('app','Lots ID'),
'value' => function($model)
{
$sql = Yii::$app->db->createCommand("SELECT id, name from lots WHERE aukname=:name");
$sql->bindValues([':name' => $model->name]);
$result = $sql->queryAll();
$arr = array();
foreach ($result as $key=>$value)
{
$arr[] = $value['name'].", ";
}
return implode(",",$arr);
}
],
//'date_start',
//'date_stop',
[
'class' => 'yii\grid\ActionColumn',
'template' => '{view}',
'buttons' => [
'view' => function ($url,$model,$key) {
return Html::a('', '/auctions/index?AuctionsSearch[name]='.$model->name,['class' => 'glyphicon glyphicon-eye-open']);
},
],
],
],
]);
?>