From 5cd74c4d1d325b6f4ceb44a1b43cf3b7286c328d Mon Sep 17 00:00:00 2001 From: Matteo Date: Fri, 19 May 2023 13:19:19 +0200 Subject: [PATCH] Fix su stampa settimanale calendario --- ...tampa_calendario_settimanale.dashboard.php | 2 +- templates/dashboard_settimanale/body.php | 46 +++++++++++++++---- 2 files changed, 37 insertions(+), 11 deletions(-) diff --git a/modules/dashboard/widgets/stampa_calendario_settimanale.dashboard.php b/modules/dashboard/widgets/stampa_calendario_settimanale.dashboard.php index 4664b9c32..52568eae1 100644 --- a/modules/dashboard/widgets/stampa_calendario_settimanale.dashboard.php +++ b/modules/dashboard/widgets/stampa_calendario_settimanale.dashboard.php @@ -37,7 +37,7 @@ echo '
- {[ "type": "select", "label": "'.tr('Orientamento').'", "name": "orientation", "required": "1", "values": "list=\"L\": \"'.tr('Orizzontale').'\", \"P\": \"'.tr('Verticale').'\"", "value": "'.$_SESSION['dashboard']['orientation'].'" ]} + {[ "type": "select", "label": "'.tr('Orientamento').'", "name": "orientation", "required": "1", "values": "list=\"L\": \"'.tr('Orizzontale').'\"", "value": "'.$_SESSION['dashboard']['orientation'].'" ]}
diff --git a/templates/dashboard_settimanale/body.php b/templates/dashboard_settimanale/body.php index 71b53e151..b888cad39 100644 --- a/templates/dashboard_settimanale/body.php +++ b/templates/dashboard_settimanale/body.php @@ -21,6 +21,34 @@ include_once __DIR__.'/../../core.php'; use Carbon\Carbon; +?> + +lessThan($max_date)) { // Stampa della tabella echo ' -'; +
'; $count = count($list); for ($i = 0; $i < $count; $i = $i + 7) { echo ' -
'; +
'; for ($c = 0; $c < 7; ++$c) { $element = $list[$i + $c]; echo ' -
'; +
'.ucfirst($element['date']->formatLocalized('%A %d/%m')).'
'; } echo ' - '; + '; echo ' - '; +
'; for ($c = 0; $c < 7; ++$c) { $element = $list[$i + $c]; @@ -118,12 +144,12 @@ for ($i = 0; $i < $count; $i = $i + 7) { } echo ' -
'; +
'.(!empty($clienti)?$clienti:' ').'
'; } echo ' - '; + '; } echo ' -
'.ucfirst($element['date']->formatLocalized('%A %d/%m')).'
'.$clienti.'
'; +';