mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
833511a005
AMOS BEGIN CPY [choosereadme,theme_clean],[choosereadme,theme_more] CPY [configtitle,theme_clean],[configtitle,theme_more] CPY [customcss,theme_clean],[customcss,theme_more] CPY [customcssdesc,theme_clean],[customcssdesc,theme_more] CPY [footnote,theme_clean],[footnote,theme_more] CPY [footnotedesc,theme_clean],[footnotedesc,theme_more] CPY [invert,theme_clean],[invert,theme_more] CPY [invertdesc,theme_clean],[invertdesc,theme_more] CPY [logo,theme_clean],[logo,theme_more] CPY [logodesc,theme_clean],[logodesc,theme_more] CPY [pluginname,theme_clean],[pluginname,theme_more] CPY [region-side-post,theme_clean],[region-side-post,theme_more] CPY [region-side-pre,theme_clean],[region-side-pre,theme_more] AMOS END
72 lines
2.8 KiB
PHP
72 lines
2.8 KiB
PHP
<?php
|
|
// This file is part of Moodle - http://moodle.org/
|
|
//
|
|
// Moodle is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// Moodle is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
/**
|
|
* Theme More settings.
|
|
*
|
|
* Each setting that is defined in the parent theme Clean should be
|
|
* defined here too, and use the exact same config name. The reason
|
|
* is that theme_more does not define any layout files to re-use the
|
|
* ones from theme_clean. But as those layout files use the function
|
|
* {@link theme_clean_get_html_for_settings} that belong to Clean,
|
|
* we have to make sure it works as expected by having the same settings
|
|
* in our theme.
|
|
*
|
|
* @see theme_clean_get_html_for_settings
|
|
* @package theme_more
|
|
* @copyright 2014 Frédéric Massart
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
|
*/
|
|
|
|
defined('MOODLE_INTERNAL') || die;
|
|
|
|
if ($ADMIN->fulltree) {
|
|
|
|
// Invert Navbar to dark background.
|
|
$name = 'theme_more/invert';
|
|
$title = get_string('invert', 'theme_more');
|
|
$description = get_string('invertdesc', 'theme_more');
|
|
$setting = new admin_setting_configcheckbox($name, $title, $description, 0);
|
|
$setting->set_updatedcallback('theme_reset_all_caches');
|
|
$settings->add($setting);
|
|
|
|
// Logo file setting.
|
|
$name = 'theme_more/logo';
|
|
$title = get_string('logo','theme_more');
|
|
$description = get_string('logodesc', 'theme_more');
|
|
$setting = new admin_setting_configstoredfile($name, $title, $description, 'logo');
|
|
$setting->set_updatedcallback('theme_reset_all_caches');
|
|
$settings->add($setting);
|
|
|
|
// Custom CSS file.
|
|
$name = 'theme_more/customcss';
|
|
$title = get_string('customcss', 'theme_more');
|
|
$description = get_string('customcssdesc', 'theme_more');
|
|
$default = '';
|
|
$setting = new admin_setting_configtextarea($name, $title, $description, $default);
|
|
$setting->set_updatedcallback('theme_reset_all_caches');
|
|
$settings->add($setting);
|
|
|
|
// Footnote setting.
|
|
$name = 'theme_more/footnote';
|
|
$title = get_string('footnote', 'theme_more');
|
|
$description = get_string('footnotedesc', 'theme_more');
|
|
$default = '';
|
|
$setting = new admin_setting_confightmleditor($name, $title, $description, $default);
|
|
$setting->set_updatedcallback('theme_reset_all_caches');
|
|
$settings->add($setting);
|
|
}
|