Add in userpanewl and fix up table sub in template
This commit is contained in:
60
Targets/Userpanels/userpanels.html.ep
Normal file
60
Targets/Userpanels/userpanels.html.ep
Normal file
@@ -0,0 +1,60 @@
|
||||
%#
|
||||
%# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-04-23 10:18:18
|
||||
%#
|
||||
% layout 'default', title => "Sme server 2 - User panel access ", share_dir => './';
|
||||
%# css specific to this panel:
|
||||
% content_for 'module' => begin
|
||||
%= stylesheet '/css/userpanels.css'
|
||||
%= javascript '/js/userpanels.js'
|
||||
<div id="module" class="module Userpanels-panel">
|
||||
|
||||
% if (config->{debug} == 1) {
|
||||
<pre>
|
||||
%= dumper $c->current_route
|
||||
%= dumper $usp_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 '>
|
||||
<p>
|
||||
%= $c->l($c->stash('success'));
|
||||
</p>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
%} elsif ($c->stash('error')) {
|
||||
<div class='sme-error'>
|
||||
<p>
|
||||
%= $c->l($c->stash('error'));
|
||||
</p>
|
||||
</div>
|
||||
<br />
|
||||
%}
|
||||
|
||||
%#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'
|
||||
|
||||
% if ($usp_data->{trt} eq "USERTABLE") {
|
||||
%= include 'partials/_usp_USERTABLE'
|
||||
%}
|
||||
|
||||
% if ($usp_data->{trt} eq "PANELTABLE") {
|
||||
%= include 'partials/_usp_PANELTABLE'
|
||||
%}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
%end
|
Reference in New Issue
Block a user