From 6e851e9547b7c701e56d7c131ada21bac362b0d3 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Fri, 26 Jul 2013 08:07:14 -0400 Subject: [PATCH] reorganized RequestPanel. --- framework/yii/debug/panels/RequestPanel.php | 28 ++++++++++++++++++++++++++++ framework/yii/debug/views/default/view.php | 21 ++++++++++++--------- 2 files changed, 40 insertions(+), 9 deletions(-) diff --git a/framework/yii/debug/panels/RequestPanel.php b/framework/yii/debug/panels/RequestPanel.php index f8bec5d..f60e58e 100644 --- a/framework/yii/debug/panels/RequestPanel.php +++ b/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 "

Request Information

\n" . $this->renderData('Routing', $data) . "\n" . $this->renderData('Flashes', $this->data['flashes']) . "\n" diff --git a/framework/yii/debug/views/default/view.php b/framework/yii/debug/views/default/view.php index f43b1ad..6f227e4 100644 --- a/framework/yii/debug/views/default/view.php +++ b/framework/yii/debug/views/default/view.php @@ -1,5 +1,7 @@ title = 'Yii Debugger'; -yii\bootstrap\DropdownAsset::register($this); +DropdownAsset::register($this); +AffixAsset::register($this); ?>