diff --git a/assets/src/css/style.css b/assets/src/css/style.css index 92f315d3d..97bf328da 100755 --- a/assets/src/css/style.css +++ b/assets/src/css/style.css @@ -322,6 +322,7 @@ span.form-control { .widget li { margin-left: 0; list-style-type: none; + height: 106px; } .widget { diff --git a/src/HTMLBuilder/Manager/WidgetManager.php b/src/HTMLBuilder/Manager/WidgetManager.php index 4676735da..efcdc5558 100755 --- a/src/HTMLBuilder/Manager/WidgetManager.php +++ b/src/HTMLBuilder/Manager/WidgetManager.php @@ -245,11 +245,11 @@ class WidgetManager implements ManagerInterface // Generazione del codice HTML if (!empty($widgets)) { - $row_max = count($widgets); - if ($row_max > 4) { - $row_max = 4; - } elseif ($row_max < 2) { - $row_max = 2; + $row_max = setting('Numero massimo Widget per riga'); + if ($row_max > 6) { + $row_max = 6; + } elseif ($row_max < 1) { + $row_max = 1; } $result = ' diff --git a/update/2_4_40.sql b/update/2_4_40.sql index e8beb48f6..33c96f32c 100644 --- a/update/2_4_40.sql +++ b/update/2_4_40.sql @@ -119,4 +119,12 @@ WHERE GROUP BY `descrizione` HAVING - 2=2" WHERE `name` = 'Pagamenti'; \ No newline at end of file + 2=2" WHERE `name` = 'Pagamenti'; + +-- Aggiunta impostazione Numero massimo widget per colonna +INSERT INTO zz_settings(nome, valore, tipo, editable, sezione) VALUES ('Numero massimo Widget per riga','6','list[1,2,3,4,6]','1','Generali'); + +-- Modifica widget Magazzino +UPDATE `zz_widgets` SET `query` = 'SELECT REPLACE(REPLACE(REPLACE(FORMAT(SUM(qta),2), ",", "#"), ".", ","), "#", ".") AS dato FROM mg_articoli WHERE qta>0 AND deleted_at IS NULL AND servizio=0 AND 1=1' WHERE `zz_widgets`.`name` = 'Articoli in magazzino'; +UPDATE `zz_widgets` SET `text` = 'Unità' WHERE `zz_widgets`.`name` = 'Articoli in magazzino'; +UPDATE `zz_widgets` SET `text` = 'Valore' WHERE `zz_widgets`.`name` = 'Valore magazzino'; \ No newline at end of file