diff --git a/root/usr/share/smanager/themes/default/templates/datetime.html.ep b/root/usr/share/smanager/themes/default/templates/datetime.html.ep index c795e13..d5befdb 100644 --- a/root/usr/share/smanager/themes/default/templates/datetime.html.ep +++ b/root/usr/share/smanager/themes/default/templates/datetime.html.ep @@ -1,7 +1,5 @@ % layout 'default', title => 'Sme server 2 - datetime'; % content_for 'module' => begin - %= javascript 'js/datetime.js' - %= stylesheet 'css/datetime.css'
% if (config->{debug} == 1) {

diff --git a/root/usr/share/smanager/themes/default/templates/emailsettings.html.ep b/root/usr/share/smanager/themes/default/templates/emailsettings.html.ep index bcedb64..031437f 100644 --- a/root/usr/share/smanager/themes/default/templates/emailsettings.html.ep +++ b/root/usr/share/smanager/themes/default/templates/emailsettings.html.ep @@ -4,8 +4,6 @@ % layout 'default', title => "Sme server 2 - E-Mail", share_dir => './'; %# css specific to this panel: % content_for 'module' => begin -%= stylesheet '/css/emailsettings.css' -%= javascript '/js/emailsettings.js' % use constant FALSE => 0; % use constant TRUE => 1; diff --git a/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep b/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep index e18fc76..2d3df64 100644 --- a/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep +++ b/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep @@ -2,7 +2,6 @@ PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> - <%= $title %> @@ -11,27 +10,16 @@ %= stylesheet '/css/new_sme.css' %= stylesheet '/css/new-sme-main.css' - - %# Replaced by consolidated (and rationlised) CSS files as above March 2025 - %#= stylesheet '/css/sme_core.css' - %#= stylesheet '/css/sme_main.css' - %#= stylesheet '/css/sme_menu.css' - %#= stylesheet '/css/styles.css' - %#= stylesheet '/css/sme-password.css' - %= content_for 'head_contrib' - % if (config 'hasJquery') { - %= include 'partials/_js_imports' - %= include 'common_js' + % if (config 'hasJquery') { + %= include 'partials/_js_imports' + %= include 'common_js' % } - %= content_for 'refresh' - + + %= content_for 'refresh' %= stylesheet '/js/datatables.min.css' - %= javascript '/js/datatables.min.js' - %= stylesheet '/js/jquery-ui.min.css' - %= javascript '/js/jquery-ui.min.js' %= javascript '/js/dataTables.buttons.min.js' %= javascript '/js/jszip.min.js' @@ -46,24 +34,33 @@ %= stylesheet '/css/sme-jquery-overrides.css' - + + %# panel specific css file + % my $controller = stash('controller'); + % if ($controller) { + % my $css_path = "css/$controller.css"; + %# Use the url_for helper to generate the correct static file URL + % if (app->static->file($css_path)) { + "> + % } + % } - -% if ( not defined $c->session->{lang} ) { -% SrvMngr::init_session ( $c ); -% } + % if ( not defined $c->session->{lang} ) { + % SrvMngr::init_session ( $c ); + % } +

+ % if (config 'hasJquery') { + %= content 'js_toggleMenu' + % } - % if (config 'hasJquery') { - %= content 'js_toggleMenu' - % } - - -
- - %= include 'partials/_info' - - % if (flash 'success') { -
- %= $c->render_to_string(inline => flash 'success') + - % } - % if ( flash 'warning' ) { -
- %= $c->render_to_string(inline => flash 'warning') + +
+ %= include 'partials/_info' + % if (flash 'success') { +
+ %= $c->render_to_string(inline => flash 'success') +
+ % } + % if ( flash 'warning' ) { +
+ %= $c->render_to_string(inline => flash 'warning') +
+ %} + % if ( flash 'error' ) { +
+ %= $c->render_to_string(inline => flash 'error') +
+ %} + %= content 'module' + %= include 'partials/_footer'
- %} - % if ( flash 'error' ) { -
- %= $c->render_to_string(inline => flash 'error') -
- %} - %= content 'module' - %= include 'partials/_footer' -
% if (config 'hasJquery') { @@ -115,7 +110,7 @@ %= content 'js_togglePassword' % } -%= javascript '/js/sme-dataTable-setup.js' + %= javascript '/js/sme-dataTable-setup.js' + %# Specific panel js code + % $controller = stash('controller'); + % if ($controller) { + % my $js_path = "js/$controller.js"; + %# Use the url_for helper to generate the correct static file URL + % if (app->static->file($js_path)) { + + % } + % } \ No newline at end of file diff --git a/root/usr/share/smanager/themes/default/templates/qmailanalog.html.ep b/root/usr/share/smanager/themes/default/templates/qmailanalog.html.ep index de9122d..539d2c2 100644 --- a/root/usr/share/smanager/themes/default/templates/qmailanalog.html.ep +++ b/root/usr/share/smanager/themes/default/templates/qmailanalog.html.ep @@ -1,6 +1,5 @@ % layout 'default', title => "Sme server 2 - qmailanalog"; % content_for 'module' => begin -%= javascript '/js/qmailanalog.js'
%if (config->{debug} == 1) {

diff --git a/smeserver-manager.spec b/smeserver-manager.spec index 15912b8..51e2939 100644 --- a/smeserver-manager.spec +++ b/smeserver-manager.spec @@ -2,7 +2,7 @@ Summary: Sme server navigation module : manager 2 %define name smeserver-manager Name: %{name} %define version 11.0.0 -%define release 99 +%define release 100 Version: %{version} Release: %{release}%{?dist} License: GPL @@ -146,6 +146,9 @@ true %defattr(-,root,root) %changelog +* Tue Jul 01 2025 Brian Read 11.0.0-100.sme +- Add code in top template default.html.ep to incorporate any panel specific js and css [SME: 13062] + * Mon Jun 30 2025 Brian Read 11.0.0-99.sme - Directory panel - Add in open for config db as required by cacheing [SME: 13059]