]> git.mxchange.org Git - friendica.git/blob - vendor/smarty/smarty/libs/debug.tpl
Add Smarty to Composer
[friendica.git] / vendor / smarty / smarty / libs / debug.tpl
1 {capture name='_smarty_debug' 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, h3, td, th, p {
9                 font-family: sans-serif;
10                 font-weight: normal;
11                 font-size: 0.9em;
12                 margin: 1px;
13                 padding: 0;
14             }
15
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             }
25
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             }
34             h3 {
35                 text-align: left;
36                 font-weight: bold;
37                 color: black;
38                 font-size: 0.7em;
39                 padding: 2px;
40             }
41
42             body {
43                 background: black;
44             }
45
46             p, table, div {
47                 background: #f0ead8;
48             }
49
50             p {
51                 margin: 0;
52                 font-style: italic;
53                 text-align: center;
54             }
55
56             table {
57                 width: 100%;
58             }
59
60             th, td {
61                 font-family: monospace;
62                 vertical-align: top;
63                 text-align: left;
64             }
65
66             td {
67                 color: green;
68             }
69
70             .odd {
71                 background-color: #eeeeee;
72             }
73
74             .even {
75                 background-color: #fafafa;
76             }
77
78             .exectime {
79                 font-size: 0.8em;
80                 font-style: italic;
81             }
82
83             #bold div {
84                 color: black;
85                 font-weight: bold;
86             }
87             #blue h3 {
88                 color: blue;
89             }
90             #normal div {
91                 color: black;
92                 font-weight: normal;
93             }
94             #table_assigned_vars th {
95                 color: blue;
96                 font-weight: bold;
97             }
98
99             #table_config_vars th {
100                 color: maroon;
101             }
102
103             {/literal}
104         </style>
105     </head>
106     <body>
107
108     <h1>Smarty {Smarty::SMARTY_VERSION} Debug Console
109         -  {if isset($template_name)}{$template_name|debug_print_var nofilter} {/if}{if !empty($template_data)}Total Time {$execution_time|string_format:"%.5f"}{/if}</h1>
110
111     {if !empty($template_data)}
112         <h2>included templates &amp; config files (load time in seconds)</h2>
113         <div>
114             {foreach $template_data as $template}
115                 <font color=brown>{$template.name}</font>
116                 <br>&nbsp;&nbsp;<span class="exectime">
117                 (compile {$template['compile_time']|string_format:"%.5f"}) (render {$template['render_time']|string_format:"%.5f"}) (cache {$template['cache_time']|string_format:"%.5f"})
118                  </span>
119                 <br>
120             {/foreach}
121         </div>
122     {/if}
123
124     <h2>assigned template variables</h2>
125
126     <table id="table_assigned_vars">
127         {foreach $assigned_vars as $vars}
128             <tr class="{if $vars@iteration % 2 eq 0}odd{else}even{/if}">
129                 <td><h3><font color=blue>${$vars@key}</font></h3>
130                     {if isset($vars['nocache'])}<b>Nocache</b></br>{/if}
131                     {if isset($vars['scope'])}<b>Origin:</b> {$vars['scope']|debug_print_var nofilter}{/if}
132                 </td>
133                 <td><h3>Value</h3>{$vars['value']|debug_print_var:10:80 nofilter}</td>
134                 <td>{if isset($vars['attributes'])}<h3>Attributes</h3>{$vars['attributes']|debug_print_var nofilter} {/if}</td>
135          {/foreach}
136     </table>
137
138     <h2>assigned config file variables</h2>
139
140     <table id="table_config_vars">
141         {foreach $config_vars as $vars}
142             <tr class="{if $vars@iteration % 2 eq 0}odd{else}even{/if}">
143                 <td><h3><font color=blue>#{$vars@key}#</font></h3>
144                     {if isset($vars['scope'])}<b>Origin:</b> {$vars['scope']|debug_print_var nofilter}{/if}
145                 </td>
146                 <td>{$vars['value']|debug_print_var:10:80 nofilter}</td>
147             </tr>
148         {/foreach}
149
150     </table>
151     </body>
152     </html>
153 {/capture}
154 <script type="text/javascript">
155     {$id = '__Smarty__'}
156     {if $display_mode}{$id = "$offset$template_name"|md5}{/if}
157     _smarty_console = window.open("", "console{$id}", "width=1024,height=600,left={$offset},top={$offset},resizable,scrollbars=yes");
158     _smarty_console.document.write("{$debug_output|escape:'javascript' nofilter}");
159     _smarty_console.document.close();
160 </script>