Commit e4f0e800 by Tobias Munk

refactored panels to achieve a consistent look

parent 18a3e9aa
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
use yii\helpers\Html; use yii\helpers\Html;
use yii\grid\GridView; use yii\grid\GridView;
use yii\data\ArrayDataProvider; use yii\data\ArrayDataProvider;
use yii\debug\panels\ConfigPanel;
/** /**
* @var \yii\web\View $this * @var \yii\web\View $this
...@@ -14,15 +15,18 @@ use yii\data\ArrayDataProvider; ...@@ -14,15 +15,18 @@ use yii\data\ArrayDataProvider;
$this->title = 'Yii Debugger'; $this->title = 'Yii Debugger';
?> ?>
<div class="default-index"> <div class="default-index">
<div id="yii-debug-toolbar" class="yii-debug-toolbar-top"> <div id="yii-debug-toolbar" class="yii-debug-toolbar-top">
<div class="yii-debug-toolbar-block title"> <div class="yii-debug-toolbar-block title">
<a href="<?= Yii::$app->homeUrl ?>"> <a href="#">
<span class="glyphicon glyphicon-home"></span> <img width="29" height="30" alt="" src="<?= \yii\debug\Module::getYiiLogo() ?>">
</a>
</div>
<div class="yii-debug-toolbar-block title">
Yii Debugger Yii Debugger
</a>
</div> </div>
<?php foreach ($panels as $panel): ?>
<?= $panel->getSummary() ?>
<?php endforeach; ?>
</div> </div>
<div class="container"> <div class="container">
......
...@@ -6,15 +6,11 @@ use yii\helpers\Html; ...@@ -6,15 +6,11 @@ use yii\helpers\Html;
* @var yii\debug\panels\ConfigPanel $panel * @var yii\debug\panels\ConfigPanel $panel
*/ */
?> ?>
<div class="yii-debug-toolbar-block title">
<?= Html::a('Yii Debugger', ['index'], ['title' => 'Back to main debug page']) ?>
</div>
<div class="yii-debug-toolbar-block"> <div class="yii-debug-toolbar-block">
<a href="<?= $panel->getUrl() ?>"> <a href="<?= $panel->getUrl() ?>">
<img width="29" height="30" alt="" src="<?= $panel->getYiiLogo() ?>"> Yii
<span><?= $panel->data['application']['yii'] ?></span> <span class="label label-info"><?= $panel->data['application']['yii'] ?></span>
PHP
<span class="label label-info"><?= $panel->data['php']['version'] ?></span>
</a> </a>
</div> </div>
<div class="yii-debug-toolbar-block">
<?= Html::a('PHP ' . $panel->data['php']['version'], ['phpinfo'], ['title' => 'Show phpinfo()', 'target' => 'phpinfo']) ?>
</div>
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
* @var string $tag * @var string $tag
* @var string $position * @var string $position
*/ */
use yii\helpers\Html;
use yii\debug\panels\ConfigPanel; use yii\debug\panels\ConfigPanel;
$minJs = <<<EOD $minJs = <<<EOD
...@@ -27,11 +28,13 @@ $firstPanel = reset($panels); ...@@ -27,11 +28,13 @@ $firstPanel = reset($panels);
$url = $firstPanel->getUrl(); $url = $firstPanel->getUrl();
?> ?>
<div id="yii-debug-toolbar" class="yii-debug-toolbar-<?= $position ?>"> <div id="yii-debug-toolbar" class="yii-debug-toolbar-<?= $position ?>">
<div class="yii-debug-toolbar-block"> <div class="yii-debug-toolbar-block title">
<a href="<?= Yii::$app->homeUrl ?>"> <a href="<?= Html::url(['index']) ?>">
<span class="glyphicon glyphicon-home"></span> <img width="29" height="30" alt="" src="<?= \yii\debug\Module::getYiiLogo() ?>">
Yii Debugger
</a> </a>
</div> </div>
<?php foreach ($panels as $panel): ?> <?php foreach ($panels as $panel): ?>
<?= $panel->getSummary() ?> <?= $panel->getSummary() ?>
<?php endforeach; ?> <?php endforeach; ?>
...@@ -39,7 +42,7 @@ $url = $firstPanel->getUrl(); ...@@ -39,7 +42,7 @@ $url = $firstPanel->getUrl();
</div> </div>
<div id="yii-debug-toolbar-min"> <div id="yii-debug-toolbar-min">
<a href="<?= $url ?>" title="Open Yii Debugger" id="yii-debug-toolbar-logo"> <a href="<?= $url ?>" title="Open Yii Debugger" id="yii-debug-toolbar-logo">
<img width="29" height="30" alt="" src="<?= ConfigPanel::getYiiLogo() ?>"> <img width="29" height="30" alt="" src="<?= \yii\debug\Module::getYiiLogo() ?>">
</a> </a>
<span class="yii-debug-toolbar-toggler" onclick="<?= $maxJs ?>"></span> <span class="yii-debug-toolbar-toggler" onclick="<?= $maxJs ?>"></span>
</div> </div>
...@@ -17,11 +17,14 @@ $this->title = 'Yii Debugger'; ...@@ -17,11 +17,14 @@ $this->title = 'Yii Debugger';
?> ?>
<div class="default-view"> <div class="default-view">
<div id="yii-debug-toolbar" class="yii-debug-toolbar-top"> <div id="yii-debug-toolbar" class="yii-debug-toolbar-top">
<div class="yii-debug-toolbar-block">
<a href="<?= Yii::$app->homeUrl ?>"> <div class="yii-debug-toolbar-block title">
<span class="glyphicon glyphicon-home"></span> <a href="<?= Html::url(['index']) ?>">
<img width="29" height="30" alt="" src="<?= \yii\debug\Module::getYiiLogo() ?>">
Yii Debugger
</a> </a>
</div> </div>
<?php foreach ($panels as $panel): ?> <?php foreach ($panels as $panel): ?>
<?= $panel->getSummary() ?> <?= $panel->getSummary() ?>
<?php endforeach; ?> <?php endforeach; ?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment