diff --git a/views/order/index.php b/views/order/index.php index a77fa46..92b80d5 100755 --- a/views/order/index.php +++ b/views/order/index.php @@ -1,5 +1,6 @@ $searchModel, 'columns' => [ [ 'class' => 'yii\grid\SerialColumn' ], - + 'id', 'user_id', 'name', @@ -43,7 +44,19 @@ 'value' => 'label.lang.title', 'filter' => $labels, ], - 'created_at:datetime', + [ + 'attribute' => 'created_at', + 'value' => function ($model) { + /** + * @var Order $model + */ + if (empty($model->created_at)) { + return \Yii::$app->formatter->asText(''); + } else { + return date('d M, Y H:i:s', $model->created_at); + } + }, + ], [ 'attribute' => 'count', 'value' => function ($model) { @@ -53,7 +66,7 @@ return count($model->orderProducts); }, ], - + [ 'class' => 'yii\grid\ActionColumn', 'template' => '{view} {update} {delete} {print}', 'buttons' => [ -- libgit2 0.21.4