diff --git a/src/grid/AccountColumn.php b/src/grid/AccountColumn.php
index 27123a36..30fb150f 100644
--- a/src/grid/AccountColumn.php
+++ b/src/grid/AccountColumn.php
@@ -9,7 +9,6 @@
use hipanel\grid\DataColumn;
use hipanel\modules\hosting\widgets\combo\AccountCombo;
-use hipanel\widgets\Select2;
use yii\helpers\Url;
use yii\helpers\Html;
diff --git a/src/views/account/_search.php b/src/views/account/_search.php
new file mode 100644
index 00000000..bad3104d
--- /dev/null
+++ b/src/views/account/_search.php
@@ -0,0 +1,36 @@
+
+
+
+
+ = $form->field('login_like') ?>
+
+
+
+ = $form->field('client_id')->widget(ClientCombo::classname()) ?>
+ = $form->field('seller_id')->widget(ClientCombo::classname()) ?>
+
+
+
+ = $form->field('state')->widget(StaticCombo::classname(), [
+ 'data' => $state_data,
+ 'hasId' => true,
+ 'pluginOptions' => [
+ 'select2Options' => [
+ 'multiple' => true,
+ ]
+ ],
+ ]) ?>
+
+
+
+ = Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']) ?>
+
+
+
diff --git a/src/views/account/index.php b/src/views/account/index.php
index 9b237547..7de0295f 100644
--- a/src/views/account/index.php
+++ b/src/views/account/index.php
@@ -7,6 +7,7 @@
use hipanel\modules\hosting\grid\AccountGridView;
use hipanel\widgets\ActionBox;
+use hipanel\widgets\LinkSorter;
use hipanel\widgets\Pjax;
use yii\helpers\Html;
use yii\helpers\Url;
@@ -22,27 +23,35 @@
echo Html::beginForm();
$box = ActionBox::begin(['bulk' => true, 'options' => ['class' => 'box-info']]);
$box->beginActions();
+echo Html::a(Yii::t('app', 'Advanced search'), '#', ['class' => 'btn btn-info search-button']) . ' ';
echo Html::a(Yii::t('app', 'Create {modelClass}', ['modelClass' => 'account']), ['create'], ['class' => 'btn btn-success']) . ' ';
echo Html::a(Yii::t('app', 'Create FTP {modelClass}', ['modelClass' => 'account']), ['create-ftponly'], ['class' => 'btn btn-success']) . ' ';
-echo ' ';
+echo LinkSorter::widget([
+ 'show' => true,
+ 'sort' => $dataProvider->getSort(),
+ 'attributes' => [
+ 'login', 'client', 'server', 'state', 'type'
+ ],
+]);
$box->endActions();
$box->beginBulkActions();
echo Html::submitButton(Yii::t('app', 'Delete'), ['class' => 'btn btn-danger', 'formmethod' => 'POST', 'formaction' => Url::to('delete')]);
$box->endBulkActions();
+echo $this->render('_search', compact('model'));
$box::end();
echo AccountGridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
+ 'checkbox',
'seller_id',
'client_id',
'server',
'account',
'state',
'actions',
- 'checkbox',
],
]);