From 23b1700fae47c6470794a494d5b09ebf2191f631 Mon Sep 17 00:00:00 2001 From: Andrii Vasyliev Date: Wed, 24 Aug 2016 08:03:45 +0000 Subject: [PATCH] redone subtitle to original Yii style --- src/views/domain/index.php | 32 +++++++++++-------------- src/views/domain/view.php | 2 +- src/views/host/index.php | 49 +++++++++++++++++--------------------- src/views/host/view.php | 2 +- 4 files changed, 38 insertions(+), 47 deletions(-) diff --git a/src/views/domain/index.php b/src/views/domain/index.php index 073695a7..aebd9b2f 100644 --- a/src/views/domain/index.php +++ b/src/views/domain/index.php @@ -3,15 +3,14 @@ use hipanel\modules\domain\grid\DomainGridView; use hipanel\widgets\ActionBox; use hipanel\widgets\AjaxModal; -use hipanel\widgets\IndexLayoutSwitcher; use hipanel\widgets\IndexPage; use hipanel\widgets\Pjax; use yii\bootstrap\Dropdown; use yii\bootstrap\Modal; use yii\helpers\Html; -$this->title = Yii::t('hipanel', 'Domains'); -$this->subtitle = array_filter(Yii::$app->request->get($model->formName(), [])) ? Yii::t('hipanel', 'filtered list') : Yii::t('hipanel', 'full list'); +$this->title = Yii::t('hipanel', 'Domains'); +$this->params['subtitle'] = array_filter(Yii::$app->request->get($model->formName(), [])) ? Yii::t('hipanel', 'filtered list') : Yii::t('hipanel', 'full list'); $this->params['breadcrumbs'][] = $this->title; $this->registerCss(<< +?> params['pjax'], ['enablePushState' => true])) ?> setSearchFormData() ?> - beginContent('main-actions') ?> - endContent() ?> - beginContent('show-actions') ?> - - renderSorter([ - 'attributes' => [ - 'domain', 'note', - 'client', 'seller', - 'state', 'whois_protected', 'is_secured', - 'created_date', 'expires', - 'autorenewal', 'id', - ], - ]) ?> - renderPerPage() ?> + renderLayoutSwitcher() ?> + renderSorter([ + 'attributes' => [ + 'domain', 'note', + 'client', 'seller', + 'state', 'whois_protected', 'is_secured', + 'created_date', 'expires', + 'autorenewal', 'id', + ], + ]) ?> + renderPerPage() ?> endContent() ?> beginContent('bulk-actions') ?> diff --git a/src/views/domain/view.php b/src/views/domain/view.php index 6b70c124..db2daae2 100644 --- a/src/views/domain/view.php +++ b/src/views/domain/view.php @@ -17,7 +17,7 @@ $model->nameservers = str_replace(',', ', ', $model->nameservers); $this->title = Html::encode($model->domain); -$this->subtitle = Yii::t('hipanel/domain', 'Domain detailed information') . ' #' . $model->id; +$this->params['subtitle'] = Yii::t('hipanel/domain', 'Domain detailed information') . ' #' . $model->id; $this->params['breadcrumbs'][] = ['label' => Yii::t('hipanel', 'Domains'), 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; diff --git a/src/views/host/index.php b/src/views/host/index.php index 7139c28a..5534046d 100644 --- a/src/views/host/index.php +++ b/src/views/host/index.php @@ -1,15 +1,13 @@ title = Yii::t('hipanel/domain', 'Name Servers'); -$this->subtitle = array_filter(Yii::$app->request->get($model->formName(), [])) ? Yii::t('hipanel', 'filtered list') : Yii::t('hipanel', 'full list'); -$this->breadcrumbs[] = $this->title; +$this->params['subtitle'] = array_filter(Yii::$app->request->get($model->formName(), [])) ? Yii::t('hipanel', 'filtered list') : Yii::t('hipanel', 'full list'); +$this->params['breadcrumbs'][] = $this->title; ?> @@ -20,17 +18,14 @@ endContent() ?> beginContent('show-actions') ?> - - renderSorter([ - 'attributes' => [ - 'host', - 'domain', - 'ip', - 'client', - 'seller', - ], - ]) ?> - renderPerPage() ?> + renderLayoutSwitcher() ?> + renderSorter([ + 'attributes' => [ + 'host', 'domain', 'ip', + 'client', 'seller', + ], + ]) ?> + renderPerPage() ?> endContent() ?> beginContent('bulk-actions') ?> @@ -39,18 +34,18 @@ endContent('bulk-actions') ?> beginContent('table') ?> - beginBulkForm() ?> - false, - 'dataProvider' => $dataProvider, - 'filterModel' => $model, - 'columns' => [ - 'checkbox', - 'host', 'ips', 'domain', - 'client_id', 'seller_id', - ], - ]) ?> - endBulkForm() ?> + beginBulkForm() ?> + false, + 'dataProvider' => $dataProvider, + 'filterModel' => $model, + 'columns' => [ + 'checkbox', + 'host', 'ips', 'domain', + 'client_id', 'seller_id', + ], + ]) ?> + endBulkForm() ?> endContent() ?> end() ?> diff --git a/src/views/host/view.php b/src/views/host/view.php index cb109a00..371cd87e 100644 --- a/src/views/host/view.php +++ b/src/views/host/view.php @@ -7,7 +7,7 @@ use yii\helpers\Html; $this->title = Html::encode($model->host); -$this->subtitle = Yii::t('hipanel/domain', 'Name server detailed information') . ' #' . $model->id; +$this->params['subtitle'] = Yii::t('hipanel/domain', 'Name server detailed information') . ' #' . $model->id; $this->params['breadcrumbs'][] = ['label' => Yii::t('hipanel/domain', 'Name Servers'), 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title;