diff options
| author | uwe.tews@googlemail.com <uwe.tews@googlemail.com> | 2010-12-01 21:19:20 +0000 |
|---|---|---|
| committer | uwe.tews@googlemail.com <uwe.tews@googlemail.com> | 2010-12-01 21:19:20 +0000 |
| commit | 176c3d625cb9fda11b4a4be8f39062c9f8db1dde (patch) | |
| tree | 7f1c94dfd60858470397eae2c85edebdcd18690e /libs/debug.tpl | |
| parent | e80dd7595894d125ceda998d0267841ebbf5ec01 (diff) | |
| download | smarty-176c3d625cb9fda11b4a4be8f39062c9f8db1dde.tar.gz smarty-176c3d625cb9fda11b4a4be8f39062c9f8db1dde.tar.bz2 smarty-176c3d625cb9fda11b4a4be8f39062c9f8db1dde.zip | |
- improvement of {debug} tag output
Diffstat (limited to 'libs/debug.tpl')
| -rw-r--r-- | libs/debug.tpl | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/libs/debug.tpl b/libs/debug.tpl index 2a456ca9..6ec86728 100644 --- a/libs/debug.tpl +++ b/libs/debug.tpl @@ -86,8 +86,9 @@ td { </head> <body> -<h1>Smarty Debug Console - Total Time {$execution_time|string_format:"%.5f"}</h1> +<h1>Smarty Debug Console - {if isset($template_name)}{$template_name|debug_print_var}{else}Total Time {$execution_time|string_format:"%.5f"}{/if}</h1> +{if !empty($template_data)} <h2>included templates & config files (load time in seconds)</h2> <div> @@ -99,6 +100,7 @@ td { <br> {/foreach} </div> +{/if} <h2>assigned template variables</h2> @@ -124,13 +126,14 @@ td { </html> {/capture} <script type="text/javascript"> -{literal} if ( self.name == '' ) { - var title = 'Console'; +{$id = $template_name|default:''|md5} + if ( self.name == '' ) { + var title = 'Console{$id}'; } else { - var title = 'Console_' + self.name; - }{/literal} - _smarty_console = window.open("",title.value,"width=680,height=600,resizable,scrollbars=yes"); + var title = 'Console_{$id}' + self.name; + } + _smarty_console = window.open("","console{$id}","width=680,height=600,resizable,scrollbars=yes"); _smarty_console.document.write("{$debug_output|escape:'javascript'}"); _smarty_console.document.close(); </script> |
