Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

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