REFACTORING: framework cleanup, preparing for php7.4 and loading dependencies from composer
This commit is contained in:
53
application/view/templates/shared/debug.tpl
Normal file
53
application/view/templates/shared/debug.tpl
Normal file
@@ -0,0 +1,53 @@
|
||||
{capture name='_smarty_debug' assign=debug_output}
|
||||
<h1>Smarty {Smarty::SMARTY_VERSION} Debug Console
|
||||
- {if isset($template_name)}{$template_name|debug_print_var nofilter} {/if}{if !empty($template_data)}Total Time {$execution_time|string_format:"%.5f"}{/if}</h1>
|
||||
|
||||
{if !empty($template_data)}
|
||||
<h2>included templates & config files (load time in seconds)</h2>
|
||||
<div>
|
||||
{foreach $template_data as $template}
|
||||
<font color=brown>{$template.name}</font>
|
||||
<br> <span class="exectime">
|
||||
(compile {$template['compile_time']|string_format:"%.5f"}) (render {$template['render_time']|string_format:"%.5f"}) (cache {$template['cache_time']|string_format:"%.5f"})
|
||||
</span>
|
||||
<br>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<h2>assigned template variables</h2>
|
||||
|
||||
<table id="table_assigned_vars">
|
||||
{foreach $assigned_vars as $vars}
|
||||
<tr class="{if $vars@iteration % 2 eq 0}odd{else}even{/if}">
|
||||
<td><h3><font color=blue>${$vars@key}</font></h3>
|
||||
{if isset($vars['nocache'])}<b>Nocache</b></br>{/if}
|
||||
{if isset($vars['scope'])}<b>Origin:</b> {$vars['scope']|debug_print_var nofilter}{/if}
|
||||
</td>
|
||||
<td><h3>Value</h3>{$vars['value']|debug_print_var:10:80 nofilter}</td>
|
||||
<td>{if isset($vars['attributes'])}<h3>Attributes</h3>{$vars['attributes']|debug_print_var nofilter} {/if}</td>
|
||||
{/foreach}
|
||||
</table>
|
||||
|
||||
<h2>assigned config file variables</h2>
|
||||
|
||||
<table id="table_config_vars">
|
||||
{foreach $config_vars as $vars}
|
||||
<tr class="{if $vars@iteration % 2 eq 0}odd{else}even{/if}">
|
||||
<td><h3><font color=blue>#{$vars@key}#</font></h3>
|
||||
{if isset($vars['scope'])}<b>Origin:</b> {$vars['scope']|debug_print_var nofilter}{/if}
|
||||
</td>
|
||||
<td>{$vars['value']|debug_print_var:10:80 nofilter}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
|
||||
</table>
|
||||
{/capture}
|
||||
<script type="text/javascript">
|
||||
{$id = '__Smarty__'}
|
||||
{if $display_mode}{$id = "$offset$template_name"|md5}{/if}
|
||||
document.write('{$debug_output|escape:'javascript' nofilter}');
|
||||
//_smarty_console = window.open("", "console{$id}", "width=1024,height=600,left={$offset},top={$offset},resizable,scrollbars=yes");
|
||||
//_smarty_console.document.write("{$debug_output|escape:'javascript' nofilter}");
|
||||
//_smarty_console.document.close();
|
||||
</script>
|
||||
132
application/view/templates/shared/debugbar.tpl
Normal file
132
application/view/templates/shared/debugbar.tpl
Normal file
@@ -0,0 +1,132 @@
|
||||
{if $debuging==true}
|
||||
<script>
|
||||
$( function() {
|
||||
$( "#tabs" ).tabs();
|
||||
} );
|
||||
</script>
|
||||
<div id="nibiru-bar-open" class="closed">
|
||||
<span class="nibiru-bar-logo"></span>
|
||||
<p>{$ndbinfo}</p>
|
||||
</div>
|
||||
<div id="nibiru-debug" class="down">
|
||||
<div id="tabs">
|
||||
<ul>
|
||||
<li><a href="#tabs-1">$_POST</a></li>
|
||||
<li><a href="#tabs-2">$_GET</a></li>
|
||||
<li><a href="#tabs-3">$_REQUEST</a></li>
|
||||
<li><a href="#tabs-4">$_SERVER</a></li>
|
||||
<li><a href="#tabs-5">$_ENV</a></li>
|
||||
<li><a href="#tabs-6">$_FILES</a></li>
|
||||
<li><a href="#tabs-7">$_COOKIE</a></li>
|
||||
<li><a href="#tabs-8">$_SESSION</a></li>
|
||||
<li><a href="#tabs-9">$GLOBALS</a></li>
|
||||
<li><a href="#tabs-10">SMARTY Engine</a></li>
|
||||
<li><a href="#tabs-11">Messages</a></li>
|
||||
</ul>
|
||||
{assign var="message" value="ERROR: no message defined!"}
|
||||
<div id="tabs-1">
|
||||
<p>
|
||||
<!-- Smarty $_POST output -->
|
||||
{if isset($ndbpost)}
|
||||
{$ndbpost}
|
||||
{else}
|
||||
{$message}
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
<div id="tabs-2">
|
||||
<p>
|
||||
<!-- Smarty $_GET output -->
|
||||
{if isset($ndbget)}
|
||||
{$ndbget}
|
||||
{else}
|
||||
{$message}
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
<div id="tabs-3">
|
||||
<p>
|
||||
<!-- Smarty $_REQUEST output -->
|
||||
{if isset($ndbrequest)}
|
||||
{$ndbrequest}
|
||||
{else}
|
||||
{$message}
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
<div id="tabs-4">
|
||||
<p>
|
||||
<!-- Smarty $_SERVER output -->
|
||||
{if isset($ndbserver)}
|
||||
{$ndbserver}
|
||||
{else}
|
||||
{$message}
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
<div id="tabs-5">
|
||||
<p>
|
||||
<!-- Smarty $_ENV output -->
|
||||
{if isset($ndbenv)}
|
||||
{$ndbenv}
|
||||
{else}
|
||||
{$message}
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
<div id="tabs-6">
|
||||
<p>
|
||||
<!-- Smarty $_FILES output -->
|
||||
{if isset($ndbfiles)}
|
||||
{$ndbfiles}
|
||||
{else}
|
||||
{$message}
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
<div id="tabs-7">
|
||||
<p>
|
||||
<!-- Smarty $_COOKIE output -->
|
||||
{if isset($ndbcookie)}
|
||||
{$ndbcookie}
|
||||
{else}
|
||||
{$message}
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
<div id="tabs-8">
|
||||
<p>
|
||||
<!-- Smarty $_SESSION output -->
|
||||
{if isset($ndbsession)}
|
||||
{$ndbsession}
|
||||
{else}
|
||||
{$message}
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
<div id="tabs-9">
|
||||
<p>
|
||||
<!-- Smarty $GLOBALS output -->
|
||||
{if isset($ndbglobals)}
|
||||
{$ndbglobals}
|
||||
{else}
|
||||
{$message}
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
<div id="tabs-10">
|
||||
{debug}
|
||||
</div>
|
||||
<div id="tabs-11">
|
||||
<p>
|
||||
<!-- Smarty $raw output -->
|
||||
{if isset($ndbraw_output)}
|
||||
{$ndbraw_output}
|
||||
{else}
|
||||
{$message}
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
13
application/view/templates/shared/footer.tpl
Normal file
13
application/view/templates/shared/footer.tpl
Normal file
@@ -0,0 +1,13 @@
|
||||
{foreach item=script from=$js}
|
||||
<script src="{$script}"></script>
|
||||
{/foreach}
|
||||
<script>
|
||||
// execute/clear BS loaders for docs
|
||||
$(function(){
|
||||
while( window.BS&&window.BS.loader&&window.BS.loader.length )
|
||||
{
|
||||
(window.BS.loader.pop())()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
{include file="./debugbar.tpl"}
|
||||
26
application/view/templates/shared/header.tpl
Normal file
26
application/view/templates/shared/header.tpl
Normal file
@@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="">
|
||||
<meta name="keywords" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<title>
|
||||
{$title}
|
||||
</title>
|
||||
{foreach item=style from=$css}
|
||||
<link href="{$style}" rel="stylesheet">
|
||||
{/foreach}
|
||||
<style>
|
||||
/* note: this is a hack for ios iframe for bootstrap themes shopify page */
|
||||
/* this chunk of css is not part of the toolkit :) */
|
||||
body {
|
||||
width: 1px;
|
||||
min-width: 100%;
|
||||
*width: 100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
Reference in New Issue
Block a user