From 7288051275fb0773903774c49b08c552eaf997df Mon Sep 17 00:00:00 2001 From: Gareth Barnard <1058419+gjb2048@users.noreply.github.com> Date: Tue, 18 Dec 2018 22:38:09 +0000 Subject: [PATCH] Docking setting in the general settings. --- CHANGES.txt | 1 + config.php | 2 +- lang/en/theme_essential.php | 2 ++ settings.php | 9 +++++++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index c971650b..9fb550b3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,7 @@ New in 3.6.0.1 ============== - FIX: M3.6 beta based on 3.5.1.3. +- NEW: Docking setting in the general settings. New in 3.5.1.3 ============== diff --git a/config.php b/config.php index dc41b8d8..6e08131a 100644 --- a/config.php +++ b/config.php @@ -57,7 +57,7 @@ $THEME->supportscssoptimisation = false; $THEME->javascripts_footer = array('essential'); -$THEME->enable_dock = true; +$THEME->enable_dock = get_config('theme_essential', 'docking'); $THEME->javascripts_footer[] = 'dock'; $THEME->editor_sheets = array('editor', 'custom'); diff --git a/lang/en/theme_essential.php b/lang/en/theme_essential.php index 8f0c3fca..2c6b9cfd 100644 --- a/lang/en/theme_essential.php +++ b/lang/en/theme_essential.php @@ -145,6 +145,8 @@ $string['generalheadingsub'] = 'General settings'; $string['generalheadingdesc'] = 'Configure the general settings for the theme here.'; +$string['docking'] = 'Enable docking.'; +$string['dockingdesc'] = 'If enabled docking will be available.'; $string['flatnavigation'] = 'Enable flat navigation.'; $string['flatnavigationdesc'] = 'If enabled flat navigation will be used instead of the navigation and settings blocks.'; $string['coursesettingstitle'] = 'Course settings'; diff --git a/settings.php b/settings.php index cdb355bc..4679c40b 100644 --- a/settings.php +++ b/settings.php @@ -58,6 +58,15 @@ get_string('generalheadingsub', 'theme_essential'), format_text(get_string('generalheadingdesc', 'theme_essential'), FORMAT_MARKDOWN))); + // Toggle docking. + $name = 'theme_essential/docking'; + $title = get_string('docking', 'theme_essential'); + $description = get_string('dockingdesc', 'theme_essential'); + $default = false; + $setting = new admin_setting_configcheckbox($name, $title, $description, $default, true, false); + $setting->set_updatedcallback('theme_reset_all_caches'); + $essentialsettingsgeneric->add($setting); + // Toggle flat navigation. $name = 'theme_essential/flatnavigation'; $title = get_string('flatnavigation', 'theme_essential');