PageRenderTime 18ms CodeModel.GetById 10ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/framework/vendor/smarty3/lib/libs/debug.tpl

http://zoop.googlecode.com/
Smarty Template | 136 lines | 115 code | 21 blank | 0 comment | 3 complexity | 8b3ed674565cd72a1574498746c6b08d MD5 | raw file
  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}
  8body, 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}
 15
 16h1 {
 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
 26h2 {
 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
 35body {
 36    background: black; 
 37}
 38
 39p, table, div {
 40    background: #f0ead8;
 41} 
 42
 43p {
 44    margin: 0;
 45    font-style: italic;
 46    text-align: center;
 47}
 48
 49table {
 50    width: 100%;
 51}
 52
 53th, td {
 54    font-family: monospace;
 55    vertical-align: top;
 56    text-align: left;
 57    width: 50%;
 58}
 59
 60td {
 61    color: green;
 62}
 63
 64.odd {
 65    background-color: #eeeeee;
 66}
 67
 68.even {
 69    background-color: #fafafa;
 70}
 71
 72.exectime {
 73    font-size: 0.8em;
 74    font-style: italic;
 75}
 76
 77#table_assigned_vars th {
 78    color: blue;
 79}
 80
 81#table_config_vars th {
 82    color: maroon;
 83}
 84{/literal}
 85</style>
 86</head>
 87<body>
 88
 89<h1>Smarty Debug Console  -  Total Time {$execution_time|string_format:"%.5f"}</h1>
 90
 91<h2>included templates &amp; config files (load time in seconds)</h2>
 92
 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>
102
103<h2>assigned template variables</h2>
104
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>
112
113<h2>assigned config file variables (outer template scope)</h2>
114
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}
121
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>