add collections to backend
This commit is contained in:
@@ -15,27 +15,37 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
<?php echo $this->render('_search', ['model' => $searchModel]); ?>
|
||||
|
||||
<p>
|
||||
<?= Html::a(Yii::t('backend/collection', 'Create Collection'), ['create'], ['class' => 'btn btn-success']) ?>
|
||||
</p>
|
||||
|
||||
<?= GridView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'columns' => [
|
||||
['class' => 'yii\grid\SerialColumn'],
|
||||
|
||||
'id_collection',
|
||||
'id_user',
|
||||
'created_by',
|
||||
'id_account',
|
||||
'money',
|
||||
// 'start',
|
||||
// 'end',
|
||||
// 'type',
|
||||
// 'created_at',
|
||||
// 'updated_at',
|
||||
[
|
||||
'attribute' => 'id_user',
|
||||
'value' => 'userName',
|
||||
],
|
||||
[
|
||||
'attribute' => 'id_account',
|
||||
'value' => 'accountName',
|
||||
],
|
||||
'money:integer',
|
||||
[
|
||||
'attribute' => 'start',
|
||||
'value' => function($model){
|
||||
return Yii::$app->formatter->asDatetime($model->start,'yyyy-MM-dd HH:mm:ss');
|
||||
}
|
||||
],
|
||||
[
|
||||
'attribute' => 'end',
|
||||
'value' => function($model){
|
||||
return Yii::$app->formatter->asDatetime($model->end,'yyyy-MM-dd HH:mm:ss');
|
||||
}
|
||||
],
|
||||
'created_at:datetime',
|
||||
|
||||
['class' => 'yii\grid\ActionColumn'],
|
||||
['class' => 'yii\grid\ActionColumn',
|
||||
'template' => '{view}'
|
||||
],
|
||||
],
|
||||
]); ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user