Skip to content

Commit

Permalink
redone subtitle to original Yii style
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Aug 24, 2016
1 parent b89b1d3 commit 23b1700
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 47 deletions.
32 changes: 14 additions & 18 deletions src/views/domain/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(<<<CSS
Expand All @@ -20,29 +19,26 @@
}
CSS
);
?>

?>

<?php Pjax::begin(array_merge(Yii::$app->params['pjax'], ['enablePushState' => true])) ?>
<?php $page = IndexPage::begin(compact('model', 'dataProvider')) ?>

<?= $page->setSearchFormData() ?>

<?php $page->beginContent('main-actions') ?>
<?php $page->endContent() ?>

<?php $page->beginContent('show-actions') ?>
<?= IndexLayoutSwitcher::widget() ?>
<?= $page->renderSorter([
'attributes' => [
'domain', 'note',
'client', 'seller',
'state', 'whois_protected', 'is_secured',
'created_date', 'expires',
'autorenewal', 'id',
],
]) ?>
<?= $page->renderPerPage() ?>
<?= $page->renderLayoutSwitcher() ?>
<?= $page->renderSorter([
'attributes' => [
'domain', 'note',
'client', 'seller',
'state', 'whois_protected', 'is_secured',
'created_date', 'expires',
'autorenewal', 'id',
],
]) ?>
<?= $page->renderPerPage() ?>
<?php $page->endContent() ?>

<?php $page->beginContent('bulk-actions') ?>
Expand Down
2 changes: 1 addition & 1 deletion src/views/domain/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
49 changes: 22 additions & 27 deletions src/views/host/index.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
<?php

use hipanel\modules\domain\grid\HostGridView;
use hipanel\widgets\ActionBox;
use hipanel\widgets\IndexLayoutSwitcher;
use hipanel\widgets\IndexPage;
use hipanel\widgets\Pjax;
use yii\helpers\Html;

$this->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;

?>

Expand All @@ -20,17 +18,14 @@
<?php $page->endContent() ?>

<?php $page->beginContent('show-actions') ?>
<?= IndexLayoutSwitcher::widget() ?>
<?= $page->renderSorter([
'attributes' => [
'host',
'domain',
'ip',
'client',
'seller',
],
]) ?>
<?= $page->renderPerPage() ?>
<?= $page->renderLayoutSwitcher() ?>
<?= $page->renderSorter([
'attributes' => [
'host', 'domain', 'ip',
'client', 'seller',
],
]) ?>
<?= $page->renderPerPage() ?>
<?php $page->endContent() ?>

<?php $page->beginContent('bulk-actions') ?>
Expand All @@ -39,18 +34,18 @@
<?php $page->endContent('bulk-actions') ?>

<?php $page->beginContent('table') ?>
<?php $page->beginBulkForm() ?>
<?= HostGridView::widget([
'boxed' => false,
'dataProvider' => $dataProvider,
'filterModel' => $model,
'columns' => [
'checkbox',
'host', 'ips', 'domain',
'client_id', 'seller_id',
],
]) ?>
<?php $page->endBulkForm() ?>
<?php $page->beginBulkForm() ?>
<?= HostGridView::widget([
'boxed' => false,
'dataProvider' => $dataProvider,
'filterModel' => $model,
'columns' => [
'checkbox',
'host', 'ips', 'domain',
'client_id', 'seller_id',
],
]) ?>
<?php $page->endBulkForm() ?>
<?php $page->endContent() ?>
<?php $page->end() ?>
<?php Pjax::end() ?>
2 changes: 1 addition & 1 deletion src/views/host/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 23b1700

Please sign in to comment.