1 {capture assign=debug_output}
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4 <head>
5 <title>Smarty Debug Console</title>
6 <style type="text/css">
7 {literal}
8 body, h1, h2, td, th, p {
9 font-family: sans-serif;
10 font-weight: normal;
11 font-size: 0.9em;
12 margin: 1px;
13 padding: 0;
14 }
16 h1 {
17 margin: 0;
18 text-align: left;
19 padding: 2px;
20 background-color: #f0c040;
21 color: black;
22 font-weight: bold;
23 font-size: 1.2em;
24 }
26 h2 {
27 background-color: #9B410E;
28 color: white;
29 text-align: left;
30 font-weight: bold;
31 padding: 2px;
32 border-top: 1px solid black;
33 }
35 body {
36 background: black;
37 }
39 p, table, div {
40 background: #f0ead8;
41 }
43 p {
44 margin: 0;
45 font-style: italic;
46 text-align: center;
47 }
49 table {
50 width: 100%;
51 }
53 th, td {
54 font-family: monospace;
55 vertical-align: top;
56 text-align: left;
57 width: 50%;
58 }
60 td {
61 color: green;
62 }
64 .odd {
65 background-color: #eeeeee;
66 }
68 .even {
69 background-color: #fafafa;
70 }
72 .exectime {
73 font-size: 0.8em;
74 font-style: italic;
75 }
77 #table_assigned_vars th {
78 color: blue;
79 }
81 #table_config_vars th {
82 color: maroon;
83 }
84 {/literal}
85 </style>
86 </head>
87 <body>
89 <h1>Smarty Debug Console - Total Time {$execution_time|string_format:"%.5f"}</h1>
91 <h2>included templates & config files (load time in seconds)</h2>
93 <div>
94 {foreach $template_data as $template}
95 <font color=brown>{$template.name}</font>
96 <span class="exectime">
97 (compile {$template['compile_time']|string_format:"%.5f"}) (render {$template['render_time']|string_format:"%.5f"}) (cache {$template['cache_time']|string_format:"%.5f"})
98 </span>
99 <br>
100 {/foreach}
101 </div>
103 <h2>assigned template variables</h2>
105 <table id="table_assigned_vars">
106 {foreach $assigned_vars as $vars}
107 <tr class="{if $vars@iteration % 2 eq 0}odd{else}even{/if}">
108 <th>${$vars@key|escape:'html'}</th>
109 <td>{$vars|debug_print_var}</td></tr>
110 {/foreach}
111 </table>
113 <h2>assigned config file variables (outer template scope)</h2>
115 <table id="table_config_vars">
116 {foreach $config_vars as $vars}
117 <tr class="{if $vars@iteration % 2 eq 0}odd{else}even{/if}">
118 <th>{$vars@key|escape:'html'}</th>
119 <td>{$vars|debug_print_var}</td></tr>
120 {/foreach}
122 </table>
123 </body>
124 </html>
125 {/capture}
126 <script type="text/javascript">
127 {literal} if ( self.name == '' ) {
128 var title = 'Console';
129 }
130 else {
131 var title = 'Console_' + self.name;
132 }{/literal}
133 _smarty_console = window.open("",title.value,"width=680,height=600,resizable,scrollbars=yes");
134 _smarty_console.document.write("{$debug_output|escape:'javascript'}");
135 _smarty_console.document.close();
136 </script>