Proyectos de Subversion Moodle

Rev

Rev 1382 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1382 Rev 1383
Línea 2... Línea 2...
2
 
2
 
Línea 3... Línea 3...
3
// Every file should have GPL and copyright in the header - we skip it in tutorials but you should not skip it for real.
3
// Every file should have GPL and copyright in the header - we skip it in tutorials but you should not skip it for real.
4
 
4
 
-
 
5
// This line protects the file from being accessed by a URL directly.                                                               
-
 
6
defined('MOODLE_INTERNAL') || die();
-
 
7
require_once(__DIR__ . '/../universe/libs/admin_confightmleditor.php');
5
// This line protects the file from being accessed by a URL directly.                                                               
8
require_once($CFG->dirroot . '/theme/universe/lib.php');
6
defined('MOODLE_INTERNAL') || die();
9
 
7
$siteurl = $CFG->wwwroot;
10
$siteurl = $CFG->wwwroot;
Línea 8... Línea 11...
8
$a = new stdClass;
11
$a = new stdClass;
Línea 13... Línea 16...
13
if ($ADMIN->fulltree) {
16
if ($ADMIN->fulltree) {
Línea 14... Línea 17...
14
 
17
 
15
    // Boost provides a nice setting page which splits settings onto separate tabs. We want to use it here.                         
18
    // Boost provides a nice setting page which splits settings onto separate tabs. We want to use it here.                         
Línea -... Línea 19...
-
 
19
    $settings = new theme_universe_admin_settingspage_tabs('themesettinguniverse_child', get_string('configtitle', 'theme_universe_child'));
16
    $settings = new theme_universe_admin_settingspage_tabs('themesettinguniverse_child', get_string('configtitle', 'theme_universe_child'));
20
 
-
 
21
    // Include inherited settings
-
 
22
    require_once(__DIR__ . '/settings/inherit_settings.php');
17
 
23
 
Línea 18... Línea 24...
18
    // Each page is a tab - the first is the "General" tab.                                                                         
24
    // Child theme specific settings
19
    $page = new admin_settingpage('theme_universe_child_general', get_string('generalsettings', 'theme_universe_child'));
25
    $page = new admin_settingpage('theme_universe_child_specific', get_string('childthemesettings', 'theme_universe_child'));
20
 
26
 
21
    // Replicate the preset setting from boost.                                                                                     
27
    // Replicate the preset setting from boost.                                                                                     
Línea 64... Línea 70...
64
    $description = get_string('brandcolor_desc', 'theme_universe_child');
70
    $description = get_string('brandcolor_desc', 'theme_universe_child');
65
    $setting = new admin_setting_configcolourpicker($name, $title, $description, '');
71
    $setting = new admin_setting_configcolourpicker($name, $title, $description, '');
66
    $setting->set_updatedcallback('theme_reset_all_caches');
72
    $setting->set_updatedcallback('theme_reset_all_caches');
67
    $page->add($setting);
73
    $page->add($setting);
Línea 68... Línea 74...
68
 
74
 
-
 
75
    // Raw SCSS to include before the content.                                                                                      
-
 
76
    $setting = new admin_setting_configtextarea(
-
 
77
        'theme_universe_child/scsspre',
-
 
78
        get_string('rawscsspre', 'theme_universe_child'),
-
 
79
        get_string('rawscsspre_desc', 'theme_universe_child'),
-
 
80
        '',
-
 
81
        PARAM_RAW
-
 
82
    );
-
 
83
    $setting->set_updatedcallback('theme_reset_all_caches');
-
 
84
    $page->add($setting);
-
 
85
 
-
 
86
    // Raw SCSS to include after the content.                                                                                       
-
 
87
    $setting = new admin_setting_configtextarea(
-
 
88
        'theme_universe_child/scss',
-
 
89
        get_string('rawscss', 'theme_universe_child'),
-
 
90
        get_string('rawscss_desc', 'theme_universe_child'),
-
 
91
        '',
-
 
92
        PARAM_RAW
-
 
93
    );
-
 
94
    $setting->set_updatedcallback('theme_reset_all_caches');
-
 
95
    $page->add($setting);
69
    // Must add the page after definiting all the settings!                                                                         
96
 
Línea 70... Línea 97...
70
    $settings->add($page);
97
    $settings->add($page);
71
 
98