Browse Source

Substituição de referências do boost para ilb

SABERES_311_STABLE
Matheus Garcia 3 years ago
parent
commit
dac74b36b7
  1. 8
      classes/admin_settingspage_tabs.php
  2. 12
      classes/autoprefixer.php
  3. 4
      classes/output/core_renderer.php
  4. 14
      classes/privacy/provider.php
  5. 14
      config.php
  6. 6
      layout/columns1.php
  7. 6
      layout/columns2.php
  8. 6
      layout/embedded.php
  9. 6
      layout/login.php
  10. 6
      layout/maintenance.php
  11. 6
      layout/secure.php
  12. 32
      lib.php
  13. 2
      scss/fontawesome/readme_moodle.txt
  14. 2
      scss/moodle/core.scss
  15. 2
      scss/preset/plain.scss
  16. 44
      settings.php
  17. 2
      templates/admin_setting_tabs.mustache
  18. 12
      templates/columns1.mustache
  19. 24
      templates/columns2.mustache
  20. 2
      templates/custom_menu_footer.mustache
  21. 10
      templates/embedded.mustache
  22. 4
      templates/flat_navigation.mustache
  23. 4
      templates/footer.mustache
  24. 10
      templates/login.mustache
  25. 10
      templates/maintenance.mustache
  26. 4
      templates/nav-drawer.mustache
  27. 14
      templates/secure.mustache
  28. 6
      version.php

8
classes/admin_settingspage_tabs.php

@ -15,7 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/** /**
* @package theme_boost * @package theme_ilb
* @copyright 2016 Ryan Wyllie * @copyright 2016 Ryan Wyllie
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
@ -23,11 +23,11 @@
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
/** /**
* @package theme_boost * @package theme_ilb
* @copyright 2016 Ryan Wyllie * @copyright 2016 Ryan Wyllie
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
class theme_boost_admin_settingspage_tabs extends admin_settingpage { class theme_ilb_admin_settingspage_tabs extends admin_settingpage {
/** @var The tabs */ /** @var The tabs */
protected $tabs = array(); protected $tabs = array();
@ -93,7 +93,7 @@ class theme_boost_admin_settingspage_tabs extends admin_settingpage {
return ''; return '';
} }
return $OUTPUT->render_from_template('theme_boost/admin_setting_tabs', $context); return $OUTPUT->render_from_template('theme_ilb/admin_setting_tabs', $context);
} }
} }

12
classes/autoprefixer.php

@ -18,15 +18,15 @@
* Autoprefixer. * Autoprefixer.
* *
* This autoprefixer has been developed to satisfy the basic needs of the * This autoprefixer has been developed to satisfy the basic needs of the
* theme Boost when working with Bootstrap 4 alpha. We do not recommend * theme Ilb when working with Bootstrap 4 alpha. We do not recommend
* that this tool is shared, nor used outside of this theme. * that this tool is shared, nor used outside of this theme.
* *
* @package theme_boost * @package theme_ilb
* @copyright 2016 Frédéric Massart - FMCorz.net * @copyright 2016 Frédéric Massart - FMCorz.net
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
namespace theme_boost; namespace theme_ilb;
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
use Sabberworm\CSS\CSSList\CSSList; use Sabberworm\CSS\CSSList\CSSList;
@ -54,7 +54,7 @@ use Sabberworm\CSS\Value\ValueList;
* *
* Very basic implementation covering simple needs for Bootstrap 4. * Very basic implementation covering simple needs for Bootstrap 4.
* *
* @package theme_boost * @package theme_ilb
* @copyright 2016 Frédéric Massart - FMCorz.net * @copyright 2016 Frédéric Massart - FMCorz.net
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
@ -104,8 +104,8 @@ class autoprefixer {
* @param Document $tree The CSS tree. * @param Document $tree The CSS tree.
*/ */
public function __construct(Document $tree) { public function __construct(Document $tree) {
debugging('theme_boost\autoprefixer() is deprecated. Required prefixes for Bootstrap ' . debugging('theme_ilb\autoprefixer() is deprecated. Required prefixes for Bootstrap ' .
'are now in theme/boost/scss/moodle/prefixes.scss', DEBUG_DEVELOPER); 'are now in theme/ilb/scss/moodle/prefixes.scss', DEBUG_DEVELOPER);
$this->tree = $tree; $this->tree = $tree;
$pseudos = array_map(function($pseudo) { $pseudos = array_map(function($pseudo) {

4
classes/output/core_renderer.php

@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace theme_boost\output; namespace theme_ilb\output;
use moodle_url; use moodle_url;
@ -23,7 +23,7 @@ defined('MOODLE_INTERNAL') || die;
/** /**
* Renderers to align Moodle's HTML with that expected by Bootstrap * Renderers to align Moodle's HTML with that expected by Bootstrap
* *
* @package theme_boost * @package theme_ilb
* @copyright 2012 Bas Brands, www.basbrands.nl * @copyright 2012 Bas Brands, www.basbrands.nl
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */

14
classes/privacy/provider.php

@ -15,21 +15,21 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/** /**
* Privacy Subsystem implementation for theme_boost. * Privacy Subsystem implementation for theme_ilb.
* *
* @package theme_boost * @package theme_ilb
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk> * @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
namespace theme_boost\privacy; namespace theme_ilb\privacy;
use \core_privacy\local\metadata\collection; use \core_privacy\local\metadata\collection;
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
/** /**
* The boost theme stores a user preference data. * The ilb theme stores a user preference data.
* *
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk> * @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@ -63,12 +63,12 @@ class provider implements
$draweropennavpref = get_user_preferences(self::DRAWER_OPEN_NAV, null, $userid); $draweropennavpref = get_user_preferences(self::DRAWER_OPEN_NAV, null, $userid);
if (isset($draweropennavpref)) { if (isset($draweropennavpref)) {
$preferencestring = get_string('privacy:drawernavclosed', 'theme_boost'); $preferencestring = get_string('privacy:drawernavclosed', 'theme_ilb');
if ($draweropennavpref == 'true') { if ($draweropennavpref == 'true') {
$preferencestring = get_string('privacy:drawernavopen', 'theme_boost'); $preferencestring = get_string('privacy:drawernavopen', 'theme_ilb');
} }
\core_privacy\local\request\writer::export_user_preference( \core_privacy\local\request\writer::export_user_preference(
'theme_boost', 'theme_ilb',
self::DRAWER_OPEN_NAV, self::DRAWER_OPEN_NAV,
$draweropennavpref, $draweropennavpref,
$preferencestring $preferencestring

14
config.php

@ -15,9 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/** /**
* Boost config. * Ilb config.
* *
* @package theme_boost * @package theme_ilb
* @copyright 2016 Frédéric Massart * @copyright 2016 Frédéric Massart
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
@ -26,13 +26,13 @@ defined('MOODLE_INTERNAL') || die();
require_once(__DIR__ . '/lib.php'); require_once(__DIR__ . '/lib.php');
$THEME->name = 'boost'; $THEME->name = 'ilb';
$THEME->sheets = []; $THEME->sheets = [];
$THEME->editor_sheets = []; $THEME->editor_sheets = [];
$THEME->editor_scss = ['editor']; $THEME->editor_scss = ['editor'];
$THEME->usefallback = true; $THEME->usefallback = true;
$THEME->scss = function($theme) { $THEME->scss = function($theme) {
return theme_boost_get_main_scss_content($theme); return theme_ilb_get_main_scss_content($theme);
}; };
$THEME->layouts = [ $THEME->layouts = [
@ -149,9 +149,9 @@ $THEME->layouts = [
$THEME->parents = []; $THEME->parents = [];
$THEME->enable_dock = false; $THEME->enable_dock = false;
$THEME->extrascsscallback = 'theme_boost_get_extra_scss'; $THEME->extrascsscallback = 'theme_ilb_get_extra_scss';
$THEME->prescsscallback = 'theme_boost_get_pre_scss'; $THEME->prescsscallback = 'theme_ilb_get_pre_scss';
$THEME->precompiledcsscallback = 'theme_boost_get_precompiled_css'; $THEME->precompiledcsscallback = 'theme_ilb_get_precompiled_css';
$THEME->yuicssmodules = array(); $THEME->yuicssmodules = array();
$THEME->rendererfactory = 'theme_overridden_renderer_factory'; $THEME->rendererfactory = 'theme_overridden_renderer_factory';
$THEME->requiredblocks = ''; $THEME->requiredblocks = '';

6
layout/columns1.php

@ -15,9 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/** /**
* A one column layout for the boost theme. * A one column layout for the ilb theme.
* *
* @package theme_boost * @package theme_ilb
* @copyright 2016 Damyon Wiese * @copyright 2016 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
@ -32,5 +32,5 @@ $templatecontext = [
'bodyattributes' => $bodyattributes 'bodyattributes' => $bodyattributes
]; ];
echo $OUTPUT->render_from_template('theme_boost/columns1', $templatecontext); echo $OUTPUT->render_from_template('theme_ilb/columns1', $templatecontext);

6
layout/columns2.php

@ -15,9 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/** /**
* A two column layout for the boost theme. * A two column layout for the ilb theme.
* *
* @package theme_boost * @package theme_ilb
* @copyright 2016 Damyon Wiese * @copyright 2016 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
@ -56,5 +56,5 @@ $templatecontext = [
$nav = $PAGE->flatnav; $nav = $PAGE->flatnav;
$templatecontext['flatnavigation'] = $nav; $templatecontext['flatnavigation'] = $nav;
$templatecontext['firstcollectionlabel'] = $nav->get_collectionlabel(); $templatecontext['firstcollectionlabel'] = $nav->get_collectionlabel();
echo $OUTPUT->render_from_template('theme_boost/columns2', $templatecontext); echo $OUTPUT->render_from_template('theme_ilb/columns2', $templatecontext);

6
layout/embedded.php

@ -15,9 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/** /**
* An embedded layout for the boost theme. * An embedded layout for the ilb theme.
* *
* @package theme_boost * @package theme_ilb
* @copyright 2016 Damyon Wiese * @copyright 2016 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
@ -33,4 +33,4 @@ $templatecontext = [
'fakeblocks' => $fakeblockshtml, 'fakeblocks' => $fakeblockshtml,
]; ];
echo $OUTPUT->render_from_template('theme_boost/embedded', $templatecontext); echo $OUTPUT->render_from_template('theme_ilb/embedded', $templatecontext);

6
layout/login.php

@ -17,9 +17,9 @@
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
/** /**
* A login page layout for the boost theme. * A login page layout for the ilb theme.
* *
* @package theme_boost * @package theme_ilb
* @copyright 2016 Damyon Wiese * @copyright 2016 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
@ -32,5 +32,5 @@ $templatecontext = [
'bodyattributes' => $bodyattributes 'bodyattributes' => $bodyattributes
]; ];
echo $OUTPUT->render_from_template('theme_boost/login', $templatecontext); echo $OUTPUT->render_from_template('theme_ilb/login', $templatecontext);

6
layout/maintenance.php

@ -15,9 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/** /**
* A maintenance layout for the boost theme. * A maintenance layout for the ilb theme.
* *
* @package theme_boost * @package theme_ilb
* @copyright 2016 Damyon Wiese * @copyright 2016 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
@ -31,4 +31,4 @@ $templatecontext = [
'output' => $OUTPUT 'output' => $OUTPUT
]; ];
echo $OUTPUT->render_from_template('theme_boost/maintenance', $templatecontext); echo $OUTPUT->render_from_template('theme_ilb/maintenance', $templatecontext);

6
layout/secure.php

@ -15,9 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/** /**
* A secure layout for the boost theme. * A secure layout for the ilb theme.
* *
* @package theme_boost * @package theme_ilb
* @copyright 2016 Damyon Wiese * @copyright 2016 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
@ -36,5 +36,5 @@ $templatecontext = [
'hasblocks' => $hasblocks 'hasblocks' => $hasblocks
]; ];
echo $OUTPUT->render_from_template('theme_boost/secure', $templatecontext); echo $OUTPUT->render_from_template('theme_ilb/secure', $templatecontext);

32
lib.php

@ -17,7 +17,7 @@
/** /**
* Theme functions. * Theme functions.
* *
* @package theme_boost * @package theme_ilb
* @copyright 2016 Frédéric Massart - FMCorz.net * @copyright 2016 Frédéric Massart - FMCorz.net
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
@ -30,10 +30,10 @@ defined('MOODLE_INTERNAL') || die();
* @param string $tree The CSS tree. * @param string $tree The CSS tree.
* @param theme_config $theme The theme config object. * @param theme_config $theme The theme config object.
*/ */
function theme_boost_css_tree_post_processor($tree, $theme) { function theme_ilb_css_tree_post_processor($tree, $theme) {
error_log('theme_boost_css_tree_post_processor() is deprecated. Required' . error_log('theme_ilb_css_tree_post_processor() is deprecated. Required' .
'prefixes for Bootstrap are now in theme/boost/scss/moodle/prefixes.scss'); 'prefixes for Bootstrap are now in theme/ilb/scss/moodle/prefixes.scss');
$prefixer = new theme_boost\autoprefixer($tree); $prefixer = new theme_ilb\autoprefixer($tree);
$prefixer->prefix(); $prefixer->prefix();
} }
@ -43,7 +43,7 @@ function theme_boost_css_tree_post_processor($tree, $theme) {
* @param theme_config $theme The theme config object. * @param theme_config $theme The theme config object.
* @return string * @return string
*/ */
function theme_boost_get_extra_scss($theme) { function theme_ilb_get_extra_scss($theme) {
$content = ''; $content = '';
$imageurl = $theme->setting_file_url('backgroundimage', 'backgroundimage'); $imageurl = $theme->setting_file_url('backgroundimage', 'backgroundimage');
@ -70,9 +70,9 @@ function theme_boost_get_extra_scss($theme) {
* @param array $options * @param array $options
* @return bool * @return bool
*/ */
function theme_boost_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload, array $options = array()) { function theme_ilb_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload, array $options = array()) {
if ($context->contextlevel == CONTEXT_SYSTEM && ($filearea === 'logo' || $filearea === 'backgroundimage')) { if ($context->contextlevel == CONTEXT_SYSTEM && ($filearea === 'logo' || $filearea === 'backgroundimage')) {
$theme = theme_config::load('boost'); $theme = theme_config::load('ilb');
// By default, theme files must be cache-able by both browsers and proxies. // By default, theme files must be cache-able by both browsers and proxies.
if (!array_key_exists('cacheability', $options)) { if (!array_key_exists('cacheability', $options)) {
$options['cacheability'] = 'public'; $options['cacheability'] = 'public';
@ -89,7 +89,7 @@ function theme_boost_pluginfile($course, $cm, $context, $filearea, $args, $force
* @param theme_config $theme The theme config object. * @param theme_config $theme The theme config object.
* @return string * @return string
*/ */
function theme_boost_get_main_scss_content($theme) { function theme_ilb_get_main_scss_content($theme) {
global $CFG; global $CFG;
$scss = ''; $scss = '';
@ -98,14 +98,14 @@ function theme_boost_get_main_scss_content($theme) {
$context = context_system::instance(); $context = context_system::instance();
if ($filename == 'default.scss') { if ($filename == 'default.scss') {
$scss .= file_get_contents($CFG->dirroot . '/theme/boost/scss/preset/default.scss'); $scss .= file_get_contents($CFG->dirroot . '/theme/ilb/scss/preset/default.scss');
} else if ($filename == 'plain.scss') { } else if ($filename == 'plain.scss') {
$scss .= file_get_contents($CFG->dirroot . '/theme/boost/scss/preset/plain.scss'); $scss .= file_get_contents($CFG->dirroot . '/theme/ilb/scss/preset/plain.scss');
} else if ($filename && ($presetfile = $fs->get_file($context->id, 'theme_boost', 'preset', 0, '/', $filename))) { } else if ($filename && ($presetfile = $fs->get_file($context->id, 'theme_ilb', 'preset', 0, '/', $filename))) {
$scss .= $presetfile->get_content(); $scss .= $presetfile->get_content();
} else { } else {
// Safety fallback - maybe new installs etc. // Safety fallback - maybe new installs etc.
$scss .= file_get_contents($CFG->dirroot . '/theme/boost/scss/preset/default.scss'); $scss .= file_get_contents($CFG->dirroot . '/theme/ilb/scss/preset/default.scss');
} }
return $scss; return $scss;
@ -116,9 +116,9 @@ function theme_boost_get_main_scss_content($theme) {
* *
* @return string compiled css * @return string compiled css
*/ */
function theme_boost_get_precompiled_css() { function theme_ilb_get_precompiled_css() {
global $CFG; global $CFG;
return file_get_contents($CFG->dirroot . '/theme/boost/style/moodle.css'); return file_get_contents($CFG->dirroot . '/theme/ilb/style/moodle.css');
} }
/** /**
@ -127,7 +127,7 @@ function theme_boost_get_precompiled_css() {
* @param theme_config $theme The theme config object. * @param theme_config $theme The theme config object.
* @return array * @return array
*/ */
function theme_boost_get_pre_scss($theme) { function theme_ilb_get_pre_scss($theme) {
global $CFG; global $CFG;
$scss = ''; $scss = '';

2
scss/fontawesome/readme_moodle.txt

@ -3,5 +3,5 @@ Description of Font awesome import into Moodle
Font awesome comes in 3 parts relating to Moodle. Font awesome comes in 3 parts relating to Moodle.
1. The font. Put the woff font in lib/fonts/fontawesome-webfont.woff. Update lib/thirdpartylibs.xml. 1. The font. Put the woff font in lib/fonts/fontawesome-webfont.woff. Update lib/thirdpartylibs.xml.
2. SCSS. Replace the SCSS in this folder (/theme/boost/scss/fontawesome). Update theme/boost/thirdpartylibs.xml. 2. SCSS. Replace the SCSS in this folder (/theme/ilb/scss/fontawesome). Update theme/ilb/thirdpartylibs.xml.
3. The @import "path" is commented because we provide the font path differently e.g. "[[font:core|fontawesome-webfont.eot]]" 3. The @import "path" is commented because we provide the font path differently e.g. "[[font:core|fontawesome-webfont.eot]]"

2
scss/moodle/core.scss

@ -1,6 +1,6 @@
/* core.less */ /* core.less */
// When we upgrade boostrap to v4 release, we will need to change this to be used by the text-white class. // When we upgrade ilbrap to v4 release, we will need to change this to be used by the text-white class.
// Because a primary colour that is both AA accessible on grey (footer) and white is not possible, we always // Because a primary colour that is both AA accessible on grey (footer) and white is not possible, we always
// want white default colour. // want white default colour.
$bg-inverse-link-color: #fff !default; $bg-inverse-link-color: #fff !default;

2
scss/preset/plain.scss

@ -6,7 +6,7 @@
* To create your own preset file: * To create your own preset file:
* - Duplicate this file and rename it, for instance to preset-apple.scss. * - Duplicate this file and rename it, for instance to preset-apple.scss.
* - In settings.php, find the references to 'plain', duplicate them and rename * - In settings.php, find the references to 'plain', duplicate them and rename
* them to 'apple'. (Look around the choices for 'theme_boost/preset'). * them to 'apple'. (Look around the choices for 'theme_ilb/preset').
*/ */
// Import FontAwesome. // Import FontAwesome.

44
settings.php

@ -15,7 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/** /**
* @package theme_boost * @package theme_ilb
* @copyright 2016 Ryan Wyllie * @copyright 2016 Ryan Wyllie
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
@ -23,18 +23,18 @@
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
if ($ADMIN->fulltree) { if ($ADMIN->fulltree) {
$settings = new theme_boost_admin_settingspage_tabs('themesettingboost', get_string('configtitle', 'theme_boost')); $settings = new theme_ilb_admin_settingspage_tabs('themesettingilb', get_string('configtitle', 'theme_ilb'));
$page = new admin_settingpage('theme_boost_general', get_string('generalsettings', 'theme_boost')); $page = new admin_settingpage('theme_ilb_general', get_string('generalsettings', 'theme_ilb'));
// Preset. // Preset.
$name = 'theme_boost/preset'; $name = 'theme_ilb/preset';
$title = get_string('preset', 'theme_boost'); $title = get_string('preset', 'theme_ilb');
$description = get_string('preset_desc', 'theme_boost'); $description = get_string('preset_desc', 'theme_ilb');
$default = 'default.scss'; $default = 'default.scss';
$context = context_system::instance(); $context = context_system::instance();
$fs = get_file_storage(); $fs = get_file_storage();
$files = $fs->get_area_files($context->id, 'theme_boost', 'preset', 0, 'itemid, filepath, filename', false); $files = $fs->get_area_files($context->id, 'theme_ilb', 'preset', 0, 'itemid, filepath, filename', false);
$choices = []; $choices = [];
foreach ($files as $file) { foreach ($files as $file) {
@ -44,32 +44,32 @@ if ($ADMIN->fulltree) {
$choices['default.scss'] = 'default.scss'; $choices['default.scss'] = 'default.scss';
$choices['plain.scss'] = 'plain.scss'; $choices['plain.scss'] = 'plain.scss';
$setting = new admin_setting_configthemepreset($name, $title, $description, $default, $choices, 'boost'); $setting = new admin_setting_configthemepreset($name, $title, $description, $default, $choices, 'ilb');
$setting->set_updatedcallback('theme_reset_all_caches'); $setting->set_updatedcallback('theme_reset_all_caches');
$page->add($setting); $page->add($setting);
// Preset files setting. // Preset files setting.
$name = 'theme_boost/presetfiles'; $name = 'theme_ilb/presetfiles';
$title = get_string('presetfiles','theme_boost'); $title = get_string('presetfiles','theme_ilb');
$description = get_string('presetfiles_desc', 'theme_boost'); $description = get_string('presetfiles_desc', 'theme_ilb');
$setting = new admin_setting_configstoredfile($name, $title, $description, 'preset', 0, $setting = new admin_setting_configstoredfile($name, $title, $description, 'preset', 0,
array('maxfiles' => 20, 'accepted_types' => array('.scss'))); array('maxfiles' => 20, 'accepted_types' => array('.scss')));
$page->add($setting); $page->add($setting);
// Background image setting. // Background image setting.
$name = 'theme_boost/backgroundimage'; $name = 'theme_ilb/backgroundimage';
$title = get_string('backgroundimage', 'theme_boost'); $title = get_string('backgroundimage', 'theme_ilb');
$description = get_string('backgroundimage_desc', 'theme_boost'); $description = get_string('backgroundimage_desc', 'theme_ilb');
$setting = new admin_setting_configstoredfile($name, $title, $description, 'backgroundimage'); $setting = new admin_setting_configstoredfile($name, $title, $description, 'backgroundimage');
$setting->set_updatedcallback('theme_reset_all_caches'); $setting->set_updatedcallback('theme_reset_all_caches');
$page->add($setting); $page->add($setting);
// Variable $body-color. // Variable $body-color.
// We use an empty default value because the default colour should come from the preset. // We use an empty default value because the default colour should come from the preset.
$name = 'theme_boost/brandcolor'; $name = 'theme_ilb/brandcolor';
$title = get_string('brandcolor', 'theme_boost'); $title = get_string('brandcolor', 'theme_ilb');
$description = get_string('brandcolor_desc', 'theme_boost'); $description = get_string('brandcolor_desc', 'theme_ilb');
$setting = new admin_setting_configcolourpicker($name, $title, $description, ''); $setting = new admin_setting_configcolourpicker($name, $title, $description, '');
$setting->set_updatedcallback('theme_reset_all_caches'); $setting->set_updatedcallback('theme_reset_all_caches');
$page->add($setting); $page->add($setting);
@ -78,17 +78,17 @@ if ($ADMIN->fulltree) {
$settings->add($page); $settings->add($page);
// Advanced settings. // Advanced settings.
$page = new admin_settingpage('theme_boost_advanced', get_string('advancedsettings', 'theme_boost')); $page = new admin_settingpage('theme_ilb_advanced', get_string('advancedsettings', 'theme_ilb'));
// Raw SCSS to include before the content. // Raw SCSS to include before the content.
$setting = new admin_setting_scsscode('theme_boost/scsspre', $setting = new admin_setting_scsscode('theme_ilb/scsspre',
get_string('rawscsspre', 'theme_boost'), get_string('rawscsspre_desc', 'theme_boost'), '', PARAM_RAW); get_string('rawscsspre', 'theme_ilb'), get_string('rawscsspre_desc', 'theme_ilb'), '', PARAM_RAW);
$setting->set_updatedcallback('theme_reset_all_caches'); $setting->set_updatedcallback('theme_reset_all_caches');
$page->add($setting); $page->add($setting);
// Raw SCSS to include after the content. // Raw SCSS to include after the content.
$setting = new admin_setting_scsscode('theme_boost/scss', get_string('rawscss', 'theme_boost'), $setting = new admin_setting_scsscode('theme_ilb/scss', get_string('rawscss', 'theme_ilb'),
get_string('rawscss_desc', 'theme_boost'), '', PARAM_RAW); get_string('rawscss_desc', 'theme_ilb'), '', PARAM_RAW);
$setting->set_updatedcallback('theme_reset_all_caches'); $setting->set_updatedcallback('theme_reset_all_caches');
$page->add($setting); $page->add($setting);

2
templates/admin_setting_tabs.mustache

@ -15,7 +15,7 @@
along with Moodle. If not, see <http://www.gnu.org/licenses/>. along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}} }}
{{! {{!
@template theme_boost/admin_setting_tabs @template theme_ilb/admin_setting_tabs
Example context (json): Example context (json):

12
templates/columns1.mustache

@ -15,9 +15,9 @@
along with Moodle. If not, see <http://www.gnu.org/licenses/>. along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}} }}
{{! {{!
@template theme_boost/columns1 @template theme_ilb/columns1
Boost 1 column layout template. Ilb 1 column layout template.
Context variables required for this template: Context variables required for this template:
* sitename - The name of the site * sitename - The name of the site
@ -36,7 +36,7 @@
"bodyattributes":"" "bodyattributes":""
} }
}} }}
{{> theme_boost/head }} {{> theme_ilb/head }}
<body {{{ bodyattributes }}}> <body {{{ bodyattributes }}}>
{{> core/local/toast/wrapper}} {{> core/local/toast/wrapper}}
@ -65,8 +65,8 @@
</body> </body>
</html> </html>
{{#js}} {{#js}}
M.util.js_pending('theme_boost/loader'); M.util.js_pending('theme_ilb/loader');
require(['theme_boost/loader'], function() { require(['theme_ilb/loader'], function() {
M.util.js_complete('theme_boost/loader'); M.util.js_complete('theme_ilb/loader');
}); });
{{/js}} {{/js}}

24
templates/columns2.mustache

@ -15,11 +15,11 @@
along with Moodle. If not, see <http://www.gnu.org/licenses/>. along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}} }}
{{! {{!
@template theme_boost/columns2 @template theme_ilb/columns2
Admin time setting template. Admin time setting template.
Boost 2 column layout template. Ilb 2 column layout template.
Context variables required for this template: Context variables required for this template:
* sitename - The name of the site * sitename - The name of the site
@ -48,7 +48,7 @@
"hasregionmainsettingsmenu": false "hasregionmainsettingsmenu": false
} }
}} }}
{{> theme_boost/head }} {{> theme_ilb/head }}
<body {{{ bodyattributes }}}> <body {{{ bodyattributes }}}>
{{> core/local/toast/wrapper}} {{> core/local/toast/wrapper}}
@ -57,8 +57,8 @@
{{{ output.standard_top_of_body_html }}} {{{ output.standard_top_of_body_html }}}
{{> theme_boost/navbar }} {{> theme_ilb/navbar }}
{{> theme_boost/nav-drawer }} {{> theme_ilb/nav-drawer }}
<div id="page" class="container-fluid d-print-block"> <div id="page" class="container-fluid d-print-block">
{{{ output.full_header }}} {{{ output.full_header }}}
@ -90,20 +90,20 @@
</div> </div>
</div> </div>
{{{ output.standard_after_main_region_html }}} {{{ output.standard_after_main_region_html }}}
{{> theme_boost/footer }} {{> theme_ilb/footer }}
</div> </div>
</body> </body>
</html> </html>
{{#js}} {{#js}}
M.util.js_pending('theme_boost/loader'); M.util.js_pending('theme_ilb/loader');
require(['theme_boost/loader'], function() { require(['theme_ilb/loader'], function() {
M.util.js_complete('theme_boost/loader'); M.util.js_complete('theme_ilb/loader');
}); });
M.util.js_pending('theme_boost/drawer'); M.util.js_pending('theme_ilb/drawer');
require(['theme_boost/drawer'], function(drawer) { require(['theme_ilb/drawer'], function(drawer) {
drawer.init(); drawer.init();
M.util.js_complete('theme_boost/drawer'); M.util.js_complete('theme_ilb/drawer');
}); });
{{/js}} {{/js}}

2
templates/custom_menu_footer.mustache

@ -10,7 +10,7 @@
{{#haschildren}} {{#haschildren}}
<li> <li>
<ul class="list-unstyled ml-3"> <ul class="list-unstyled ml-3">
{{> theme_boost/custom_menu_footer }} {{> theme_ilb/custom_menu_footer }}
</ul> </ul>
</li> </li>
{{/haschildren}} {{/haschildren}}

10
templates/embedded.mustache

@ -15,9 +15,9 @@
along with Moodle. If not, see <http://www.gnu.org/licenses/>. along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}} }}
{{! {{!
@template theme_boost/maintenance @template theme_ilb/maintenance
Boost maintenance layout template. Ilb maintenance layout template.
Context variables required for this template: Context variables required for this template:
* output - The core renderer for the page * output - The core renderer for the page
@ -68,8 +68,8 @@
</body> </body>
</html> </html>
{{#js}} {{#js}}
M.util.js_pending('theme_boost/loader'); M.util.js_pending('theme_ilb/loader');
require(['theme_boost/loader'], function() { require(['theme_ilb/loader'], function() {
M.util.js_complete('theme_boost/loader'); M.util.js_complete('theme_ilb/loader');
}); });
{{/js}} {{/js}}

4
templates/flat_navigation.mustache

@ -15,9 +15,9 @@
along with Moodle. If not, see <http://www.gnu.org/licenses/>. along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}} }}
{{! {{!
@template theme_boost/flat_navigation @template theme_ilb/flat_navigation
Display the flat navigation for the boost theme Display the flat navigation for the ilb theme
Classes required for JS: Classes required for JS:
* none * none

4
templates/footer.mustache

@ -19,7 +19,7 @@
}} }}
<div id="goto-top-link"> <div id="goto-top-link">
{{! go to top is sticky to footer so needs to be sibling }} {{! go to top is sticky to footer so needs to be sibling }}
<a class="btn btn-light" role="button" href="#" aria-label="{{#str}} totop, theme_boost {{/str}}"> <a class="btn btn-light" role="button" href="#" aria-label="{{#str}} totop, theme_ilb {{/str}}">
{{#pix}} i/up, core{{/pix}} {{#pix}} i/up, core{{/pix}}
</a> </a>
</div> </div>
@ -37,7 +37,7 @@
<nav class="nav navbar-nav d-md-none" aria-label="{{#str}}custommenu, admin{{/str}}"> <nav class="nav navbar-nav d-md-none" aria-label="{{#str}}custommenu, admin{{/str}}">
{{# output.custom_menu_flat }} {{# output.custom_menu_flat }}
<ul class="list-unstyled pt-3"> <ul class="list-unstyled pt-3">
{{> theme_boost/custom_menu_footer }} {{> theme_ilb/custom_menu_footer }}
</ul> </ul>
{{/ output.custom_menu_flat }} {{/ output.custom_menu_flat }}
</nav> </nav>

10
templates/login.mustache

@ -15,7 +15,7 @@
along with Moodle. If not, see <http://www.gnu.org/licenses/>. along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}} }}
{{! {{!
@template theme_boost/login @template theme_ilb/login
Login page template Login page template
@ -29,7 +29,7 @@
} }
} }
}} }}
{{> theme_boost/head }} {{> theme_ilb/head }}
<body {{{ bodyattributes }}}> <body {{{ bodyattributes }}}>
{{> core/local/toast/wrapper}} {{> core/local/toast/wrapper}}
@ -68,8 +68,8 @@
</body> </body>
</html> </html>
{{#js}} {{#js}}
M.util.js_pending('theme_boost/loader'); M.util.js_pending('theme_ilb/loader');
require(['theme_boost/loader'], function() { require(['theme_ilb/loader'], function() {
M.util.js_complete('theme_boost/loader'); M.util.js_complete('theme_ilb/loader');
}); });
{{/js}} {{/js}}

10
templates/maintenance.mustache

@ -15,9 +15,9 @@
along with Moodle. If not, see <http://www.gnu.org/licenses/>. along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}} }}
{{! {{!
@template theme_boost/maintenance @template theme_ilb/maintenance
Boost maintenance layout template. Ilb maintenance layout template.
Context variables required for this template: Context variables required for this template:
* output - The core renderer for the page * output - The core renderer for the page
@ -74,8 +74,8 @@
</body> </body>
</html> </html>
{{#js}} {{#js}}
M.util.js_pending('theme_boost/loader'); M.util.js_pending('theme_ilb/loader');
require(['theme_boost/loader'], function() { require(['theme_ilb/loader'], function() {
M.util.js_complete('theme_boost/loader'); M.util.js_complete('theme_ilb/loader');
}); });
{{/js}} {{/js}}

4
templates/nav-drawer.mustache

@ -1,9 +1,9 @@
{{! {{!
@template theme_boost/nav-drawer @template theme_ilb/nav-drawer
Example context (json): {} Example context (json): {}
}} }}
<div id="nav-drawer" data-region="drawer" class="d-print-none moodle-has-zindex {{^navdraweropen}}closed{{/navdraweropen}}" aria-hidden="{{#navdraweropen}}false{{/navdraweropen}}{{^navdraweropen}}true{{/navdraweropen}}" tabindex="-1"> <div id="nav-drawer" data-region="drawer" class="d-print-none moodle-has-zindex {{^navdraweropen}}closed{{/navdraweropen}}" aria-hidden="{{#navdraweropen}}false{{/navdraweropen}}{{^navdraweropen}}true{{/navdraweropen}}" tabindex="-1">
{{> theme_boost/flat_navigation }} {{> theme_ilb/flat_navigation }}
</div> </div>

14
templates/secure.mustache

@ -15,9 +15,9 @@
along with Moodle. If not, see <http://www.gnu.org/licenses/>. along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}} }}
{{! {{!
@template theme_boost/secure @template theme_ilb/secure
Boost secure layout template. Ilb secure layout template.
Context variables required for this template: Context variables required for this template:
* sitename - The name of the site * sitename - The name of the site
@ -34,7 +34,7 @@
} }
} }
}} }}
{{> theme_boost/head }} {{> theme_ilb/head }}
<body {{{ bodyattributes }}}> <body {{{ bodyattributes }}}>
{{> core/local/toast/wrapper}} {{> core/local/toast/wrapper}}
@ -43,7 +43,7 @@
{{{ output.standard_top_of_body_html }}} {{{ output.standard_top_of_body_html }}}
{{>theme_boost/navbar-secure}} {{>theme_ilb/navbar-secure}}
<div id="page" class="container-fluid"> <div id="page" class="container-fluid">
{{! Secured full header }} {{! Secured full header }}
@ -88,8 +88,8 @@
</body> </body>
</html> </html>
{{#js}} {{#js}}
M.util.js_pending('theme_boost/loader'); M.util.js_pending('theme_ilb/loader');
require(['theme_boost/loader'], function() { require(['theme_ilb/loader'], function() {
M.util.js_complete('theme_boost/loader'); M.util.js_complete('theme_ilb/loader');
}); });
{{/js}} {{/js}}

6
version.php

@ -15,9 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/** /**
* Boost. * Ilb.
* *
* @package theme_boost * @package theme_ilb
* @copyright 2016 Frédéric Massart * @copyright 2016 Frédéric Massart
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
@ -26,4 +26,4 @@ defined('MOODLE_INTERNAL') || die();
$plugin->version = 2021051700; $plugin->version = 2021051700;
$plugin->requires = 2021051100; $plugin->requires = 2021051100;
$plugin->component = 'theme_boost'; $plugin->component = 'theme_ilb';

Loading…
Cancel
Save