Proyectos de Subversion Moodle

Rev

Rev 1344 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1342 ariadna 1
<?php
2
// This file is part of Moodle - http://moodle.org/
3
//
4
// Moodle is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8
//
9
// Moodle is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
16
 
17
/**
18
 *
1344 ariadna 19
 * @package   theme_universe_child
1342 ariadna 20
 * @copyright 2023 Marcin Czaja (https://rosea.io)
21
 * @license   Commercial https://themeforest.net/licenses
22
 *
23
 */
24
 
25
defined('MOODLE_INTERNAL') || die();
26
 
1349 ariadna 27
$page = new admin_settingpage('theme_universe_child_settingstopbar', get_string('settingstopbar', 'theme_universe_child'));
1342 ariadna 28
 
1344 ariadna 29
$name = 'theme_universe_child/topbarscss';
30
$title = get_string('topbarscss', 'theme_universe_child');
31
$description = get_string('topbarscss_desc', 'theme_universe_child');
1342 ariadna 32
$setting = new universe_setting_infosettingheading($name, $title, $description);
33
$page->add($setting);
34
 
35
// Prepare hide nodes options.
36
$hidenodesoptions = array(
37
    'home' => get_string('home'),
38
    'myhome' => get_string('myhome'),
39
    'courses' => get_string('mycourses')
40
);
41
 
42
// General settings.
1344 ariadna 43
$name = 'theme_universe_child/hlogoareageneral';
44
$heading = get_string('hlogoareageneral', 'theme_universe_child');
45
$title = get_string('hlogoareageneral_desc', 'theme_universe_child');
1342 ariadna 46
$setting = new admin_setting_heading($name, $heading, format_text($title, FORMAT_MARKDOWN));
47
$page->add($setting);
48
 
49
// Setting: Hide nodes in primary navigation.
1344 ariadna 50
$name = 'theme_universe_child/hidenodesprimarynavigation';
51
$title = get_string('hidenodesprimarynavigationsetting', 'theme_universe_child', null, true);
52
$description = get_string('hidenodesprimarynavigationsetting_desc', 'theme_universe_child', null, true);
1342 ariadna 53
$setting = new admin_setting_configmulticheckbox($name, $title, $description, array(), $hidenodesoptions);
54
$setting->set_updatedcallback('theme_reset_all_caches');
55
$page->add($setting);
56
 
1344 ariadna 57
$name = 'theme_universe_child/topbareditmode';
58
$title = get_string('topbareditmode', 'theme_universe_child');
59
$description = get_string('topbareditmode_desc', 'theme_universe_child', $a);
1342 ariadna 60
$default = 0;
61
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
62
$setting->set_updatedcallback('theme_reset_all_caches');
63
$page->add($setting);
64
 
1344 ariadna 65
$name = 'theme_universe_child/topbarcustomhtml';
66
$title = get_string('topbarcustomhtml', 'theme_universe_child');
67
$description = get_string('topbarcustomhtml_desc', 'theme_universe_child', $a);
1342 ariadna 68
$default = '';
69
$setting = new admin_setting_confightmleditor($name, $title, $description, $default);
70
$page->add($setting);
71
 
72
// Custom Logo.
1344 ariadna 73
$name = 'theme_universe_child/hlogoarea';
74
$heading = get_string('hlogoarea', 'theme_universe_child');
75
$title = get_string('hlogoarea_desc', 'theme_universe_child');
1342 ariadna 76
$setting = new admin_setting_heading($name, $heading, format_text($title, FORMAT_MARKDOWN));
77
$page->add($setting);
78
 
1344 ariadna 79
$name = 'theme_universe_child/topbarlogoareaon';
80
$title = get_string('topbarlogoareaon', 'theme_universe_child');
81
$description = get_string('topbarlogoareaon_desc', 'theme_universe_child');
1342 ariadna 82
$default = 1;
83
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
84
$setting->set_updatedcallback('theme_reset_all_caches');
85
$page->add($setting);
86
 
1344 ariadna 87
$name = 'theme_universe_child/customlogo';
88
$title = get_string('customlogo', 'theme_universe_child');
89
$description = get_string('customlogo_desc', 'theme_universe_child');
1342 ariadna 90
$opts = array('accepted_types' => array('.png', '.jpg', '.svg', 'gif'));
91
$setting = new admin_setting_configstoredfile($name, $title, $description, 'customlogo', 0, $opts);
92
$page->add($setting);
93
 
1344 ariadna 94
$name = 'theme_universe_child/customdmlogo';
95
$title = get_string('customdmlogo', 'theme_universe_child');
96
$description = get_string('customdmlogo_desc', 'theme_universe_child');
1342 ariadna 97
$opts = array('accepted_types' => array('.png', '.jpg', '.svg', 'gif'));
98
$setting = new admin_setting_configstoredfile($name, $title, $description, 'customdmlogo', 0, $opts);
99
$page->add($setting);
100
 
1344 ariadna 101
$name = 'theme_universe_child/navbarlogobox';
102
$title = get_string('navbarlogobox', 'theme_universe_child');
103
$description = get_string('navbarlogobox_desc', 'theme_universe_child', $a);
1342 ariadna 104
$default = 0;
105
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
106
$setting->set_updatedcallback('theme_reset_all_caches');
107
$page->add($setting);
108
 
1344 ariadna 109
$name = 'theme_universe_child/customlogoandname';
110
$title = get_string('customlogoandname', 'theme_universe_child');
111
$description = get_string('customlogoandname_desc', 'theme_universe_child');
1342 ariadna 112
$default = 1;
113
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
114
$setting->set_updatedcallback('theme_reset_all_caches');
115
$page->add($setting);
116
 
1344 ariadna 117
$name = 'theme_universe_child/customlogotxt';
118
$title = get_string('customlogotxt', 'theme_universe_child');
119
$description = get_string('customlogotxt_desc', 'theme_universe_child');
1342 ariadna 120
$default = 'universe';
121
$setting = new admin_setting_configtext($name, $title, $description, $default);
122
$page->add($setting);
123
 
124
// Colors.
1344 ariadna 125
$name = 'theme_universe_child/htopbarcolors';
126
$heading = get_string('htopbarcolors', 'theme_universe_child');
127
$title = get_string('htopbarcolors_desc', 'theme_universe_child');
1342 ariadna 128
$setting = new admin_setting_heading($name, $heading, format_text($title, FORMAT_MARKDOWN));
129
$page->add($setting);
130
 
1344 ariadna 131
$name = 'theme_universe_child/colortopbarbg1';
132
$title = get_string('colortopbarbg1', 'theme_universe_child');
133
$description = get_string('color_desc', 'theme_universe_child');
1342 ariadna 134
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
135
$setting->set_updatedcallback('theme_reset_all_caches');
136
$page->add($setting);
137
 
1344 ariadna 138
$name = 'theme_universe_child/dmcolortopbarbg1';
139
$title = get_string('dmcolortopbarbg1', 'theme_universe_child');
140
$description = get_string('color_desc', 'theme_universe_child');
1342 ariadna 141
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
142
$setting->set_updatedcallback('theme_reset_all_caches');
143
$page->add($setting);
144
 
1344 ariadna 145
$name = 'theme_universe_child/colortopbarbg2';
146
$title = get_string('colortopbarbg2', 'theme_universe_child');
147
$description = get_string('color_desc', 'theme_universe_child');
1342 ariadna 148
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
149
$setting->set_updatedcallback('theme_reset_all_caches');
150
$page->add($setting);
151
 
1344 ariadna 152
$name = 'theme_universe_child/dmcolortopbarbg2';
153
$title = get_string('dmcolortopbarbg2', 'theme_universe_child');
154
$description = get_string('color_desc', 'theme_universe_child');
1342 ariadna 155
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
156
$setting->set_updatedcallback('theme_reset_all_caches');
157
$page->add($setting);
158
 
1344 ariadna 159
$name = 'theme_universe_child/colortopbartext';
160
$title = get_string('colortopbartext', 'theme_universe_child');
161
$description = get_string('color_desc', 'theme_universe_child');
1342 ariadna 162
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
163
$setting->set_updatedcallback('theme_reset_all_caches');
164
$page->add($setting);
165
 
1344 ariadna 166
$name = 'theme_universe_child/colortopbarbtntext';
167
$title = get_string('colortopbarbtntext', 'theme_universe_child');
168
$description = get_string('color_desc', 'theme_universe_child');
1342 ariadna 169
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
170
$setting->set_updatedcallback('theme_reset_all_caches');
171
$page->add($setting);
172
 
1344 ariadna 173
$name = 'theme_universe_child/colortopbarbtnhover';
174
$title = get_string('colortopbarbtnhover', 'theme_universe_child');
175
$description = get_string('color_desc', 'theme_universe_child');
1342 ariadna 176
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
177
$setting->set_updatedcallback('theme_reset_all_caches');
178
$page->add($setting);
179
 
1344 ariadna 180
$name = 'theme_universe_child/colortopbarbtnhovertext';
181
$title = get_string('colortopbarbtnhovertext', 'theme_universe_child');
182
$description = get_string('color_desc', 'theme_universe_child');
1342 ariadna 183
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
184
$setting->set_updatedcallback('theme_reset_all_caches');
185
$page->add($setting);
186
 
187
// Additional Button next to the Log in button.
1344 ariadna 188
$name = 'theme_universe_child/hadditionalbtn';
189
$heading = get_string('hadditionalbtn', 'theme_universe_child');
190
$title = get_string('hadditionalbtn_desc', 'theme_universe_child');
1342 ariadna 191
$setting = new admin_setting_heading($name, $heading, format_text($title, FORMAT_MARKDOWN));
192
$page->add($setting);
193
 
1344 ariadna 194
$name = 'theme_universe_child/topbaradditionalbtn';
195
$title = get_string('topbaradditionalbtn', 'theme_universe_child');
196
$description = get_string('topbaradditionalbtn_desc', 'theme_universe_child');
1342 ariadna 197
$default = 1;
198
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
199
$setting->set_updatedcallback('theme_reset_all_caches');
200
$page->add($setting);
201
 
1344 ariadna 202
$name = 'theme_universe_child/stopbaradditionalbtn';
203
$title = get_string('stopbaradditionalbtn', 'theme_universe_child');
204
$description = get_string('stopbaradditionalbtn_desc', 'theme_universe_child');
1342 ariadna 205
$default = '';
206
$setting = new admin_setting_configtextarea($name, $title, $description, $default);
207
$page->add($setting);
208
 
1344 ariadna 209
$name = 'theme_universe_child/topbaradditionalbtnurl';
210
$title = get_string('topbaradditionalbtnurl', 'theme_universe_child');
211
$description = get_string('topbaradditionalbtnurl_desc', 'theme_universe_child');
1342 ariadna 212
$default = '';
213
$setting = new admin_setting_configtext($name, $title, $description, $default);
214
$page->add($setting);
215
 
216
// Must add the page after definiting all the settings!
217
$settings->add($page);