| 12345 |
anikendra |
1 |
<?php
|
|
|
2 |
/**
|
|
|
3 |
* Log Panel Element
|
|
|
4 |
*
|
|
|
5 |
* PHP 5
|
|
|
6 |
*
|
|
|
7 |
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
|
|
8 |
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
|
|
9 |
*
|
|
|
10 |
* Licensed under The MIT License
|
|
|
11 |
* Redistributions of files must retain the above copyright notice.
|
|
|
12 |
*
|
|
|
13 |
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
|
|
14 |
* @link http://cakephp.org CakePHP(tm) Project
|
|
|
15 |
* @since DebugKit 0.1
|
|
|
16 |
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
|
|
17 |
*/
|
|
|
18 |
?>
|
|
|
19 |
<h2><?php echo __d('debug_kit', 'Logs') ?></h2>
|
|
|
20 |
<div class="code-table">
|
|
|
21 |
<?php if ($content instanceof DebugKitLog): ?>
|
|
|
22 |
<?php foreach ($content->logs as $logName => $logs): ?>
|
|
|
23 |
<h3><?php echo $logName ?></h3>
|
|
|
24 |
<?php
|
|
|
25 |
$len = count($logs);
|
|
|
26 |
if ($len > 0):
|
|
|
27 |
$headers = array(__d('debug_kit', 'Time'), __d('debug_kit', 'Message'));
|
|
|
28 |
$rows = array();
|
|
|
29 |
for ($i = 0; $i < $len; $i++):
|
|
|
30 |
$rows[] = array(
|
|
|
31 |
$logs[$i][0], h($logs[$i][1])
|
|
|
32 |
);
|
|
|
33 |
endfor;
|
|
|
34 |
echo $this->Toolbar->table($rows, $headers, array('title' => $logName));
|
|
|
35 |
endif; ?>
|
|
|
36 |
<?php endforeach; ?>
|
|
|
37 |
<?php if (empty($content->logs)): ?>
|
|
|
38 |
<p class="info"><?php echo __d('debug_kit', 'There were no log entries made this request'); ?></p>
|
|
|
39 |
<?php endif; ?>
|
|
|
40 |
<?php endif; ?>
|
|
|
41 |
</div>
|