diff --git a/models/OrderSearch.php b/models/OrderSearch.php index 6608293..67a31cf 100755 --- a/models/OrderSearch.php +++ b/models/OrderSearch.php @@ -77,6 +77,9 @@ [ 'query' => $query, 'sort' => [ 'defaultOrder' => [ 'id' => SORT_DESC ] ], + 'pagination' => [ + 'pageSize' => 50, + ], ] ); diff --git a/views/order/index.php b/views/order/index.php index 85bf342..112a78d 100755 --- a/views/order/index.php +++ b/views/order/index.php @@ -262,7 +262,6 @@ JS; } }, ], - [ 'attribute' => 'body', 'content' => function($model) { @@ -273,7 +272,20 @@ JS; } }, ], - 'sms', + [ + '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();', + ]); + } else { + return ''; + } + }, + ], [ 'class' => 'yii\grid\ActionColumn', 'template' => \Yii::$app->user->identity->isAdmin( diff --git a/views/order/update.php b/views/order/update.php index 80cf321..58c88aa 100755 --- a/views/order/update.php +++ b/views/order/update.php @@ -36,7 +36,7 @@ $.ajax({ }); } });'; - + $this->registerJs($js, View::POS_READY); $js = ' @@ -55,10 +55,15 @@ $.ajax({ '; $this->registerJs($js, View::POS_READY); - + ?>