Add in chameleon templates for AdminLTE mojo templates
This commit is contained in:
53
Templates/AdminLTE_layout.html.ep.tem
Normal file
53
Templates/AdminLTE_layout.html.ep.tem
Normal file
@@ -0,0 +1,53 @@
|
||||
%#
|
||||
%# Generated by ${version}
|
||||
%#
|
||||
%# AdminLTE specific layout
|
||||
%#
|
||||
% layout 'default', title => "Sme server 2 - ${MenuDescription}", share_dir => './';
|
||||
%# css specific to this panel:
|
||||
% content_for 'module' => begin
|
||||
%= stylesheet '/css/${lcPackageName}.css'
|
||||
%= javascript '/js/${lcPackageName}.js'
|
||||
<div id="module" class="card-body module ${PackageName}-panel">
|
||||
|
||||
% if (config->{debug} == 1) {
|
||||
<pre>
|
||||
%= dumper $c->current_route
|
||||
%= dumper $$${prefix}_data->{trt}
|
||||
</pre>
|
||||
% }
|
||||
|
||||
<h1><%=$title%></h1>
|
||||
|
||||
% if ( stash('modul')) {
|
||||
%= $c->render_to_string(inline => stash('modul') );
|
||||
% }
|
||||
|
||||
%if ($c->stash('first')) {
|
||||
<br><div>
|
||||
%=$c->render_to_string(inline =>$c->l($c->stash('first')))
|
||||
</div>
|
||||
|
||||
%} elsif ($c->stash('success')) {
|
||||
<div class='text-success'>
|
||||
%= $c->l($c->stash('success'));
|
||||
</div>
|
||||
|
||||
%} elsif ($c->stash('error')) {
|
||||
<div class='text-danger'>
|
||||
%= $c->l($c->stash('error'));
|
||||
</div>
|
||||
%}
|
||||
|
||||
%#Routing to partials according to trt parameter.
|
||||
%#This ought to be cascading if/then/elsif, but is easier to just stack the if/then's rather like a case statement'
|
||||
<tal:block tal:repeat="condition conditions">
|
||||
<br>
|
||||
% if ($$${prefix}_data->{trt} eq "${condition}") {
|
||||
%= include 'partials/_${prefix}_${condition}'
|
||||
%}
|
||||
</tal:block>
|
||||
<br>
|
||||
|
||||
</div>
|
||||
%end
|
Reference in New Issue
Block a user