Avanzamento grafica AdminLTE3

This commit is contained in:
loviuz 2024-05-17 00:32:46 +02:00
parent 648fb32987
commit 448a47b5a3
10 changed files with 299 additions and 403 deletions

View File

@ -143,8 +143,8 @@ input[type=file] {
margin: auto; margin: auto;
} }
.content { .content-wrapper {
padding: 20px 15px; padding-top: 10px;
} }
.navbar a:hover, .navbar a:hover,
@ -193,31 +193,6 @@ a:focus {
cursor: pointer; cursor: pointer;
} }
#main_loading {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #555;
z-index: 9999;
text-align: center;
opacity: 0.9;
-moz-opacity: 0.9;
filter: alpha(opacity=90);
}
#main_loading>div {
position: relative;
top: 50%;
color: #333;
}
#main_loading>div>i {
font-size: 300px;
margin-top: -150px;
color: #e24e1e;
}
#mini-loader { #mini-loader {
position: fixed; position: fixed;
@ -231,8 +206,8 @@ a:focus {
#mini-loader>div { #mini-loader>div {
position: absolute; position: absolute;
bottom: 50%; bottom: 10%;
left: 50%; right: 10%;
width: 100px; width: 100px;
height: 100px; height: 100px;
margin-top: -50px; margin-top: -50px;
@ -331,49 +306,6 @@ span.form-control {
} }
/* Aggiustamenti per i widget */
.widget li {
margin-left: 0;
padding-top:10px;
list-style-type: none;
height: 106px;
}
.widget {
padding: 0;
margin-bottom: 0;
}
.widget.bordered {
border: 6px dashed #aaa;
margin: 10px;
min-height: 200px;
padding: 4px;
}
.close {
padding-right: 5px;
position: relative;
z-index: 1;
opacity: 0.4;
}
.close:focus,
.close:hover {
opacity: 0.8;
}
.li-widget button.close:hover,
.li-widget button.close:focus {
opacity: 0.3;
}
.li-widget button.close {
padding-right: 5px;
opacity: 0.1;
}
/* Tooltip dark */ /* Tooltip dark */
@ -900,11 +832,6 @@ input.small-width {
max-height: 20px; max-height: 20px;
} }
.brand-link {
max-width: 150px;
max-height: 100px;
}
.has-feedback .form-control { .has-feedback .form-control {
padding-right: 6px; padding-right: 6px;
} }
@ -1100,11 +1027,6 @@ table.dataTable {
margin: 2px 0px; margin: 2px 0px;
} }
.widget-user .widget-user-image>img {
-webkit-box-shadow: -10px 0px 13px -7px #000000, 10px 0px 13px -7px #000000, 5px 5px 15px 5px rgba(0, 0, 0, 0);
box-shadow: -10px 0px 13px -7px #000000, 10px 0px 13px -7px #000000, 5px 5px 15px 5px rgba(0, 0, 0, 0);
}
/* /*
* Colore eventi fullcalendar * Colore eventi fullcalendar
*/ */
@ -1161,13 +1083,6 @@ kbd{
box-shadow: 0px 0px 1px black; box-shadow: 0px 0px 1px black;
} }
@media (max-width: 480px) {
#main_loading>div>i {
font-size: 160px;
margin-top: -80px;
}
}
@media screen and (max-width: 767px) { @media screen and (max-width: 767px) {
.navbar-left { .navbar-left {
display: inline-block; display: inline-block;

View File

@ -16,16 +16,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
// Aggiunta dell'ingranaggio all'unload della pagina
$(window).on("beforeunload", function () {
$("#main_loading").show();
});
// Rimozione dell'ingranaggio al caricamento completo della pagina
$(window).on("load", function () {
$("#main_loading").fadeOut();
});
// Fix multi-modal // Fix multi-modal
$(document).on('hidden.bs.modal', '.modal', function () { $(document).on('hidden.bs.modal', '.modal', function () {
$(this).remove(); $(this).remove();

View File

@ -58,13 +58,13 @@ function openModal(title, href) {
const content = '<div class="modal-dialog modal-lg">\ const content = '<div class="modal-dialog modal-lg">\
<div class="modal-content">\ <div class="modal-content">\
<div class="modal-header bg-light-blue">\ <div class="modal-header">\
<button type="button" class="close" data-dismiss="modal">\
<span aria-hidden="true">&times;</span><span class="sr-only">' + globals.translations.close + '</span>\
</button>\
<h4 class="modal-title">\ <h4 class="modal-title">\
<i class="fa fa-pencil"></i> ' + title + '\ <i class="fa fa-pencil"></i> ' + title + '\
</h4>\ </h4>\
<button type="button" class="close" data-dismiss="modal">\
<span aria-hidden="true">&times;</span><span class="sr-only">' + globals.translations.close + '</span>\
</button>\
</div>\ </div>\
<div class="modal-body">|data|</div>\ <div class="modal-body">|data|</div>\
</div>\ </div>\

View File

@ -228,7 +228,7 @@ function renderHook(hook, result) {
// Inizializzazione // Inizializzazione
var element = $("#" + element_id); var element = $("#" + element_id);
if (element.length == 0) { if (element.length == 0) {
$("#hooks").append('<li class="hook-element" id="' + element_id + '"></li>'); $("#hooks").append('<div class="dropdown-item hook-element" id="' + element_id + '"></div>');
element = $("#" + element_id); element = $("#" + element_id);
} }
@ -241,7 +241,16 @@ function renderHook(hook, result) {
} }
// Contenuto // Contenuto
var content = '<a href="' + (result.link ? result.link : "#") + '"><i class="' + result.icon + '"></i><span class="small"> ' + result.message + '</span>'; var content = '';
if (result.link) {
content += '<a href="' + result.link + '">';
} else {
content += '<div class="hooks-header">';
}
content += '<i class="' + result.icon + '"></i> <span class="small"> ' + result.message + '</span>';
if (result.progress) { if (result.progress) {
var current = result.progress.current; var current = result.progress.current;
@ -254,7 +263,11 @@ function renderHook(hook, result) {
content += '<div class="progress" style="margin-bottom: 0px;"><div class="progress-bar" role="progressbar" aria-valuenow="' + percentage + '" aria-valuemin="0" aria-valuemax="100" style="width:' + percentage + '%">' + percentage + '% (' + current + '/' + total + ')</div></div>'; content += '<div class="progress" style="margin-bottom: 0px;"><div class="progress-bar" role="progressbar" aria-valuenow="' + percentage + '" aria-valuemin="0" aria-valuemax="100" style="width:' + percentage + '%">' + percentage + '% (' + current + '/' + total + ')</div></div>';
} }
content += '</a>'; if (result.link) {
content += '</a>';
} else {
content += '</div>';
}
element.html(content); element.html(content);
} }

View File

@ -17,8 +17,6 @@
*/ */
function init() { function init() {
// Inizializzazzione dei box AdminLTE
$('.box').boxWidget();
// Modal di default // Modal di default
$('[data-href]').not('.ask, .bound').click(function () { $('[data-href]').not('.ask, .bound').click(function () {
launch_modal($(this).data('title'), $(this).data('href'), 1); launch_modal($(this).data('title'), $(this).data('href'), 1);

View File

@ -491,15 +491,10 @@ if ($read_only || !empty($block_edit)) {
if(content_was_modified) { if(content_was_modified) {
var dialogText = "Uscire senza salvare?"; var dialogText = "Uscire senza salvare?";
e.returnValue = dialogText; e.returnValue = dialogText;
$("#main_loading").fadeOut();
return dialogText; return dialogText;
} }
}); });
window.addEventListener("unload", function(e) {
$("#main_loading").show();
});
<?php <?php
if (!empty($advanced_sessions)) { if (!empty($advanced_sessions)) {

View File

@ -21,10 +21,8 @@ include_once __DIR__.'/../core.php';
if (Auth::check()) { if (Auth::check()) {
echo ' echo '
</div>
</div><!-- /.row -->
</section><!-- /.content --> </section><!-- /.content -->
</aside><!-- /.content-wrapper --> </div><!-- /.content-wrapper -->
<footer class="main-footer"> <footer class="main-footer">
<a class="hidden-xs" href="'.tr('https://www.openstamanager.com').'" title="'.tr("Il gestionale open source per l'assistenza tecnica e la fatturazione").'." target="_blank"><strong>'.tr('OpenSTAManager').'</strong></a> <a class="hidden-xs" href="'.tr('https://www.openstamanager.com').'" title="'.tr("Il gestionale open source per l'assistenza tecnica e la fatturazione").'." target="_blank"><strong>'.tr('OpenSTAManager').'</strong></a>

View File

@ -144,7 +144,7 @@ if (filter('action') == 'do_update') {
echo ' echo '
<div class="card card-warning card-center-large text-center"> <div class="card card-warning card-center-large text-center">
<div class="card-header"> <div class="card-header">
<h3 class="card-title">'.(!$dbo->isInstalled() ? tr('Installazione') : tr('Aggiornamento')).'</h3> <h3 class="card-title"><i class="fa fa-refresh"></i> '.(!$dbo->isInstalled() ? tr('Installazione') : tr('Aggiornamento')).'</h3>
</div> </div>
<div class="card-body">'; <div class="card-body">';
if (!$dbo->isInstalled()) { if (!$dbo->isInstalled()) {
@ -217,7 +217,7 @@ if (filter('action') == 'do_update') {
echo ' echo '
<script> <script>
$(document).ready(function(){ $(document).ready(function(){
$(".login-card").fadeOut(); $(".login-box").fadeOut();
count = '.count($updates).'; count = '.count($updates).';
current = 0; current = 0;

View File

@ -20,7 +20,7 @@
use Models\Module; use Models\Module;
use Util\FileSystem; use Util\FileSystem;
include_once __DIR__.'/../core.php'; include_once __DIR__ . '/../core.php';
$paths = App::getPaths(); $paths = App::getPaths();
$user = Auth::user(); $user = Auth::user();
@ -35,31 +35,31 @@ echo '<!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>'.$pageTitle.' - '.tr('OpenSTAManager').'</title> <title>' . $pageTitle . ' - ' . tr('OpenSTAManager') . '</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"> <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<meta name="robots" content="noindex,nofollow"> <meta name="robots" content="noindex,nofollow">
<meta name="description" content="'.tr('OpenSTAManager, il software gestionale open source per assistenza tecnica e fatturazione elettronica.').'"> <meta name="description" content="' . tr('OpenSTAManager, il software gestionale open source per assistenza tecnica e fatturazione elettronica.') . '">
<meta name="author" content="DevCode s.r.l."> <meta name="author" content="DevCode s.r.l.">
<link href="'.$paths['img'].'/favicon.png" rel="icon" type="image/x-icon" />'; <link href="' . $paths['img'] . '/favicon.png" rel="icon" type="image/x-icon" />';
if (file_exists(base_dir().'/manifest.json')) { if (file_exists(base_dir() . '/manifest.json')) {
echo ' echo '
<link rel="manifest" href="'.base_path().'/manifest.json?r='.random_int(0, mt_getrandmax()).'">'; <link rel="manifest" href="' . base_path() . '/manifest.json?r=' . random_int(0, mt_getrandmax()) . '">';
} }
// CSS // CSS
foreach (App::getAssets()['css'] as $style) { foreach (App::getAssets()['css'] as $style) {
echo ' echo '
<link rel="stylesheet" type="text/css" media="all" href="'.$style.'"/>'; <link rel="stylesheet" type="text/css" media="all" href="' . $style . '"/>';
} }
// Print CSS // Print CSS
foreach (App::getAssets()['print'] as $style) { foreach (App::getAssets()['print'] as $style) {
echo ' echo '
<link rel="stylesheet" type="text/css" media="print" href="'.$style.'"/>'; <link rel="stylesheet" type="text/css" media="print" href="' . $style . '"/>';
} }
if (Auth::check()) { if (Auth::check()) {
@ -67,15 +67,15 @@ if (Auth::check()) {
<script> <script>
search = []'; search = []';
$array = $_SESSION['module_'.$id_module]; $array = $_SESSION['module_' . $id_module];
if (!empty($array)) { if (!empty($array)) {
foreach ($array as $field => $value) { foreach ($array as $field => $value) {
if (!empty($value) && string_starts_with($field, 'search_')) { if (!empty($value) && string_starts_with($field, 'search_')) {
$field_name = str_replace('search_', '', $field); $field_name = str_replace('search_', '', $field);
echo ' echo '
search.push("search_'.$field_name.'"); search.push("search_' . $field_name . '");
search["search_'.$field_name.'"] = "'.addslashes($value).'";'; search["search_' . $field_name . '"] = "' . addslashes($value) . '";';
} }
} }
} }
@ -127,95 +127,95 @@ if (Auth::check()) {
]; ];
foreach ($translations as $key => $value) { foreach ($translations as $key => $value) {
echo ' echo '
'.$key.': "'.addslashes($value).'",'; ' . $key . ': "' . addslashes($value) . '",';
} }
echo ' echo '
allegati: { allegati: {
messaggio: "'.tr('Clicca o trascina qui per caricare uno o più file').'", messaggio: "' . tr('Clicca o trascina qui per caricare uno o più file') . '",
maxFilesize: "'.tr('Dimensione massima: _SIZE_ MB').'", maxFilesize: "' . tr('Dimensione massima: _SIZE_ MB') . '",
errore: "'.tr('Errore').'", errore: "' . tr('Errore') . '",
modifica: "'.tr('Modifica allegato').'", modifica: "' . tr('Modifica allegato') . '",
elimina: "'.tr('Vuoi eliminare questo file?').'", elimina: "' . tr('Vuoi eliminare questo file?') . '",
procedi: "'.tr('Procedi').'", procedi: "' . tr('Procedi') . '",
}, },
ajax: { ajax: {
"missing": { "missing": {
"title": "'.tr('Errore').'", "title": "' . tr('Errore') . '",
"text": "'.tr('Alcuni campi obbligatori non sono stati compilati correttamente').'", "text": "' . tr('Alcuni campi obbligatori non sono stati compilati correttamente') . '",
}, },
"error": { "error": {
"title": "'.tr('Errore').'", "title": "' . tr('Errore') . '",
"text": "'.tr('Errore durante il salvataggio del record').'", "text": "' . tr('Errore durante il salvataggio del record') . '",
} }
}, },
password: { password: {
"wordMinLength": "'.tr('La password è troppo corta').'", "wordMinLength": "' . tr('La password è troppo corta') . '",
"wordMaxLength": "'.tr('La password è troppo lunga').'", "wordMaxLength": "' . tr('La password è troppo lunga') . '",
"wordInvalidChar": "'.tr('La password contiene un carattere non valido').'", "wordInvalidChar": "' . tr('La password contiene un carattere non valido') . '",
"wordNotEmail": "'.tr('Non usare la tua e-mail come password').'", "wordNotEmail": "' . tr('Non usare la tua e-mail come password') . '",
"wordSimilarToUsername": "'.tr('La password non può contenere il tuo nome').'", "wordSimilarToUsername": "' . tr('La password non può contenere il tuo nome') . '",
"wordTwoCharacterClasses": "'.tr('Usa classi di caratteri diversi').'", "wordTwoCharacterClasses": "' . tr('Usa classi di caratteri diversi') . '",
"wordRepetitions": "'.tr('La password contiene ripetizioni').'", "wordRepetitions": "' . tr('La password contiene ripetizioni') . '",
"wordSequences": "'.tr('La password contiene sequenze').'", "wordSequences": "' . tr('La password contiene sequenze') . '",
"errorList": "'.tr('Attenzione').':", "errorList": "' . tr('Attenzione') . ':",
"veryWeak": "'.tr('Molto debole').'", "veryWeak": "' . tr('Molto debole') . '",
"weak": "'.tr('Debole').'", "weak": "' . tr('Debole') . '",
"normal": "'.tr('Normale').'", "normal": "' . tr('Normale') . '",
"medium": "'.tr('Media').'", "medium": "' . tr('Media') . '",
"strong": "'.tr('Forte').'", "strong": "' . tr('Forte') . '",
"veryStrong": "'.tr('Molto forte').'", "veryStrong": "' . tr('Molto forte') . '",
}, },
datatables: { datatables: {
"emptyTable": "'.tr('Nessun dato presente nella tabella').'", "emptyTable": "' . tr('Nessun dato presente nella tabella') . '",
"info": "'.tr('Vista da _START_ a _END_ di _TOTAL_ elementi').'", "info": "' . tr('Vista da _START_ a _END_ di _TOTAL_ elementi') . '",
"infoEmpty": "'.tr('Vista da 0 a 0 di 0 elementi').'", "infoEmpty": "' . tr('Vista da 0 a 0 di 0 elementi') . '",
"infoFiltered": "('.tr('filtrati da _MAX_ elementi totali').')", "infoFiltered": "(' . tr('filtrati da _MAX_ elementi totali') . ')",
"infoPostFix": "", "infoPostFix": "",
"lengthMenu": "'.tr('Visualizza _MENU_ elementi').'", "lengthMenu": "' . tr('Visualizza _MENU_ elementi') . '",
"loadingRecords": " ", "loadingRecords": " ",
"processing": "'.tr('Elaborazione').'...", "processing": "' . tr('Elaborazione') . '...",
"search": "'.tr('Cerca').':", "search": "' . tr('Cerca') . ':",
"zeroRecords": "'.tr('La ricerca non ha portato alcun risultato').'.", "zeroRecords": "' . tr('La ricerca non ha portato alcun risultato') . '.",
"paginate": { "paginate": {
"first": "'.tr('Inizio').'", "first": "' . tr('Inizio') . '",
"previous": "'.tr('Precedente').'", "previous": "' . tr('Precedente') . '",
"next": "'.tr('Successivo').'", "next": "' . tr('Successivo') . '",
"last": "'.tr('Fine').'" "last": "' . tr('Fine') . '"
}, },
}, },
}; };
globals = { globals = {
rootdir: "'.base_path().'", rootdir: "' . base_path() . '",
js: "'.$paths['js'].'", js: "' . $paths['js'] . '",
css: "'.$paths['css'].'", css: "' . $paths['css'] . '",
img: "'.$paths['img'].'", img: "' . $paths['img'] . '",
id_module: "'.$id_module.'", id_module: "' . $id_module . '",
id_record: "'.$id_record.'", id_record: "' . $id_record . '",
is_mobile: '.isMobile().', is_mobile: ' . isMobile() . ',
cifre_decimali: '.setting('Cifre decimali per importi').', cifre_decimali: ' . setting('Cifre decimali per importi') . ',
timestamp_format: "'.formatter()->getTimestampPattern().'", timestamp_format: "' . formatter()->getTimestampPattern() . '",
date_format: "'.formatter()->getDatePattern().'", date_format: "' . formatter()->getDatePattern() . '",
time_format: "'.formatter()->getTimePattern().'", time_format: "' . formatter()->getTimePattern() . '",
decimals: "'.formatter()->getNumberSeparators()['decimals'].'", decimals: "' . formatter()->getNumberSeparators()['decimals'] . '",
thousands: "'.formatter()->getNumberSeparators()['thousands'].'", thousands: "' . formatter()->getNumberSeparators()['thousands'] . '",
currency: "'.currency().'", currency: "' . currency() . '",
search: search, search: search,
translations: translations, translations: translations,
locale: "'.explode('_', $lang)[0].'", locale: "' . explode('_', $lang)[0] . '",
full_locale: "'.$lang.'", full_locale: "' . $lang . '",
start_date: "'.$_SESSION['period_start'].'", start_date: "' . $_SESSION['period_start'] . '",
start_date_formatted: "'.Translator::dateToLocale($_SESSION['period_start']).'", start_date_formatted: "' . Translator::dateToLocale($_SESSION['period_start']) . '",
end_date: "'.$_SESSION['period_end'].'", end_date: "' . $_SESSION['period_end'] . '",
end_date_formatted: "'.Translator::dateToLocale($_SESSION['period_end']).'", end_date_formatted: "' . Translator::dateToLocale($_SESSION['period_end']) . '",
minute_stepping: '.setting('Numero di minuti di avanzamento delle sessioni delle attività').', minute_stepping: ' . setting('Numero di minuti di avanzamento delle sessioni delle attività') . ',
collapse_plugin_sidebar: '.intval(setting('Nascondere la barra dei plugin di default')).', collapse_plugin_sidebar: ' . intval(setting('Nascondere la barra dei plugin di default')) . ',
ckeditorToolbar: [ ckeditorToolbar: [
["Undo","Redo","-","Cut","Copy","Paste","PasteText","PasteFromWord","-","SpellChecker", "Scayt", "-","Link","Unlink","-","Bold","Italic","Underline","Superscript","SpecialChar","HorizontalRule","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","NumberedList","BulletedList","Outdent","Indent","Blockquote","-","Styles","Format","Image","Table", "TextColor", "BGColor", "EmojiPanel" ], ["Undo","Redo","-","Cut","Copy","Paste","PasteText","PasteFromWord","-","SpellChecker", "Scayt", "-","Link","Unlink","-","Bold","Italic","Underline","Superscript","SpecialChar","HorizontalRule","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","NumberedList","BulletedList","Outdent","Indent","Blockquote","-","Styles","Format","Image","Table", "TextColor", "BGColor", "EmojiPanel" ],
@ -238,46 +238,46 @@ if (Auth::check()) {
{ name: "tools", items : [ "Maximize", "ShowBlocks" ] }, { name: "tools", items : [ "Maximize", "ShowBlocks" ] },
{ name: "about", items: [ "About" ] } { name: "about", items: [ "About" ] }
], ],
order_manager_id: "'.($dbo->isInstalled() ? (new Module())->getByField('title', 'Stato dei servizi', Models\Locale::getPredefined()->id) : '').'", order_manager_id: "' . ($dbo->isInstalled() ? (new Module())->getByField('title', 'Stato dei servizi', Models\Locale::getPredefined()->id) : '') . '",
dataload_page_buffer: '.setting('Lunghezza in pagine del buffer Datatables').', dataload_page_buffer: ' . setting('Lunghezza in pagine del buffer Datatables') . ',
tempo_attesa_ricerche: '.setting('Tempo di attesa ricerche in secondi').', tempo_attesa_ricerche: ' . setting('Tempo di attesa ricerche in secondi') . ',
restrict_summables_to_selected: '.setting('Totali delle tabelle ristretti alla selezione').', restrict_summables_to_selected: ' . setting('Totali delle tabelle ristretti alla selezione') . ',
snapDuration: "'.setting('Tempo predefinito di snap attività sul calendario').'" snapDuration: "' . setting('Tempo predefinito di snap attività sul calendario') . '"
}; };
</script>'; </script>';
} else { } else {
echo ' echo '
<script> <script>
globals = { globals = {
rootdir: "'.base_path().'", rootdir: "' . base_path() . '",
search: {}, search: {},
translations: { translations: {
password: { password: {
"wordMinLength": "'.tr('La tua password è troppo corta').'", "wordMinLength": "' . tr('La tua password è troppo corta') . '",
"wordMaxLength": "'.tr('La tua password è troppo lunga').'", "wordMaxLength": "' . tr('La tua password è troppo lunga') . '",
"wordInvalidChar": "'.tr('La tua password contiene un carattere non valido').'", "wordInvalidChar": "' . tr('La tua password contiene un carattere non valido') . '",
"wordNotEmail": "'.tr('Non usare la tua e-mail come password').'", "wordNotEmail": "' . tr('Non usare la tua e-mail come password') . '",
"wordSimilarToUsername": "'.tr('La tua password non può contenere il tuo nome').'", "wordSimilarToUsername": "' . tr('La tua password non può contenere il tuo nome') . '",
"wordTwoCharacterClasses": "'.tr('Usa classi di caratteri diversi').'", "wordTwoCharacterClasses": "' . tr('Usa classi di caratteri diversi') . '",
"wordRepetitions": "'.tr('Troppe ripetizioni').'", "wordRepetitions": "' . tr('Troppe ripetizioni') . '",
"wordSequences": "'.tr('La tua password contiene sequenze').'", "wordSequences": "' . tr('La tua password contiene sequenze') . '",
"errorList": "'.tr('Errori').':", "errorList": "' . tr('Errori') . ':",
"veryWeak": "'.tr('Molto debole').'", "veryWeak": "' . tr('Molto debole') . '",
"weak": "'.tr('Debole').'", "weak": "' . tr('Debole') . '",
"normal": "'.tr('Normale').'", "normal": "' . tr('Normale') . '",
"medium": "'.tr('Media').'", "medium": "' . tr('Media') . '",
"strong": "'.tr('Forte').'", "strong": "' . tr('Forte') . '",
"veryStrong": "'.tr('Molto forte').'", "veryStrong": "' . tr('Molto forte') . '",
}, },
}, },
timestamp_format: "'.formatter()->getTimestampPattern().'", timestamp_format: "' . formatter()->getTimestampPattern() . '",
date_format: "'.formatter()->getDatePattern().'", date_format: "' . formatter()->getDatePattern() . '",
time_format: "'.formatter()->getTimePattern().'", time_format: "' . formatter()->getTimePattern() . '",
locale: "'.explode('_', $lang)[0].'", locale: "' . explode('_', $lang)[0] . '",
full_locale: "'.$lang.'", full_locale: "' . $lang . '",
}; };
</script>'; </script>';
} }
@ -285,7 +285,7 @@ if (Auth::check()) {
// JS // JS
foreach (App::getAssets()['js'] as $js) { foreach (App::getAssets()['js'] as $js) {
echo ' echo '
<script type="text/javascript" charset="utf-8" src="'.$js.'"></script>'; <script type="text/javascript" charset="utf-8" src="' . $js . '"></script>';
} }
// Impostazioni di default per gli alert // Impostazioni di default per gli alert
@ -295,7 +295,7 @@ echo '
buttonsStyling: false, buttonsStyling: false,
confirmButtonClass: "btn btn-lg btn-primary", confirmButtonClass: "btn btn-lg btn-primary",
cancelButtonClass: "btn btn-lg", cancelButtonClass: "btn btn-lg",
cancelButtonText: "'.tr('Annulla').'", cancelButtonText: "' . tr('Annulla') . '",
}); });
</script>'; </script>';
@ -308,7 +308,7 @@ if (Auth::check()) {
} }
if (setting('Attiva scorciatoie da tastiera')) { if (setting('Attiva scorciatoie da tastiera')) {
echo '<script type="text/javascript" charset="utf-8" src="'.App::getPaths()['js'].'/hotkeys-js/hotkeys.min.js?v='.$version.'"></script>'; echo '<script type="text/javascript" charset="utf-8" src="' . App::getPaths()['js'] . '/hotkeys-js/hotkeys.min.js?v=' . $version . '"></script>';
echo ' echo '
<script> <script>
@ -350,19 +350,18 @@ $hide_sidebar = Auth::check() && (setting('Nascondere la barra sinistra di defau
echo ' echo '
</head> </head>
<body class="sidebar-mini skin-'.$theme.(!empty($hide_sidebar) ? ' sidebar-collapse' : '').(!Auth::check() ? ' hold-transition login-page' : '').'"> <body class="sidebar-mini layout-fixed skin-' . $theme . (!empty($hide_sidebar) ? ' sidebar-collapse' : '') . (!Auth::check() ? ' hold-transition login-page' : '') . '">
<div class="'.(!Auth::check() ? '' : 'wrapper').'">'; <div class="' . (!Auth::check() ? '' : 'wrapper') . '">';
if (Auth::check()) { if (Auth::check()) {
$calendar_color_label = ($_SESSION['period_start'] != date('Y').'-01-01' || $_SESSION['period_end'] != date('Y').'-12-31') ? 'danger' : 'default'; $calendar_color_label = ($_SESSION['period_start'] != date('Y') . '-01-01' || $_SESSION['period_end'] != date('Y') . '-12-31') ? 'danger' : 'secondary';
echo ' echo '
<!-- Loader principale --> <!-- Loader principale -->
<div id="main_loading"> <!-- Preloader -->
<div> <div id="main_loading" class="preloader flex-column justify-content-center align-items-center">
<i class="fa fa-cog fa-spin text-danger"></i> <img class="animation__shake" src="'.$rootdir.'/assets/dist/img/logo.png" alt="OSM" height="60" width="60">
</div> </div>
</div>
<!-- Loader secondario --> <!-- Loader secondario -->
<div id="mini-loader" style="display:none;"> <div id="mini-loader" style="display:none;">
@ -372,137 +371,131 @@ if (Auth::check()) {
<!-- Loader senza overlay --> <!-- Loader senza overlay -->
<div id="tiny-loader" style="display:none;"></div> <div id="tiny-loader" style="display:none;"></div>
<nav class="main-header navbar navbar-expand"> <!-- Navbar -->
<a href="'.tr('https://www.openstamanager.com').'" class="navbar-brand brand-link" title="'.tr("Il gestionale open source per l'assistenza tecnica e la fatturazione").'" target="_blank"> <nav class="main-header navbar navbar-expand navbar-white navbar-light">
<!-- mini logo for sidebar mini 50x50 pixels --> <ul class="navbar-nav">
<span class="brand-link-mini">'.tr('OSM').'</span> <li class="nav-item">
<!-- logo for regular state and mobile devices --> <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fa fa-bars"></i></a>
<span class="brand-link-lg">'.tr('OpenSTAManager').'</span> </li>
</a>
<!-- Header Navbar: style can be found in header.less -->
<!-- Sidebar toggle button--> <li class="nav-item">
<ul class="navbar-nav"><li class="nav-item"><a class="nav-link" data-widget="pushmenu" href="#"><i class="fa fa-bars"></i></a></li></ul> <a href="#" id="daterange" class="nav-link" role="button">
<i class="fa fa-calendar"></i> <i class="fa fa-caret-down"></i>
<!-- Navbar Left Menu --> </a>
<div class="navbar-left"> </li>
<ul class="navbar-nav ml-auto"> <li class="nav-item d-none d-sm-inline-block">
<li class="nav-item"> <a class="nav-link text-' . $calendar_color_label . '">
<a href="#" id="daterange" class="nav-link" role="button"> ' . Translator::dateToLocale($_SESSION['period_start']) . ' - ' . Translator::dateToLocale($_SESSION['period_end']) . '
<i class="fa fa-calendar" style="color:inherit"></i> <i class="fa fa-caret-down" style="color:inherit"></i> </a>
</a> </li>
</li> </ul>
<li class="nav-item">
<a style="cursor:default;padding:0px;padding-right:5px;padding-left:5px;margin-top:15px;" class="badge bg-'.$calendar_color_label.'">
<'.Translator::dateToLocale($_SESSION['period_start']) . ' - ' . Translator::dateToLocale($_SESSION['period_end']).'>
</a>
</li>
</ul>
</div>
<!-- Navbar Right Menu --> <!-- Navbar Right Menu -->
<ul class="navbar-nav ml-auto">'; <ul class="navbar-nav ml-auto">';
// Visualizzo gli hooks solo se non sono stati disabilitati // Visualizzo gli hooks solo se non sono stati disabilitati
if (!$config['disable_hooks']) { if (!$config['disable_hooks']) {
echo ' echo '
<li class="nav-item dropdown"> <div class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown"> <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-bell-o"></i> <i class="fa fa-bell-o"></i>
<span id="hooks-badge" class="badge badge-warning"> <span id="hooks-badge" class="badge badge-warning">
<span id="hooks-loading"><i class="fa fa-spinner fa-spin"></i></span> <span id="hooks-loading"><i class="fa fa-spinner fa-spin"></i></span>
<span id="hooks-notified"></span> <span id="hooks-notified"></span>
<span id="hooks-counter" class="d-none">0</span> <span id="hooks-counter" class="d-none">0</span>
<span id="hooks-number" class="d-none">0</span> <span id="hooks-number" class="d-none">0</span>
</span> </span>
</a>
<div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
<a href="#" class="dropdown-item">
<span class="small" id="hooks-header"></span>
</a> </a>
<ul class="dropdown-menu"> <div id="hooks"></div>
<li class="nav-item"> </div>
<ul class="menu" id="hooks"> </div>';
<li class="nav-item">
<a href="#" class="nav-link">
<span class="small" id="hooks-header"></span>
</a>
</li>
</ul>
</li>
</ul>
</li>';
} }
echo ' echo '
<li class="nav-item"> <li class="nav-item">
<a href="#" onclick="window.print()" class="nav-link" title="'.tr('Stampa').'"> <a href="#" onclick="window.print()" class="nav-link" title="' . tr('Stampa') . '">
<i class="fa fa-print nav-icon"></i> <i class="fa fa-print nav-icon"></i>
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a href="'.base_path().'/log.php" class="nav-link" title="'.tr('Log accessi').'"> <a href="' . base_path() . '/log.php" class="nav-link" title="' . tr('Log accessi') . '">
<i class="fa fa-book nav-icon"></i> <i class="fa fa-book nav-icon"></i>
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a href="'.base_path().'/shortcuts.php" class="nav-link" title="'.tr('Scorciatoie').'"> <a href="' . base_path() . '/shortcuts.php" class="nav-link" title="' . tr('Scorciatoie') . '">
<i class="fa fa-keyboard-o nav-icon"></i> <i class="fa fa-keyboard-o nav-icon"></i>
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a href="'.base_path().'/info.php" class="nav-link" title="'.tr('Informazioni').'"> <a href="' . base_path() . '/info.php" class="nav-link" title="' . tr('Informazioni') . '">
<i class="fa fa-info nav-icon"></i> <i class="fa fa-info nav-icon"></i>
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a href="'.base_path().'/index.php?op=logout" onclick="sessionStorage.clear()" class="nav-link bg-danger" title="'.tr('Esci').'"> <a href="' . base_path() . '/index.php?op=logout" onclick="sessionStorage.clear()" class="nav-link bg-danger" title="' . tr('Esci') . '">
<i class="fa fa-power-off nav-icon"></i> <i class="fa fa-power-off nav-icon"></i>
</a> </a>
</li> </li>
</ul> </ul>
</div> </nav>
</nav> <!-- /.navbar -->
</header>
<aside class="main-sidebar sidebar-dark-primary"> <!-- Main Sidebar Container -->
<div class="sidebar os-host os-theme-light os-host-overflow os-host-overflow-y os-host-resize-disabled os-host-transition os-host-scrollbar-horizontal-hidden"> <aside class="main-sidebar sidebar-dark-primary elevation-4">
<a href="' . tr('https://www.openstamanager.com') . '" class="brand-link" title="' . tr("Il gestionale open source per l'assistenza tecnica e la fatturazione") . '" target="_blank">
<img src="' . $rootdir . '/assets/dist/img/logo_completo.png" alt="' . tr("Il gestionale open source per l'assistenza tecnica e la fatturazione") . '" class="img-fluid">
<span class="brand-text font-weight-light">&nbsp;</span>
</a>
<!-- Sidebar user panel --> <!-- Sidebar -->
<div class="user-panel mt-3 pb-3 mb-3 text-center info"> <div class="sidebar">
<div class="info">
<p><a href="'.base_path().'/modules/utenti/info.php"> <!-- Sidebar user panel (optional) -->
'.$user['username'].' <div class="user-panel mt-3 pb-3 mb-3 d-flex">
</a></p> <div class="image">';
<p id="datetime"></p>
</div>
<a class="image" href="'.base_path().'/modules/utenti/info.php">';
$user_photo = $user->photo; $user_photo = $user->photo;
if ($user_photo) { if ($user_photo) {
echo ' echo '
<img src="'.$user_photo.'" class="img-circle pull-left" alt="'.$user['username'].'" />'; <img src="' . $user_photo . '" class="img-circle elevation-2" alt="' . $user['username'] . '" />';
} else { } else {
echo ' echo '
<i class="fa fa-user-circle-o fa-3x pull-left" alt="'.tr('OpenSTAManager').'"></i>'; <i class="fa fa-user-circle-o fa-2x text-light" alt="' . tr('Utente') . '"></i>';
} }
echo ' echo '
</a> </div>
<div class="info">
<a href="' . base_path() . '/modules/utenti/info.php" class="d-block">
' . $user['username'] . '
</a>
</div>
</div> </div>
<!-- search form -->
<div class="sidebar-form"> <!-- SidebarSearch Form -->
<div class="input-group"> <div class="form-inline">
<input type="text" name="q" class="form-control" id="supersearch" placeholder="'.tr('Cerca').'"/> <div class="input-group" data-widget="sidebar-search">
<input class="form-control form-control-sidebar" id="supersearch" type="search" placeholder="' . tr('Cerca') . '" aria-label="' . tr('Cerca') . '">
<div class="input-group-append"> <div class="input-group-append">
<button class="btn btn-flat" id="search-btn" name="search" type="submit"> <button class="btn btn-sidebar">
<i class="fa fa-search"></i> <i class="fa fa-search fa-fw"></i>
</button> </button>
</div> </div>
</div> </div>
</div> </div>
<!-- /.search form -->
<!-- Sidebar Menu -->
<nav class="mt-2">
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu">'; <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu">';
echo Modules::getMainMenu(); echo Modules::getMainMenu();
echo ' echo '
@ -515,79 +508,79 @@ if (Auth::check()) {
// Menu laterale per la visualizzazione dei plugin // Menu laterale per la visualizzazione dei plugin
echo ' echo '
<aside class="control-sidebar control-sidebar-light"> <aside class="control-sidebar control-sidebar-light">
<h4><i class="fa fa-plug"></i> '.tr('Plugin').'</h4> <h4><i class="fa fa-plug"></i> ' . tr('Plugin') . '</h4>
<ul class="nav nav-tabs nav-pills nav-stacked"> <ul class="nav nav-tabs nav-pills nav-stacked">
<li data-toggle="control-sidebar" class="active btn-default nav-item"> <li data-toggle="control-sidebar" class="active btn-default nav-item">
<a class="nav-link" data-toggle="tab" href="#tab_0"> <a class="nav-link" data-toggle="tab" href="#tab_0">
'.$structure->getTranslation('title').' ' . $structure->getTranslation('title') . '
</a> </a>
</li>'; </li>';
// Tab dei plugin // Tab dei plugin
if (!empty($id_record)) { if (!empty($id_record)) {
$plugins = $dbo->fetchArray('SELECT `zz_plugins`.`id`, `title`, `options`, `options2` FROM `zz_plugins` LEFT JOIN `zz_plugins_lang` ON (`zz_plugins`.`id` = `zz_plugins_lang`.`id_record` AND `zz_plugins_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `idmodule_to`='.prepare($id_module)." AND `position`='tab' AND `enabled` = 1 ORDER BY `zz_plugins`.`order` DESC"); $plugins = $dbo->fetchArray('SELECT `zz_plugins`.`id`, `title`, `options`, `options2` FROM `zz_plugins` LEFT JOIN `zz_plugins_lang` ON (`zz_plugins`.`id` = `zz_plugins_lang`.`id_record` AND `zz_plugins_lang`.`id_lang` = ' . prepare(Models\Locale::getDefault()->id) . ') WHERE `idmodule_to`=' . prepare($id_module) . " AND `position`='tab' AND `enabled` = 1 ORDER BY `zz_plugins`.`order` DESC");
foreach ($plugins as $plugin) { foreach ($plugins as $plugin) {
// Badge count per record plugin // Badge count per record plugin
$count = 0; $count = 0;
$opt = ''; $opt = '';
if (!empty($plugin['options2'])) { if (!empty($plugin['options2'])) {
$opt = json_decode($plugin['options2'], true); $opt = json_decode($plugin['options2'], true);
} elseif (!empty($plugin['options'])) { } elseif (!empty($plugin['options'])) {
$opt = json_decode($plugin['options'], true); $opt = json_decode($plugin['options'], true);
} }
if (!empty($opt)) { if (!empty($opt)) {
$q = str_replace('|id_parent|', $id_record, $opt['main_query'][0]['query']); $q = str_replace('|id_parent|', $id_record, $opt['main_query'][0]['query']);
$count = $dbo->fetchNum($q); $count = $dbo->fetchNum($q);
} }
echo ' echo '
<li data-widget="control-sidebar" class="btn-default nav-item" > <li data-widget="control-sidebar" class="btn-default nav-item" >
<a class="nav-link" data-widget="tab" href="#tab_'.$plugin['id'].'" id="link-tab_'.$plugin['id'].'"> <a class="nav-link" data-widget="tab" href="#tab_' . $plugin['id'] . '" id="link-tab_' . $plugin['id'] . '">
'.$plugin['title'].' ' . $plugin['title'] . '
<span class="right badge badge-danger">'.($count > 0 ? $count : '').'</span> <span class="right badge badge-danger">' . ($count > 0 ? $count : '') . '</span>
</a> </a>
</li>'; </li>';
} }
} }
// Tab per le note interne // Tab per le note interne
if ($structure->permission != '-' && $structure->use_notes) { if ($structure->permission != '-' && $structure->use_notes) {
$notes = $structure->recordNotes($id_record); $notes = $structure->recordNotes($id_record);
echo ' echo '
<li data-widget="control-sidebar" class="btn-default"> <li data-widget="control-sidebar" class="btn-default">
<a class="bg-info" data-widget="tab" href="#tab_note" id="link-tab_note"> <a class="bg-info" data-widget="tab" href="#tab_note" id="link-tab_note">
<'.tr('Note interne').' <' . tr('Note interne') . '
<span class="badge pull-right">'.($notes->count() ?: '').'</span> <span class="badge pull-right">' . ($notes->count() ?: '') . '</span>
</a> </a>
</li>'; </li>';
} }
// Tab per le checklist // Tab per le checklist
if ($structure->permission != '-' && $structure->use_checklists) { if ($structure->permission != '-' && $structure->use_checklists) {
$checklists_unchecked = $structure->recordChecks($id_record)->where('checked_at', null); $checklists_unchecked = $structure->recordChecks($id_record)->where('checked_at', null);
$checklists_total = $structure->recordChecks($id_record); $checklists_total = $structure->recordChecks($id_record);
echo ' echo '
<li data-widget="control-sidebar" class="btn-default"> <li data-widget="control-sidebar" class="btn-default">
<a class="bg-info" data-widget="tab" href="#tab_checks" id="link-tab_checks"> <a class="bg-info" data-widget="tab" href="#tab_checks" id="link-tab_checks">
<'.tr('Checklist').' <' . tr('Checklist') . '
<'.($checklists_total->count() > 0) ? '<span class="badge pull-right">'.$checklists_unchecked->count().tr(' / ').$checklists_total->count().'</span>' : ''.' <' . ($checklists_total->count() > 0) ? '<span class="badge pull-right">' . $checklists_unchecked->count() . tr(' / ') . $checklists_total->count() . '</span>' : '' . '
</a> </a>
</li>'; </li>';
} }
// Tab per le informazioni sulle operazioni // Tab per le informazioni sulle operazioni
if (Auth::admin()) { if (Auth::admin()) {
echo ' echo '
<li data-widget="control-sidebar" class="btn-default"> <li data-widget="control-sidebar" class="btn-default">
<a class="bg-info" data-widget="tab" href="#tab_info" id="link-tab_info"> <a class="bg-info" data-widget="tab" href="#tab_info" id="link-tab_info">
<'.tr('Info').' <' . tr('Info') . '
</a> </a>
</li>'; </li>';
} }
echo' echo '
</ul> </ul>
</aside> </aside>
@ -595,12 +588,9 @@ if (Auth::check()) {
} }
echo ' echo '
<!-- Right side column. Contains the navbar and content of the page --> <!-- Main content -->
<aside class="content-wrapper"> <div class="content-wrapper">
<section class="content">';
<!-- Main content -->
<section class="content">
<div class="row">';
if (string_contains($_SERVER['SCRIPT_FILENAME'], 'editor.php')) { if (string_contains($_SERVER['SCRIPT_FILENAME'], 'editor.php')) {
$location = 'editor_right'; $location = 'editor_right';
@ -608,9 +598,6 @@ if (Auth::check()) {
$location = 'controller_right'; $location = 'controller_right';
} }
echo '
<div class="col-md-12">';
// Eventuale messaggio personalizzato per l'installazione corrente // Eventuale messaggio personalizzato per l'installazione corrente
$extra_file = App::filepath('include/custom/extra', 'extra.php'); $extra_file = App::filepath('include/custom/extra', 'extra.php');
if ($extra_file) { if ($extra_file) {
@ -627,7 +614,7 @@ if (Auth::check()) {
echo ' echo '
<div class="card card-warning card-center"> <div class="card card-warning card-center">
<div class="card-header with-border text-center"> <div class="card-header with-border text-center">
<h3 class="card-title">'.tr('Informazioni').'</h3> <h3 class="card-title">' . tr('Informazioni') . '</h3>
</div> </div>
<div class="card-body">'; <div class="card-body">';
@ -640,7 +627,7 @@ if (!empty($messages['info'])) {
echo ' echo '
<script> <script>
$(document).ready( function(){ $(document).ready( function(){
window.parent.toastr.success("'.$value.'", toastr.options); window.parent.toastr.success("' . $value . '", toastr.options);
}); });
</script>'; </script>';
} }
@ -651,8 +638,8 @@ if (!empty($messages['error'])) {
foreach ($messages['error'] as $value) { foreach ($messages['error'] as $value) {
echo ' echo '
<div class="alert alert-danger push"> <div class="alert alert-danger push">
<h4><i class="icon fa fa fa-ban"></i> '.tr('Errore').'</h4> <h4><i class="icon fa fa fa-ban"></i> ' . tr('Errore') . '</h4>
'.$value.' ' . $value . '
</div>'; </div>';
} }
} }
@ -662,8 +649,8 @@ if (!empty($messages['warning'])) {
foreach ($messages['warning'] as $value) { foreach ($messages['warning'] as $value) {
echo ' echo '
<div class="alert alert-warning push"> <div class="alert alert-warning push">
<h4><i class="icon fa fa-warning"></i> '.tr('Attenzione').'</h4> <h4><i class="icon fa fa-warning"></i> ' . tr('Attenzione') . '</h4>
'.$value.' ' . $value . '
</div>'; </div>';
} }
} }
@ -681,12 +668,12 @@ if ($free_space < ($space_limit * (1024 ** 3))) {
echo ' echo '
<div class="callout callout-warning"> <div class="callout callout-warning">
<h4> <h4>
<i class="fa fa-warning"></i> '.tr('Spazio in esaurimento').' <i class="fa fa-warning"></i> ' . tr('Spazio in esaurimento') . '
</h4> </h4>
<p>'.tr('Lo spazio a disposizione del gestionale è in esaurimento: sono al momento disponibili _TOT_', [ <p>' . tr('Lo spazio a disposizione del gestionale è in esaurimento: sono al momento disponibili _TOT_', [
'_TOT_' => FileSystem::formatBytes($free_space), '_TOT_' => FileSystem::formatBytes($free_space),
]).'.</p> ]) . '.</p>
<p>'.tr('Questo può risultare un serio problema per la continuità di funzionamento del software, poiché le operazioni più espansive che richiedono spazio di archiviazione possono causare malfunzionamenti imprevisti').'. '.tr('Ad esempio, le attività di backup, caricamento di allegati o anche l\'utilizzo normale del gestionale potrebbero rendere i dati inaffidabili, provocando pertanto una perdita delle informazioni salvate').'.</p> <p>' . tr('Questo può risultare un serio problema per la continuità di funzionamento del software, poiché le operazioni più espansive che richiedono spazio di archiviazione possono causare malfunzionamenti imprevisti') . '. ' . tr('Ad esempio, le attività di backup, caricamento di allegati o anche l\'utilizzo normale del gestionale potrebbero rendere i dati inaffidabili, provocando pertanto una perdita delle informazioni salvate') . '.</p>
<p>'.tr('Contatta gli amministratori di sistema per risolvere al più presto il problema').'.</p> <p>' . tr('Contatta gli amministratori di sistema per risolvere al più presto il problema') . '.</p>
</div>'; </div>';
} }

View File

@ -241,16 +241,16 @@ class WidgetManager implements ManagerInterface
// Generazione del codice HTML // Generazione del codice HTML
if (!empty($widgets)) { if (!empty($widgets)) {
$result = ' $result = '
<ul class="row widget" id="widget-'.$options['position'].'" data-class="">'; <div class="row widget" id="widget-'.$options['position'].'" data-class="">';
// Aggiungo ad uno ad uno tutti i widget // Aggiungo ad uno ad uno tutti i widget
foreach ($widgets as $widget) { foreach ($widgets as $widget) {
if ($widget['id_module'] == $database->fetchOne('SELECT `id_record` FROM `zz_modules_lang` WHERE `title` = "Stato dei servizi" AND `id_lang` = '.prepare(\Models\Locale::getDefault()->id).'')['id']) { if ($widget['id_module'] == $database->fetchOne('SELECT `id_record` FROM `zz_modules_lang` WHERE `title` = "Stato dei servizi" AND `id_lang` = '.prepare(\Models\Locale::getDefault()->id).'')['id']) {
$result .= ' $result .= '
<li class="col-sm-6 col-md-4 li-widget" id="widget_'.$widget['id'].'" style="height:100% !important;" data-id="'.$widget['id'].'">'; <div class="col-md-3 col-sm-6 col-12 li-widget" id="widget_'.$widget['id'].'" data-id="'.$widget['id'].'">';
} else { } else {
$result .= ' $result .= '
<li class="col-sm-6 '.($widget['class'] ?: setting('Dimensione widget predefinita')).' li-widget" id="widget_'.$widget['id'].'" data-id="'.$widget['id'].'">'; <div class="col-sm-6 '.($widget['class'] ?: setting('Dimensione widget predefinita')).' li-widget" id="widget_'.$widget['id'].'" data-id="'.$widget['id'].'">';
} }
$info = array_merge($options, [ $info = array_merge($options, [
'id' => $widget['id'], 'id' => $widget['id'],
@ -258,11 +258,11 @@ class WidgetManager implements ManagerInterface
$result .= $this->widget($info); $result .= $this->widget($info);
$result .= ' $result .= '
</li>'; </div>';
} }
$result .= ' $result .= '
</ul>'; </div>';
} }
return $result; return $result;