Browse Source

reorganized RequestPanel.

tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
6e851e9547
  1. 28
      framework/yii/debug/panels/RequestPanel.php
  2. 21
      framework/yii/debug/views/default/view.php

28
framework/yii/debug/panels/RequestPanel.php

@ -9,6 +9,7 @@ namespace yii\debug\panels;
use Yii;
use yii\base\InlineAction;
use yii\bootstrap\Tabs;
use yii\debug\Panel;
use yii\helpers\Html;
@ -53,6 +54,33 @@ EOD;
'Action' => $this->data['action'],
'Parameters' => $this->data['actionParams'],
);
return Tabs::widget(array(
'items' => array(
array(
'label' => 'Parameters',
'content' => $this->renderData('Routing', $data)
. $this->renderData('$_GET', $this->data['GET'])
. $this->renderData('$_POST', $this->data['POST'])
. $this->renderData('$_FILES', $this->data['POST'])
. $this->renderData('$_COOKIE', $this->data['COOKIE']),
'active' => true,
),
array(
'label' => 'Headers',
'content' => $this->renderData('Request Headers', $this->data['requestHeaders'])
. $this->renderData('Response Headers', $this->data['responseHeaders']),
),
array(
'label' => 'Session',
'content' => $this->renderData('$_SESSION', $this->data['SESSION'])
. $this->renderData('Flashes', $this->data['flashes']),
),
array(
'label' => '$_SERVER',
'content' => $this->renderData('$_SERVER', $this->data['SERVER']),
),
),
));
return "<h1>Request Information</h1>\n"
. $this->renderData('Routing', $data) . "\n"
. $this->renderData('Flashes', $this->data['flashes']) . "\n"

21
framework/yii/debug/views/default/view.php

@ -1,5 +1,7 @@
<?php
use yii\bootstrap\AffixAsset;
use yii\bootstrap\DropdownAsset;
use yii\helpers\Html;
/**
@ -12,7 +14,8 @@ use yii\helpers\Html;
*/
$this->title = 'Yii Debugger';
yii\bootstrap\DropdownAsset::register($this);
DropdownAsset::register($this);
AffixAsset::register($this);
?>
<div class="default-view">
<div class="navbar">
@ -31,14 +34,14 @@ yii\bootstrap\DropdownAsset::register($this);
<div class="container-fluid">
<div class="row-fluid">
<div class="span2">
<ul class="nav nav-tabs nav-list nav-stacked">
<?php
foreach ($panels as $id => $panel) {
$link = Html::a(Html::encode($panel->getName()), array('view', 'tag' => $tag, 'panel' => $id));
echo Html::tag('li', $link, array('class' => $panel === $activePanel ? 'active' : null));
}
?>
</ul>
<ul class="nav nav-tabs nav-list nav-stacked">
<?php
foreach ($panels as $id => $panel) {
$link = Html::a(Html::encode($panel->getName()), array('view', 'tag' => $tag, 'panel' => $id));
echo Html::tag('li', $link, array('class' => $panel === $activePanel ? 'active' : null));
}
?>
</ul>
</div><!--/span-->
<div class="span10">
<div class="meta alert alert-info">

Loading…
Cancel
Save