add the AdminLTE and bootstrap files

This commit is contained in:
John Crisp
2025-04-15 16:33:00 +02:00
parent 02e63c6403
commit 038bafa69c
2079 changed files with 14113 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
<!-- common_css.html.ep -->
%= stylesheet 'css/sme-jquery-overrides.css'
%= stylesheet 'dist/css/adminlte.min.css'
%= stylesheet 'koozali/css/adminlte.koozali.css'
%= stylesheet 'koozali/css/flag-icon.min.css'
%= stylesheet 'dist/icons/font/bootstrap-icons.min.css'

View File

@@ -0,0 +1,6 @@
% layout 'AdminLTE', title => 'Sme server 2 - Error D';
% my $session_dump = Data::Dumper::Dumper($self->session);

View File

@@ -0,0 +1,186 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- default +jquery -->
<!-- https://icons.getbootstrap.com/ -->
<head>
<title>
<%= $title %>
</title>
<link rel="made" href="mailto:bugs%40koozali.org">
<meta name="copyright" content="(head.tmpl)Copyright 2003-2004 Mitel Corporation">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
%= content_for 'head_contrib'
% if (config 'hasJquery') {
%= include 'partials/_js_imports'
%= include 'common_js'
% }
%= content_for 'refresh'
%= include 'common_css'
<!-- Custom overrides? -->
% if ($c->current_route eq 'nutups') {
%= include 'partials/_nutups_overrides'
% }
</head>
<body class="sidebar-expand-lg bg-body-tertiary">
<!-- This is set from the data at the top of the _partials -->
<!-- eg % layout 'AdminLTE', title => "Sme server 2 - module"; -->
<!-- <h1> Page Title: <%= $title %> </h1> -->
% if ( not defined $c->session->{lang} ) {
% SrvMngr::init_session ( $c );
% }
<!--begin::App Wrapper-->
<div class="app-wrapper">
<!-- Should create a new separate header partial -->
<!--begin::Header-->
<nav id="koozali_grad" class="app-header navbar navbar-expand bg-success-subtle" data-bs-theme="light">
<!--begin::Container-->
<div class="container-fluid">
<!--begin::Start Navbar Links-->
<!-- Top bar links -->
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" data-lte-toggle="sidebar" href="#" role="button">
<i class="bi bi-list"></i>
</a>
</li>
<li class="nav-item d-none d-md-block"><a href="/smanager" class="nav-link">Home</a></li>
% if ( not defined $c->session->{username} ) {
<li class="nav-item d-none d-md-block"><a href="login" class="nav-link">Login</a></li>
% } else {
<li class="nav-item d-none d-md-block"><a href="logout" class="nav-link">Logout</a></li>
% }
<li class="nav-item d-none d-md-block">
%= include 'partials/_flag_icon'
</li>
</ul>
<!--end::Start Navbar Links-->
<!-- this can do direct to header so always available-->
% if ($c->is_logged_in && scalar @{SrvMngr::theme_list( $c )} > 1) {
%= include 'partials/_swt_theme'
% }
</div>
<!--end::Container-->
</nav>
<!--end::Header-->
<!--begin::Sidebar-->
<aside class="app-sidebar bg-success-subtle" data-bs-theme="light">
<!--begin::Sidebar Brand-->
<div class="sidebar-brand sidebar-dark-primary">
<!--begin::Brand Link-->
<a href="../index.html" class="brand-link">
<!--begin::Brand Image-->
<img src="koozali/assets/img/Koozali_EyeIcon.png" alt="Koozali Logo"
class="brand-image opacity-75 shadow" />
<!--end::Brand Image-->
<!--begin::Brand Text-->
<span class="brand-text fw-light">Koozali</span>
<!--end::Brand Text-->
</a>
<!--end::Brand Link-->
</div>
<!--end::Sidebar Brand-->
<!--begin::Sidebar Wrapper-->
<div class="sidebar-wrapper">
<nav class="mt-2">
<!--begin::Sidebar Menu-->
<ul class="nav sidebar-menu flex-column" data-lte-toggle="treeview" role="menu" data-accordion="false">
%= include 'partials/_sidebar_support_menu'
% if ( $c->is_logged_in ) {
%= include 'partials/_sidebar_user_menu'
% }
% if ( $c->is_admin ) {
%= include 'partials/_sidebar_main_menu'
% }
</ul>
<!--end::Sidebar Menu-->
</nav>
</div>
<!--end::Sidebar Wrapper-->
</aside>
<!--end::Sidebar-->
<!--begin::App Main-->
<main class="app-main">
<!-- Can add a header row here? -->
<!-- %= include 'partials/_app_content_header' -->
<!--begin::App Content-->
<div class="app-content">
<!--begin::Container-->
<div class="container-fluid">
<!--begin::Rows-->
<!-- Add breadcrumb here -->
%= include 'partials/_app_content_breadcrumb'
<! We can add extra rows in the main panel here -->
<!-- %#= include 'partials/_app_content_first_row' -->
<!-- %#= include 'partials/_app_content_demo_row' -->
<!--end::Rows-->
<br>
<!-- This is the main page content depening on the calling module -->
%= content 'module'
</div>
</div>
<!--end::App Content-->
</main>
<!--end::App Main-->
<!-- %= include 'partials/_footer' -->
<!--begin::Footer-->
<footer class="app-footer">
<!--begin::To the end-->
<div class="float-end d-none d-sm-inline">Anything you want</div>
<!--end::To the end-->
<!--begin::Copyright-->
<strong>
Copyright &copy; 2014-2025&nbsp;
<a href="https://adminlte.io" class="text-decoration-none">AdminLTE.io</a>.
</strong>
All rights reserved.
<!--end::Copyright-->
</footer>
<!--end::Footer-->
</div>
<!--end::App Wrapper-->
<div id="adminlte-version"></div>
</body>
</html>

View File

@@ -0,0 +1,69 @@
% layout 'AdminLTE' , title => "Sme server 2 - login";
% content_for 'module' => begin
<div id="" class="">
%if ( config 'debug' ) {
<p>
%= dumper $c->current_route
%if ( stash 'trt' ) {
%= dumper stash 'trt'
%}
</p>
%}
% if ( stash 'error' ) {
<br><div class="">
%= $c->render_to_string(inline => stash 'error')
</div>
%}
% my $btn = l('use_SIGNIN');
% if ( $trt eq 'RESET' ) {
<br><div class=""><h2>
%= $c->render_to_string(inline => l 'use_DESC_RESET')
</h2></div>
% $btn = l('use_RESET');
%}
<h1>
%=l 'use_TITLE'
</h1>
%= form_for '/login' => (method => 'POST') => begin
<p><span class="">
%=l 'USER_NAME'
</span><span class="">
%= text_field 'Username'
</span></p>
% if ( $trt ne 'RESET' ) {
<p><span class="">
%=l 'PASSWORD'
</span><span class="">
%= password_field 'Password', id => "", autocomplete => 'current-password', class=>""
% if (config 'hasJquery') {
%#<a href='#' id="" class=""> <img src="images/visible.png" height="16" alt="Visible"></a>
% }
</span></p>
%}
%= hidden_field 'From' => $c->tx->req->url
%= hidden_field 'Trt' => $trt
<br>
<div class="">
%= submit_button "$btn", class => ""
</div>
%if ( config 'pwdreset' ) {
<div class=""><a href='login2'>
%=l 'use_FORGOT'
</a></div>
%}
% end
</div>
%end

View File

@@ -0,0 +1,15 @@
% layout 'AdminLTE', title => 'Sme server 2 - Error D';
% content_for 'module' => begin
<div id="" class="">
<p><br>dev<br> Oups !!!
The page you were requesting
"<%= $self->req->url->path || '/' %>"
could not be found.
<br>dev<br>
%= link_to Initial => '/initial'
</p>
</div>
% end

View File

@@ -0,0 +1,21 @@
<!--begin::App Content Header-->
<div class="app-content-header">
<!--begin::Container-->
<div class="container-fluid">
<!--begin::Row-->
<div class="row">
<div class="col-sm-6">
<ol class="breadcrumb float-sm-start">
<li class="breadcrumb-item"><a href="initial">Home</a></li>
<li class="breadcrumb-item active" aria-current="page"><%= $c->current_route %></li>
</ol>
</div>
</div>
<!--end::Row-->
</div>
<!--end::Container-->
</div>
<!--end::App Content Header-->

View File

@@ -0,0 +1,45 @@
<div class="row">
<div class="col-12">
<!-- Default box -->
<div class="card">
<div class="card-header">
<h3 class="card-title">Title</h3>
<div class="card-tools">
<button type="button" class="btn btn-tool" data-lte-toggle="card-collapse"
title="Collapse">
<i data-lte-icon="expand" class="bi bi-plus-lg"></i>
<i data-lte-icon="collapse" class="bi bi-dash-lg"></i>
</button>
<button type="button" class="btn btn-tool" data-lte-toggle="card-remove"
title="Remove">
<i class="bi bi-x-lg"></i>
</button>
</div>
</div>
<!-- card body -->
<div class="card-body">Start creating your amazing application!</div>
<!-- /.card-body -->
<!-- card footer -->
<div class="card-footer">Footer</div>
<!-- /.card-footer-->
</div>
<!-- /.card -->
</div>
</div>

View File

@@ -0,0 +1,19 @@
<div class="row mb-2">
<div class="col-sm-6">
<h1>PAGE TITLE</h1>
</div>
<div>
<h3>test Breadcrumb</h3>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="#">ROOT MENU</a></li>
<li class="breadcrumb-item"><a href="#">SUBMENU 1</a></li>
<li class="breadcrumb-item"><a href="#">SUBMENU N</a></li>
<li class="breadcrumb-item active">PAGE TITLE</li>
</ol>
</div>
</div>

View File

@@ -0,0 +1,24 @@
<!--begin::App Content Header-->
<div class="app-content-header">
<!--begin::Container-->
<div class="container-fluid">
<!--begin::Row-->
<div class="row">
<div class="col-sm-6">
<h3 class="mb-0">Main Content Header Unfixed Layout</h3>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-end">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Unfixed Layout</li>
</ol>
</div>
</div>
<!--end::Row-->
</div>
<!--end::Container-->
</div>
<!--end::App Content Header-->

View File

@@ -0,0 +1,5 @@
<div id="flag-container" class = "flag-style">
<!-- class=flag-style" -->
<!-- The flag icon will be inserted here -->
</div>

View File

@@ -0,0 +1,55 @@
<div class="login-page bg-body-secondary app-loaded">
<!-- /.login-logo -->
<br>
<br>
<div class="login-box">
<div class="card card-outline card-success">
<div class="card-header">
<a href="../index2.html" class="link-dark text-center link-offset-2 link-opacity-100 link-opacity-50-hover">
<h1 class="mb-0"><b>Koozali</b></h1><br><h3>Server Manager</h3>
</a>
</div>
<div class="card-body login-card-body">
<p class="login-box-msg">Sign in to start your session</p>
<form action="../index3.html" method="post">
<div class="input-group mb-1">
<div class="form-floating">
<input id="loginEmail" type="email" class="form-control" value="" placeholder="">
<label for="loginEmail">User</label>
</div>
<div class="input-group-text"><span class="bi bi-envelope"></span></div>
</div>
<div class="input-group mb-1">
<div class="form-floating">
<input id="loginPassword" type="password" class="form-control" placeholder="">
<label for="loginPassword">Password</label>
</div>
<div class="input-group-text"><span class="bi bi-lock-fill"></span></div>
</div>
<!--begin::Row-->
<div class="row">
<div class="col-8 d-inline-flex align-items-center">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="flexCheckDefault">
<label class="form-check-label" for="flexCheckDefault"> Remember Me </label>
</div>
</div>
<!-- /.col -->
<div class="col-4">
<div class="d-grid gap-2">
<button type="submit" class="btn btn-primary">Sign In</button>
</div>
</div>
<!-- /.col -->
</div>
<!--end::Row-->
</form>
<p class="mb-1"><a href="forgot-password.html">I forgot my password</a></p>
</div>
<!-- /.login-card-body -->
</div>
</div>
<!-- /.login-box -->
</div>

View File

@@ -0,0 +1,5 @@
%= stylesheet '/css/nutups.css'
%= javascript '/js/nutups.js'

View File

@@ -0,0 +1,5 @@
</div>
<!-- /.card -->
</div>
</div>

View File

@@ -0,0 +1,4 @@
<!-- card footer -->
<div class="card-footer">Footer</div>
<!-- /.card-footer-->

View File

@@ -0,0 +1,7 @@
<div class="card-header">
<h3 class="card-title">Card Title <%= $title%></h3>
%= include 'partials/_panel_card_tools'
</div>

View File

@@ -0,0 +1,12 @@
<div class="card-tools">
<button type="button" class="btn btn-tool" data-lte-toggle="card-collapse"
title="Collapse">
<i data-lte-icon="expand" class="bi bi-plus-lg"></i>
<i data-lte-icon="collapse" class="bi bi-dash-lg"></i>
</button>
<button type="button" class="btn btn-tool" data-lte-toggle="card-remove"
title="Remove">
<i class="bi bi-x-lg"></i>
</button>
</div>

View File

@@ -0,0 +1,6 @@
<div class="row">
<div class="col-12">
<!-- Default box -->
<div class="card">

View File

@@ -0,0 +1,66 @@
<!-- Main menu -->
% use SrvMngr qw( getNavigation );
% my %nav = %{SrvMngr->getNavigation( $c->languages(), 'A' )};
%if (config->{debug} == 1) {
<li class="nav-header">tmpl: _navig2</li>
% }
% # Define a hash mapping headings to icons
% my %icon_map = (
% "User management" => "bi-people-fill",
% "Network" => "bi-shuffle",
% "Investigation" => "bi-question",
% "System" => "bi-pc-display-horizontal",
% "Legacy" => "bi-archive",
% );
<li class="nav-header">ADMINISTRATION</li>
% my $cc = 100;
% foreach my $h (sort { ($nav{$a}{'WEIGHT'}/$nav{$a}{'COUNT'})
% <=> ($nav{$b}{'WEIGHT'}/$nav{$b}{'COUNT'}) } keys %nav) {
% # Retrieve the icon based on the value of $h
% my $icon = $icon_map{$h} // ""; # Default to an empty string if $h is not found
<!-- Group Header-->
<li class="nav-item">
<a href='#' class="nav-link">
<i class="nav-icon bi <%= $icon %> "></i>
<%= $h %>
<i class="nav-arrow bi bi-chevron-right"></i>
</a>
<ul class="nav nav-treeview">
% my ($classNew, $target, $href) = '';
% foreach (sort { $a->{'WEIGHT'} <=> $b->{'WEIGHT'} } @{$nav{$h}{'DESCRIPTIONS'}}) {
% next if ($_->{'MENUCAT'} ne 'A' ); # menu Admin
% if ( $_->{'FILENAME'} =~ m/^2\// ) {
% $target = '_self';
% (my $file2 = $_->{'FILENAME'}) =~ s|^2/||;
% $href = '/smanager/' . $file2;
% } else {
% $target = 'main';
% my $host = $c->req->url->to_abs->host;
% $href = "/smanager/legacypanel?url=https://$host/server-manager" . $_->{'FILENAME'};
%
% }
<li class="nav-item">
<a target='<%= $target %>' href='<%= $href %>' class="nav-link">
<i class="nav-icon bi bi-dot"></i>
<%= $_->{'DESCRIPTION'} %>
</a>
</li>
<!-- End trying tree view menus -->
% $cc++;
% }
</ul>
</li>
% }

View File

@@ -0,0 +1,65 @@
<!-- Support menu -->
% use SrvMngr qw( getNavigation );
% my %nav = %{SrvMngr->getNavigation( $c->languages(), 'N' )};
% # Define a hash mapping headings to icons
% my %icon_map = (
% "Home" => "bi-house",
% "Online manual" => "bi-book",
% "Support and licensing" => "bi-card-text",
% );
% my $cc = 200;
% foreach my $h (sort { ($nav{$a}{'WEIGHT'}/$nav{$a}{'COUNT'})
% <=> ($nav{$b}{'WEIGHT'}/$nav{$b}{'COUNT'}) } keys %nav)
% {
%
%#if (config->{debug} == 1) {
<!-- <li class="nav-header">tmpl: _nav_menu</li> -->
%# }
<!-- Add the section header -->
<li class="nav-header"><%= $h %></li>
<!-- Then loop and add the actual links -->
% my ($classNew, $target, $href) = '';
% foreach (sort { $a->{'WEIGHT'} <=> $b->{'WEIGHT'} } @{$nav{$h}{'DESCRIPTIONS'}}) {
% next if ($_->{'MENUCAT'} ne 'N' ); # menu Navigation
% if ( $_->{'FILENAME'} =~ m/^2\// ) {
% $target = '_self';
% (my $file2 = $_->{'FILENAME'}) =~ s|^2/||;
% $href = '/smanager/' . $file2;
% } else {
% $target = 'main';
% $href = '/server-manager' . $_->{'FILENAME'};
% }
% # Retrieve the icon based on the value of $h
% my $icon = $icon_map{$_->{'DESCRIPTION'}} // ""; # Default to an empty string if $h is not found
<li class="nav-item">
<a target='<%= $target %>' href='<%= $href %>' class="nav-link">
<i class="nav-icon bi <%= $icon %>"></i>
<%= $_->{'DESCRIPTION'} %>
</a>
</li>
% $cc++;
% }
<!-- Fix missing mobile login button in header -->
% if ( not defined $c->session->{username} ) {
<li class="nav-item">
<a href="login" class="nav-link">
<i class="nav-icon bi bi-key"></i>
Login</a>
</li>
% }
% }

View File

@@ -0,0 +1,49 @@
<!-- User menu -->
% use SrvMngr qw( getNavigation );
% my %nav = %{SrvMngr->getNavigation( $c->languages(), 'U' )};
% # Define a hash mapping headings to icons
% my %icon_map = (
% "Change password" => "bi-key",
% "Logout" => "bi-box-arrow-right",
% );
<li class="nav-header">USER</li>
<li class="nav-item">
<a href='#' id="" class="nav-link">
<i class="nav-icon bi bi-person-fill"></i>Current User: <%= session 'username' %>
</a>
</li>
% my $cc = 300;
% foreach my $h (sort { ($nav{$a}{'WEIGHT'}/$nav{$a}{'COUNT'})
% <=> ($nav{$b}{'WEIGHT'}/$nav{$b}{'COUNT'}) } keys %nav) {
% my ($classNew, $target, $href) = '';
% foreach (sort { $a->{'WEIGHT'} <=> $b->{'WEIGHT'} } @{$nav{$h}{'DESCRIPTIONS'}}) {
% next if ($_->{'MENUCAT'} ne 'U' ); # menu User
% if ( $_->{'FILENAME'} =~ m/^2\// ) {
% $target = '_self';
% (my $file2 = $_->{'FILENAME'}) =~ s|^2/||;
% $href = '/smanager/' . $file2;
% } else {
% $target = 'main';
% $href = '/server-manager' . $_->{'FILENAME'};
% }
% # Retrieve the icon based on the value of $h
% my $icon = $icon_map{$_->{'DESCRIPTION'}} // ""; # Default to an empty string if $h is not found
<li class="nav-item">
<a target='<%= $target %>' href='<%= $href %>' class="nav-link">
<i class="nav-icon bi <%= $icon %>"></i>
<%= $_->{'DESCRIPTION'} %>
</a>
</li>
% $cc++;
% }
% }