SM2Gen/Templates/layout.html.ep.tem

53 lines
1.3 KiB
Plaintext
Raw Normal View History

%#
2024-04-28 13:03:06 +02:00
%# Generated by ${version}
%#
2024-09-16 15:01:17 +02:00
% layout 'default', title => "Sme server 2 - ${MenuDescription}", share_dir => './';
2024-09-19 11:00:50 +02:00
%# css specific to this panel:
2024-04-09 11:33:50 +02:00
% content_for 'module' => begin
%= stylesheet '/css/${lcPackageName}.css'
2024-04-09 11:33:50 +02:00
<div id="module" class="module ${PackageName}-panel">
% if ($config->{debug} == 1) {
<pre>
2024-04-09 11:33:50 +02:00
%= dumper $c->current_route
%= dumper $$${prefix}_data->{trt}
</pre>
2024-04-09 11:33:50 +02:00
% }
<h1><%=$title%></h1>
2024-11-22 16:09:21 +01:00
% if ( stash('modul')) {
2024-04-09 11:33:50 +02:00
%= $c->render_to_string(inline => stash('modul') );
% }
2024-11-22 16:09:21 +01:00
%if ($c->stash('first')) {
2024-04-09 11:33:50 +02:00
<br><p>
2024-11-22 16:09:21 +01:00
%=$c->render_to_string(inline =>$c->l($c->stash('first')))
2024-04-09 11:33:50 +02:00
</p>
2024-11-22 16:09:21 +01:00
%} elsif ($c->stash('success')) {
2024-04-09 11:33:50 +02:00
<div class='sme-border'>
2024-11-22 16:09:21 +01:00
<h2><%=$c->l('Status Report') %></h2><p>
%= $c->l($c->stash('success'));
2024-04-09 11:33:50 +02:00
</p>
</div>
2024-11-22 16:09:21 +01:00
%} elsif ($c->stash('error')) {
2024-04-09 11:33:50 +02:00
<div class='sme-error'>
2024-11-22 16:09:21 +01:00
<h2><%=$c->l('Error Status Report') %></h2><p>
%= $c->l($c->stash('error'));
2024-04-09 11:33:50 +02:00
</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'
2024-04-09 11:33:50 +02:00
<tal:block tal:repeat="condition conditions">
% if ($$${prefix}_data->{trt} eq "${condition}") {
%= include 'partials/_${prefix}_${condition}'
%}
</tal:block>
</div>
%end