forked from CTANZ/moodle-theme_decaf
-
Notifications
You must be signed in to change notification settings - Fork 1
/
settings.php
80 lines (69 loc) · 3.22 KB
/
settings.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?php
/**
* Settings for the decaf theme
*/
defined('MOODLE_INTERNAL') || die;
if ($ADMIN->fulltree) {
// Enable edit buttons (replace rows of icons)
$name = 'theme_decaf_green/useeditbuttons';
$title = get_string('useeditbuttons','theme_decaf');
$description = get_string('useeditbuttonsdesc', 'theme_decaf');
$default = 1;
$choices = array(1=>'Yes', 0=>'No');
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$settings->add($setting);
// Enable "persistent editing mode" (no need to turn on/off edit mode)
$name = 'theme_decaf_green/persistentedit';
$title = get_string('persistentedit','theme_decaf');
$description = get_string('persistenteditdesc', 'theme_decaf');
$default = 0;
$choices = array(0=>'No', 1=>'Yes');
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$settings->add($setting);
// Hide Settings block
$name = 'theme_decaf_green/hidesettingsblock';
$title = get_string('hidesettingsblock','theme_decaf');
$description = get_string('hidesettingsblockdesc', 'theme_decaf');
$default = 1;
$choices = array(1=>'Yes', 0=>'No');
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$settings->add($setting);
// Hide Navigation block
$name = 'theme_decaf_green/hidenavigationblock';
$title = get_string('hidenavigationblock','theme_decaf');
$description = get_string('hidenavigationblockdesc', 'theme_decaf');
$default = 0;
$choices = array(1=>'Yes', 0=>'No');
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$settings->add($setting);
// Show user profile picture
$name = 'theme_decaf_green/showuserpicture';
$title = get_string('showuserpicture','theme_decaf');
$description = get_string('showuserpicturedesc', 'theme_decaf');
$default = 0;
$choices = array(1=>'Yes', 0=>'No');
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$settings->add($setting);
// Add custom menu to Awesomebar
$name = 'theme_decaf_green/custommenuinawesomebar';
$title = get_string('custommenuinawesomebar','theme_decaf');
$description = get_string('custommenuinawesomebardesc', 'theme_decaf');
$default = 0;
$choices = array(1=>'Yes', 0=>'No');
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$settings->add($setting);
// Place custom menu after Awesomebar
$name = 'theme_decaf_green/custommenuafterawesomebar';
$title = get_string('custommenuafterawesomebar','theme_decaf');
$description = get_string('custommenuafterawesomebardesc', 'theme_decaf');
$default = 0;
$choices = array(0=>'No', 1=>'Yes');
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$settings->add($setting);
// Foot note setting
$name = 'theme_decaf_green/footnote';
$title = get_string('footnote','theme_decaf');
$description = get_string('footnotedesc', 'theme_decaf');
$setting = new admin_setting_confightmleditor($name, $title, $description, '');
$settings->add($setting);
}