From 543508854a0bbb9597de8ddf3b194b22366d75cc Mon Sep 17 00:00:00 2001
From: Alex
@@ -197,7 +197,7 @@ JS;
->textInput(),
'content' => function($model) {
$manager = $model->manager;
- if (empty( $manager )) {
+ if (empty($manager)) {
return $model->id;
} else {
return $model->id . '
' . $manager->username;
@@ -206,7 +206,9 @@ JS;
],
[
'attribute' => 'created_at',
- 'format' => ['date', 'php:d/m/Y G:i'],
+ 'content' => function($model) {
+ return date('d/m/Y', $model->created_at) . '
' . date('G:i', $model->created_at);
+ },
'filter' => $searchForm->field($searchModel, 'date_range')
->widget(
DateRangePicker::className(),
@@ -235,7 +237,16 @@ JS;
},
],
'name',
- 'total',
+ [
+ 'attribute' => 'total',
+ 'content' => function($model) {
+ if (empty($model->total)) {
+ return '';
+ } else {
+ return $model->total;
+ }
+ },
+ ],
[
'attribute' => 'pay',
'content' => function($model) {
@@ -250,12 +261,16 @@ JS;
[
'attribute' => 'adress',
'content' => function($model) {
- if (!empty( $model->adress )) {
- return Html::a(StringHelper::truncate($model->adress, 10, '...'), '#', [
- 'data-toggle' => 'tooltip',
- 'title' => $model->adress,
- 'onclick' => 'event.preventDefault();',
- ]);
+ if (!empty($model->adress)) {
+ return Html::a(
+ StringHelper::truncate($model->adress, 10, '...'),
+ '#',
+ [
+ 'data-toggle' => 'tooltip',
+ 'title' => $model->adress,
+ 'onclick' => 'event.preventDefault();',
+ ]
+ );
} else {
return '';
}
@@ -268,7 +283,7 @@ JS;
/**
* @var Order $modl
*/
- if (empty( $model->orderLabel )) {
+ if (empty($model->orderLabel)) {
return '--';
} else {
return $model->orderLabel->label;
@@ -278,7 +293,7 @@ JS;
[
'attribute' => 'body',
'content' => function($model) {
- if (!empty( $model->body )) {
+ if (!empty($model->body)) {
return StringHelper::truncate($model->body, 12, '...');
} else {
return '';
@@ -288,12 +303,16 @@ JS;
[
'attribute' => 'sms',
'content' => function($model) {
- if (!empty( $model->sms )) {
- return Html::a(StringHelper::truncate($model->sms, 12, '...'), '#', [
- 'data-toggle' => 'tooltip',
- 'title' => $model->sms,
- 'onclick' => 'event.preventDefault();',
- ]);
+ if (!empty($model->sms)) {
+ return Html::a(
+ StringHelper::truncate($model->sms, 12, '...'),
+ '#',
+ [
+ 'data-toggle' => 'tooltip',
+ 'title' => $model->sms,
+ 'onclick' => 'event.preventDefault();',
+ ]
+ );
} else {
return '';
}
--
libgit2 0.21.4