Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Commit

Permalink
Docking setting in the general settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
gjb2048 committed Dec 18, 2018
1 parent 7b7de5a commit 7288051
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -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
==============
Expand Down
2 changes: 1 addition & 1 deletion config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 2 additions & 0 deletions lang/en/theme_essential.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
9 changes: 9 additions & 0 deletions settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 7288051

Please sign in to comment.