| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- /* @var $this yii\web\View */
- use yii\helpers\Html;
- use yii\grid\GridView;
- $this->title = Yii::t('app', 'BiddingBegin ID');
- $this->params['breadcrumbs'][] = $this->title;
- ?>
- <div class="lots-index">
- <div class="panel panel-primary">
- <div class="panel-heading"><span class="glyphicon glyphicon-flag"></span><strong> <?= Html::encode($this->title) ?></strong></div>
- <div class="panel-body">
- <?= 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']);
- },
- ],
- ],
- ],
- ]);
- ?>
- </div></div>
|