Files
yii2/extensions/debug/views/default/panels/request/summary.php
Tobias Munk b3e6aedc45 toolbar UI updates
added home icon
removed separators with summary sections to make browsing with the panel more intuitive
updated version number display, now also shown as label
2014-02-05 02:03:19 +01:00

26 lines
821 B
PHP

<?php
use yii\helpers\Html;
use yii\web\Response;
/**
* @var yii\debug\panels\RequestPanel $panel
*/
$statusCode = $panel->data['statusCode'];
if ($statusCode === null) {
$statusCode = 200;
}
if ($statusCode >= 200 && $statusCode < 300) {
$class = 'label-success';
} elseif ($statusCode >= 100 && $statusCode < 200) {
$class = 'label-info';
} else {
$class = 'label-important';
}
$statusText = Html::encode(isset(Response::$httpStatuses[$statusCode]) ? Response::$httpStatuses[$statusCode] : '');
?>
<div class="yii-debug-toolbar-block">
<a href="<?= $panel->getUrl() ?>" title="Status code: <?= $statusCode ?> <?= $statusText ?>">Status <span class="label <?= $class ?>"><?= $statusCode ?></span></a>
<a href="<?= $panel->getUrl() ?>">Action <span class="label"><?= $panel->data['action'] ?></span></a>
</div>