title = Yii::t('app', 'Files'); $this->params['breadcrumbs'][] = $this->title; ?>
render('_search', ['model' => $searchModel]); */?> $dataProvider, 'filterModel' => $searchModel, 'columns' => [ //['class' => 'yii\grid\SerialColumn'], // 'id', // 'path', ['attribute' =>'name', 'header' => Yii::t('app', 'FileName ID'), ], [ // delete from files where user_id not in (select id from user) // in SQL // 'attribute' => 'user_id.username', for debug 'attribute' => 'user_id', 'header' => Yii::t('app','UserName ID'), 'filter' => ArrayHelper::map(User::find()->all(), 'id', 'username'), 'value'=> function(Files $e) { return $e->user->username; } ], [ 'attribute' => 'date', 'header' => Yii::t('app', 'Date'), 'filter' => DateRangePicker::widget([ 'name'=>'date_range_2', 'presetDropdown'=>true, 'hideInput'=>true ]) ], [ 'class' => 'yii\grid\ActionColumn', 'template' => '{view} {delete} {maintenance} ', 'buttons' => [ 'maintenance' => function ($url, $model, $key) { return Html::a('', ['/files/download', 'id' => $model->id], [ 'title' => 'download files', 'data-pjax' => '0', ]); } ] ], //'user_id', // 'auction_id', // 'lot_id', // ['class' => 'yii\grid\ActionColumn'], ], ]); ?>