From dcaccea301e8068debd40d2da5f71da57caee14c Mon Sep 17 00:00:00 2001 From: Andrii Vasyliev Date: Wed, 22 Apr 2015 14:23:53 +0000 Subject: [PATCH] inited --- .gitignore | 27 ++++++++++++++++++ CHANGELOG.md | 7 +++++ LICENSE.md | 32 +++++++++++++++++++++ Module.php | 12 ++++++++ README.md | 7 +++++ composer.json | 49 ++++++++++++++++++++++++++++++++ controllers/ServerController.php | 13 +++++++++ grid/ServerGridView.php | 23 +++++++++++++++ models/Server.php | 35 +++++++++++++++++++++++ models/ServerSearch.php | 12 ++++++++ views/server/index.php | 24 ++++++++++++++++ views/server/view.php | 32 +++++++++++++++++++++ 12 files changed, 273 insertions(+) create mode 100644 .gitignore create mode 100644 CHANGELOG.md create mode 100644 LICENSE.md create mode 100644 Module.php create mode 100644 README.md create mode 100644 composer.json create mode 100644 controllers/ServerController.php create mode 100644 grid/ServerGridView.php create mode 100644 models/Server.php create mode 100644 models/ServerSearch.php create mode 100644 views/server/index.php create mode 100644 views/server/view.php diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..a427d3ae --- /dev/null +++ b/.gitignore @@ -0,0 +1,27 @@ +# yii console command +/yii + +# composer vendor dir +/vendor + +# composer itself and lock file +composer.phar +composer.lock + +# phpunit itself and local config +phpunit.phar +/phpunit.xml + +# IDE project files +.idea +nbproject +.buildpath +.project +.settings + +# windows thumbnail cache +Thumbs.db + +# Mac DS_Store Files +.DS_Store + diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..9e7a90fe --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +hiqdev/hipanel-module-server changelog +-------------------------------------- + +### 0.1.0 under development + +- inited + diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 00000000..dd4096b0 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,32 @@ +The hipanel-module-server extension is free software. +It is released under the terms of the following BSD 3-clause License. + +Copyright © 2014-2015 by HiQDev (http://hiqdev.com) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + * Neither the name of HiQDev nor HiPanel nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/Module.php b/Module.php new file mode 100644 index 00000000..9d1c4e51 --- /dev/null +++ b/Module.php @@ -0,0 +1,12 @@ + [ + 'class' => MainColumn::className(), + 'filterAttribute' => 'server_like', + ], + ]; + } +} diff --git a/models/Server.php b/models/Server.php new file mode 100644 index 00000000..78f16180 --- /dev/null +++ b/models/Server.php @@ -0,0 +1,35 @@ +mergeAttributeLabels([ + 'remoteid' => Yii::t('app', 'Remote ID'), + ]); + } +} diff --git a/models/ServerSearch.php b/models/ServerSearch.php new file mode 100644 index 00000000..69c05f20 --- /dev/null +++ b/models/ServerSearch.php @@ -0,0 +1,12 @@ +title = Yii::t('app', 'Servers'); +$this->params['breadcrumbs'][] = $this->title; +$this->params['subtitle'] = Yii::$app->request->queryParams ? 'filtered list' : 'full list'; + +?> + + $dataProvider, + 'filterModel' => $searchModel, + 'columns' => [ + 'checkbox', + 'seller_id','client_id', + 'server' + ], +]) ?> diff --git a/views/server/view.php b/views/server/view.php new file mode 100644 index 00000000..0aa37266 --- /dev/null +++ b/views/server/view.php @@ -0,0 +1,32 @@ +title = Html::encode($model->domain); +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Domains'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; + +?> + +params['pjax']) ?> +
+ +
+ $model, + 'columns' => [ + 'seller_id','client_id', + ['attribute' => 'server'], + ], + ]) ?> +
+ +
+