You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
853 B
23 lines
853 B
<?php |
|
use yii\helpers\Html; |
|
use yii\web\Response; |
|
|
|
$statusCode = $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="<?php echo $panel->getUrl(); ?>" title="Status code: <?php echo $statusCode; ?> <?php echo $statusText; ?>">Status <span class="label <?php echo $class; ?>"><?php echo $statusCode; ?></span></a> |
|
</div> |
|
<div class="yii-debug-toolbar-block"> |
|
<a href="<?php echo $panel->getUrl(); ?>">Action <span class="label"><?php echo $data['action']; ?></span></a> |
|
</div>
|