/
panels.phtml
35 lines (27 loc) 路 974 Bytes
/
panels.phtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
* Debug Bar panels template.
*
* This file is part of the Tracy (http://tracy.nette.org)
* Copyright (c) 2004 David Grudl (http://davidgrudl.com)
*
* @param string $type
* @param array $panels
*/
declare(strict_types=1);
namespace Tracy;
use Tracy\Helpers;
$icons = '
<div class="tracy-icons">
<a href="#" data-tracy-action="window" title="open in window">¤</a>
<a href="#" data-tracy-action="close" title="close window">×</a>
</div>
';
echo '<div itemscope>';
foreach ($panels as $panel) {
$content = $panel->panel ? ($panel->panel . "\n" . $icons) : '';
$class = 'tracy-panel ' . ($type === 'ajax' ? '' : 'tracy-panel-persist'); ?>
<div class="<?= $class ?>" id="tracy-debug-panel-<?= $panel->id ?>" data-tracy-content='<?= str_replace(['&', "'"], ['&', '''], $content) ?>'></div><?php
}
echo '<meta itemprop=tracy-snapshot content=', Dumper::formatSnapshotAttribute(Dumper::$liveSnapshot), '>';
echo '</div>';