11.0.0-44.sme Tidy up Nut Panels

This commit is contained in:
John Crisp
2025-07-06 17:25:17 +02:00
parent 305e7b75d2
commit 142c05fbd7
7 changed files with 178 additions and 168 deletions

View File

@@ -10,8 +10,8 @@
% if (config->{debug} == 1) {
<pre>
%= dumper $c->current_route
%= dumper $nut_data->{trt}
<%= dumper $c->current_route %>
<%= dumper $nut_data->{trt} %>
</pre>
% }
@@ -22,28 +22,26 @@
% }
%if ($c->stash('first')) {
<br><p>
<br>
<div>
<%=$c->render_to_string(inline =>$c->l($c->stash('first'))) %>
</p>
</div>
%} elsif ($c->stash('success')) {
% } elsif ($c->stash('success')) {
<div class="text-success">
<h2><%=$c->l('nut_Status_Report') %></h2>
<div>
<%= $c->l($c->stash('success')); %>
</div>
</div>
<br>
%} elsif ($c->stash('error')) {
% } elsif ($c->stash('error')) {
<div class="text-danger">
<h2><%=$c->l('nut_Error_Status_Report') %></h2>
<div>
<%= $c->l($c->stash('error')); %>
</div>
</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'
@@ -52,14 +50,15 @@
% if ($nut_data->{trt} eq "STATUS") {
<%= include 'partials/_nut_STATUS' %>
%}
% }
<br>
% if ($nut_data->{trt} eq "CONFIG") {
<%= include 'partials/_nut_CONFIG' %>
%}
% }
<br>
</div>