From 61ae182ba7a009da775535e557915698c9dc4b9f Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Fri, 29 Mar 2024 11:40:08 +0100 Subject: [PATCH] update updater to latest stable release; refactored modal-action-button for UI fixed Signed-off-by: Michael Kaufmann --- install/updates/froxlor/update_2.1.inc.php | 10 +++++ install/updates/froxlor/update_2.2.inc.php | 2 +- templates/Froxlor/table/macros.html.twig | 46 +++++++++++++--------- templates/Froxlor/table/table.html.twig | 8 ++++ 4 files changed, 47 insertions(+), 19 deletions(-) diff --git a/install/updates/froxlor/update_2.1.inc.php b/install/updates/froxlor/update_2.1.inc.php index 7c65b587..3b982ea0 100644 --- a/install/updates/froxlor/update_2.1.inc.php +++ b/install/updates/froxlor/update_2.1.inc.php @@ -237,3 +237,13 @@ if (Froxlor::isFroxlorVersion('2.1.5')) { Update::showUpdateStep("Updating from 2.1.5 to 2.1.6", false); Froxlor::updateToVersion('2.1.6'); } + +if (Froxlor::isFroxlorVersion('2.1.6')) { + Update::showUpdateStep("Updating from 2.1.6 to 2.1.7", false); + Froxlor::updateToVersion('2.1.7'); +} + +if (Froxlor::isFroxlorVersion('2.1.7')) { + Update::showUpdateStep("Updating from 2.1.7 to 2.1.8", false); + Froxlor::updateToVersion('2.1.8'); +} diff --git a/install/updates/froxlor/update_2.2.inc.php b/install/updates/froxlor/update_2.2.inc.php index 19b975c6..f81f127b 100644 --- a/install/updates/froxlor/update_2.2.inc.php +++ b/install/updates/froxlor/update_2.2.inc.php @@ -35,7 +35,7 @@ if (!defined('_CRON_UPDATE')) { } } -if (Froxlor::isFroxlorVersion('2.1.6')) { +if (Froxlor::isFroxlorVersion('2.1.8')) { Update::showUpdateStep("Enhancing virtual email table"); Database::query("ALTER TABLE `" . TABLE_MAIL_VIRTUAL . "` ADD `spam_tag_level` float(4,1) NOT NULL DEFAULT 7.0;"); Database::query("ALTER TABLE `" . TABLE_MAIL_VIRTUAL . "` ADD `spam_kill_level` float(4,1) NOT NULL DEFAULT 14.0;"); diff --git a/templates/Froxlor/table/macros.html.twig b/templates/Froxlor/table/macros.html.twig index c006f4bd..3a8e4910 100644 --- a/templates/Froxlor/table/macros.html.twig +++ b/templates/Froxlor/table/macros.html.twig @@ -52,25 +52,8 @@ {{ data.text }} {% endif %} - {% if data.modal is defined and data.modal is iterable %} - - {% endif %} {% endapply %} + {# the modal-markup if any will be generated using actions_modal()-macro after the table itself #} {% endmacro %} {% macro domainWithSan(data) %} @@ -90,3 +73,30 @@ {% endif %} {% endfor %} {% endmacro %} + +{% macro actions_modal(data) %} + {% for action in data %} + {% if action.visible is not defined or action.visible is defined and action.visible %} + {% apply spaceless %} + {% if action.modal is defined and action.modal is iterable %} + + {% endif %} + {% endapply %} + {% endif %} + {% endfor %} +{% endmacro %} diff --git a/templates/Froxlor/table/table.html.twig b/templates/Froxlor/table/table.html.twig index 6b8ac96b..3c4384cb 100644 --- a/templates/Froxlor/table/table.html.twig +++ b/templates/Froxlor/table/table.html.twig @@ -64,6 +64,14 @@ {{ pagination.paging(listing.pagination) }} {% endif %} + {# handle potential modal-html if defined by actions #} + {% for tr in listing.table.tr %} + {% for td in tr.td %} + {% if td.data is iterable and td.data.macro == 'actions' %} + {{ macros.actions_modal(td.data.data) }} + {% endif %} + {% endfor %} + {% endfor %} {% endif %}