SM2Gen/Templates/layout.html.ep.tem

53 lines
1.3 KiB
Plaintext

%#
%# Generated by ${version}
%#
% layout 'default', title => "Sme server 2 - ${MenuDescription}", share_dir => './';
%# css specific to this panel:
% content_for 'module' => begin
%= stylesheet '/css/${lcPackageName}.css'
<div id="module" class="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><p>
%=$c->render_to_string(inline =>$c->l($c->stash('first')))
</p>
%} elsif ($c->stash('success')) {
<div class='success '>
<h2><%=$c->l('Status Report') %></h2><p>
%= $c->l($c->stash('success'));
</p>
</div>
%} elsif ($c->stash('error')) {
<div class='sme-error'>
<h2><%=$c->l('Error Status Report') %></h2><p>
%= $c->l($c->stash('error'));
</p>
</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">
% if ($$${prefix}_data->{trt} eq "${condition}") {
%= include 'partials/_${prefix}_${condition}'
%}
</tal:block>
</div>
%end