initial commit of file from CVS for smeserver-manager on Fri Mar 22 14:54:28 AEDT 2024
This commit is contained in:
44
root/usr/share/smanager/lib/SrvMngr/Controller/Support.pm
Normal file
44
root/usr/share/smanager/lib/SrvMngr/Controller/Support.pm
Normal file
@@ -0,0 +1,44 @@
|
||||
package SrvMngr::Controller::Support;
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# heading : Support
|
||||
# description : Support and licensing
|
||||
# navigation : 0000 200
|
||||
# menu : N
|
||||
#
|
||||
# routes : end
|
||||
#----------------------------------------------------------------------
|
||||
use strict;
|
||||
use warnings;
|
||||
use Mojo::Base 'Mojolicious::Controller';
|
||||
|
||||
use SrvMngr qw(theme_list init_session);
|
||||
|
||||
use esmith::util;
|
||||
|
||||
|
||||
sub display_licenses {
|
||||
|
||||
my $lang = shift;
|
||||
|
||||
my $lic = '';
|
||||
foreach my $license (esmith::util::getLicenses($lang)) {
|
||||
|
||||
$lic .= $license . '<br>';
|
||||
}
|
||||
return $lic;
|
||||
}
|
||||
|
||||
sub main {
|
||||
my $c = shift;
|
||||
$c->app->log->info($c->log_req);
|
||||
|
||||
my $title = $c->l('support_FORM_TITLE');
|
||||
my $modul = $c->render_to_string(inline => display_licenses($c->session->{lang}));
|
||||
|
||||
$c->stash( title => $title, modul => $modul );
|
||||
$c->render(template => 'module');
|
||||
};
|
||||
|
||||
|
||||
1;
|
Reference in New Issue
Block a user