From 1c240efec6e062c73bebb989192e655dac7e136b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20B=C3=B6sch?= Date: Sun, 5 Nov 2023 21:18:35 +0100 Subject: [PATCH] Improvement: Add the option to oppress the footer butto, solves #444. --- CHANGES.md | 1 + README.md | 4 +++ lang/en/theme_boost_union.php | 6 ++++ layout/includes/staticpages.php | 5 ++++ settings.php | 14 ++++++++++ templates/theme_boost/footer.mustache | 3 ++ ...boost_union_contentsettings_footer.feature | 28 +++++++++++++++++++ 7 files changed, 61 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 8f20c6daf10..12047868b74 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,7 @@ Changes ### Unreleased +* 2023-11-05 - Improvement: Option to suppress footer button, solves #444. * 2023-10-09 - Improvement: Add a direct 'view course' icon on the course management pages, solves #129. * 2023-10-05 - Improvement: Allow the admin to set the background-position of the background and login background images, solves #111. * 2023-11-03 - Bugfix: Add missing cachedef strings to the language pack, solves #441. diff --git a/README.md b/README.md index 958cfa83767..690a5428e38 100644 --- a/README.md +++ b/README.md @@ -379,6 +379,10 @@ In this tab there are the following settings: Whatever you add to this textarea will be displayed at the end of a page, in the footer. Refer to the setting description on the settings page for further instructions. +###### Footer + +With these settings, you can suppress the footer (circle containing the question mark) button. + #### Tab "Static pages" In this tab there are the following settings: diff --git a/lang/en/theme_boost_union.php b/lang/en/theme_boost_union.php index 9d1e26286aa..4dcdb6aa568 100644 --- a/lang/en/theme_boost_union.php +++ b/lang/en/theme_boost_union.php @@ -439,6 +439,12 @@ // ... ... Setting: Footnote. $string['footnotesetting'] = 'Footnote'; $string['footnotesetting_desc'] = 'Whatever you add to this textarea will be displayed at the end of a page, in the footer (not the floating footer) on every page which uses the layouts "drawers", "columns2" or "login". Content in this area could be for example the copyright, the terms of use or the name of your organisation.
If you want to remove the footnote again, just empty the text area.'; +// ... Section: Footer. +$string['footerheading'] = 'Footer'; +// ... ... Setting: Footer. +$string['enablefooterbutton'] = 'Enable footer'; +$string['enablefooterbutton_desc'] = 'With "footer", the circle containing the question mark at the bottom of the page is meant.
Upon click, the user is presented with an overlay. Depending on the site configuration the links +Help and documentation, Services and support, Contact site support, Login information, Reset user tour on this page, Data retention summary, Get the mobile app, Policies and Powered by Moodle could be shown.
With this setting it is possible to suppress this footer button.'; // Settings: Static pages tab. $string['staticpagestab'] = 'Static pages'; diff --git a/layout/includes/staticpages.php b/layout/includes/staticpages.php index 8baa456251d..d16e0536870 100644 --- a/layout/includes/staticpages.php +++ b/layout/includes/staticpages.php @@ -61,3 +61,8 @@ $templatecontext[$staticpage.'pagetitle'] = theme_boost_union_get_staticpage_pagetitle($staticpage); } } + +// If the footerbutton is enabled. +if ($config->enablefooterbutton == THEME_BOOST_UNION_SETTING_SELECT_YES) { + $templatecontext['footerbutton'] = true; +} diff --git a/settings.php b/settings.php index bfc0642fb95..cafbda259f1 100644 --- a/settings.php +++ b/settings.php @@ -1381,6 +1381,20 @@ $setting = new admin_setting_confightmleditor($name, $title, $description, ''); $tab->add($setting); + // Create footer heading. + $name = 'theme_boost_union/footerheading'; + $title = get_string('footerheading', 'theme_boost_union', null, true); + $setting = new admin_setting_heading($name, $title, null); + $tab->add($setting); + + // Setting: Footer. + $name = 'theme_boost_union/enablefooterbutton'; + $title = get_string('enablefooterbutton', 'theme_boost_union', null, true); + $description = get_string('enablefooterbutton_desc', 'theme_boost_union', null, true); + $setting = new admin_setting_configselect($name, $title, $description, THEME_BOOST_UNION_SETTING_SELECT_YES, + $yesnooption); + $tab->add($setting); + // Add tab to settings page. $page->add($tab); diff --git a/templates/theme_boost/footer.mustache b/templates/theme_boost/footer.mustache index 739e0de2e31..043c078a529 100644 --- a/templates/theme_boost/footer.mustache +++ b/templates/theme_boost/footer.mustache @@ -75,6 +75,7 @@ * Added the possibility to show the generic page 2 link. * Added the possibility to show the generic page 3 link. * Added the bottom menu bar to show menus in footer for mobile devices. + * Added the possibility to suppress the footer button (question mark in the circle). }}