Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 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
 *
19
 * @package   theme_monocolor
20
 * @copyright 2022 - 2023 Marcin Czaja (https://rosea.io)
21
 * @license   Commercial https://themeforest.net/licenses
22
 *
23
 */
24
 
25
 
26
defined('MOODLE_INTERNAL') || die();
27
 
28
 
29
$page = new admin_settingpage('theme_monocolor_settingsfooter', get_string( 'settingsfooter', 'theme_monocolor'));
30
$name = 'theme_monocolor/showfooterbuttons';
31
$title = get_string('showfooterbuttons', 'theme_monocolor');
32
$description = get_string('showfooterbuttons_desc', 'theme_monocolor');
33
$default = 1;
34
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
35
$page->add($setting);
36
 
37
 
38
$name = 'theme_monocolor/hfooterblocks';
39
$heading = get_string('hfooterblocks', 'theme_monocolor');
40
$title = get_string('hfooterblocks_desc', 'theme_monocolor');
41
$setting = new admin_setting_heading($name, $heading, format_text($title, FORMAT_MARKDOWN));
42
$page->add($setting);
43
 
44
$name = 'theme_monocolor/footerblock1';
45
$title = get_string('footerblock1', 'theme_monocolor');
46
$description = get_string('footerblock1_desc', 'theme_monocolor');
47
$default = '<div class="row text-sm-center text-md-left">
48
<div class="col-12 col-lg-5 pr-lg-5 mr-lg-5 my-sm-2 my-md-0">
49
<div class="d-flex justify-content-center justify-content-md-start">
50
<img src="https://assets.rosea.io/monocolor/demo/monocolor-logo-white.svg" width="66" height="40" class="img-fluid"/>
51
</div>
52
<h5 class="rui-footer-nav-title mt-3">Monocolor</h5>
53
<p class="text-size-xs">
54
Powerful, fully responsive, and easy-to-use Moodle Theme.
55
Works with Moodle 4.1, 4.0.<br>
56
<a href="#" target="_blank" title="Documentation - Footer Customization">Theme Documentation</a>
57
</p>
58
<p class="text-size-xs">
59
Made in Poland
60
</p>
61
</div>
62
<div class="col-12 col-lg my-sm-2 my-md-0">
63
<h5 class="rui-footer-nav-title">Course</h5>
64
<ul class="rui-footer-nav-items list-unstyled mb-0">
65
<li> <a href="#" target="_blank" title="Standard Course View">Standard Layout</a> </li>
66
<li> <a href="#" target="_blank" title="Tab Layout">Tab Layout</a>
67
<span class="badge-xs badge-primary ml-2">Demo</span> </li>
68
<li> <a href="#" target="_blank">Format Plugins</a> </li>
69
<li> <a href="#">Paid Course (PayPal, etc.)</a> </li>
70
 
71
</ul>
72
</div>
73
<div class="col-12 col-lg mt-sm-4 mt-lg-0">
74
<h5 class="rui-footer-nav-title">UI Elements</h5>
75
<ul class="rui-footer-nav-items list-unstyled mb-0">
76
<li> <a href="#">Front Page Blocks</a> </li>
77
<li> <a href="#">Blocks - Header</a> </li>
78
<li> <a href="#">Blocks - Footer</a> </li>
79
<li> <a href="#">Grid Content</a> </li>
80
<li> <a href="#">List</a> </li>
81
<li> <a href="#">Team</a> </li>
82
<li> <a href="#">Stats</a> </li>
83
<li> <a href="#">FAQ</a> </li>
84
</ul>
85
</div>
86
<div class="col-12 col-lg mt-sm-4 mt-lg-0">
87
<h5 class="rui-footer-nav-title">More</h5>
88
<ul class="rui-footer-nav-items list-unstyled mb-0">
89
<li> <a href="#">Icons</a> </li>
90
<li> <a href="#">Plugins support</a> </li>
91
<li> <a href="https://rosea.gitbook.io/monocolor/" target="_blank" title="Theme Doc">Theme Doc</a> </li>
92
</ul>
93
</div>
94
</div>
95
<br />To edit this block go to: Site administration - Appearance - Monocolor - Footer - Footer Block #1';
96
$setting = new monocolor_setting_confightmleditor($name, $title, $description, $default);
97
$page->add($setting);
98
 
99
$name = 'theme_monocolor/footerblock1hr';
100
$title = get_string('footerblock1hr', 'theme_monocolor');
101
$description = get_string('footerblock1hr_desc', 'theme_monocolor');
102
$default = '1';
103
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
104
$page->add($setting);
105
 
106
$name = 'theme_monocolor/footerblock2';
107
$title = get_string('footerblock2', 'theme_monocolor');
108
$description = get_string('footerblock2_desc', 'theme_monocolor');
109
$default = '';
110
$setting = new monocolor_setting_confightmleditor($name, $title, $description, $default);
111
$page->add($setting);
112
 
113
$name = 'theme_monocolor/footerblock2hr';
114
$title = get_string('footerblock2hr', 'theme_monocolor');
115
$description = get_string('footerblock2hr_desc', 'theme_monocolor');
116
$default = '1';
117
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
118
$page->add($setting);
119
 
120
$name = 'theme_monocolor/footerblock3';
121
$title = get_string('footerblock3', 'theme_monocolor');
122
$description = get_string('footerblock3_desc', 'theme_monocolor');
123
$default = 'To edit this block go to: Site administration - Appearance - Monocolor - Footer - Footer Block #3
124
<small>Get this theme exclusively on ThemeForest. Check all available Moodle themes
125
<a href="https://rosea.io" class="underline--anim">rosea.io</a></small>';
126
$setting = new monocolor_setting_confightmleditor($name, $title, $description, $default);
127
$page->add($setting);
128
 
129
$name = 'theme_monocolor/footercopy';
130
$title = get_string('footercopy', 'theme_monocolor');
131
$description = get_string('footercopy_desc', 'theme_monocolor');
132
$default = '© <strong>2023</strong>
133
<br />To edit this block go to: Site administration - Appearance - Monocolor - Footer - Footer Copy';
134
$setting = new monocolor_setting_confightmleditor($name, $title, $description, $default);
135
$page->add($setting);
136
 
137
$name = 'theme_monocolor/hfootercolors';
138
$heading = get_string('hfootercolors', 'theme_monocolor');
139
$title = get_string('hfootercolors_desc', 'theme_monocolor');
140
$setting = new admin_setting_heading($name, $heading, format_text($title, FORMAT_MARKDOWN));
141
$page->add($setting);
142
 
143
$name = 'theme_monocolor/colorfooterbg';
144
$title = get_string('colorfooterbg', 'theme_monocolor');
145
$description = get_string('color_desc', 'theme_monocolor');
146
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
147
$setting->set_updatedcallback('theme_reset_all_caches');
148
$page->add($setting);
149
 
150
$name = 'theme_monocolor/colorfooterborder';
151
$title = get_string('colorfooterborder', 'theme_monocolor');
152
$description = get_string('color_desc', 'theme_monocolor');
153
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
154
$setting->set_updatedcallback('theme_reset_all_caches');
155
$page->add($setting);
156
 
157
$name = 'theme_monocolor/colorfootertext';
158
$title = get_string('colorfootertext', 'theme_monocolor');
159
$description = get_string('color_desc', 'theme_monocolor');
160
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
161
$setting->set_updatedcallback('theme_reset_all_caches');
162
$page->add($setting);
163
 
164
$name = 'theme_monocolor/colorfooterlink';
165
$title = get_string('colorfooterlink', 'theme_monocolor');
166
$description = get_string('color_desc', 'theme_monocolor');
167
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
168
$setting->set_updatedcallback('theme_reset_all_caches');
169
$page->add($setting);
170
 
171
$name = 'theme_monocolor/colorfooterlinkhover';
172
$title = get_string('colorfooterlinkhover', 'theme_monocolor');
173
$description = get_string('color_desc', 'theme_monocolor');
174
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
175
$setting->set_updatedcallback('theme_reset_all_caches');
176
$page->add($setting);
177
 
178
$fileid = 'footerbgimg';
179
$name = 'theme_monocolor/footerbgimg';
180
$title = get_string('footerbgimg', 'theme_monocolor');
181
$description = get_string('footerbgimg_desc', 'theme_monocolor');
182
$opts = array('accepted_types' => array('.png', '.jpg', '.gif', '.webp', '.tiff', '.svg'), 'maxfiles' => 1);
183
$setting = new admin_setting_configstoredfile($name, $title, $description, $fileid, 0, $opts);
184
$setting->set_updatedcallback('theme_reset_all_caches');
185
$page->add($setting);
186
 
187
$name = 'theme_monocolor/footercustomcss';
188
$title = get_string('footercustomcss', 'theme_monocolor');
189
$description = get_string('blockcustomcss_desc', 'theme_monocolor');
190
$default = '';
191
$setting = new admin_setting_configtextarea($name, $title, $description, $default);
192
$page->add($setting);
193
 
194
 
195
$name = 'theme_monocolor/hfootersocial';
196
$heading = get_string('hfootersocial', 'theme_monocolor');
197
$title = get_string('hfootersocial_desc', 'theme_monocolor');
198
$setting = new admin_setting_heading($name, $heading, format_text($title, FORMAT_MARKDOWN));
199
$page->add($setting);
200
 
201
$name = 'theme_monocolor/showbasicinfolist';
202
$title = get_string('showbasicinfolist', 'theme_monocolor');
203
$description = get_string('showbasicinfolist_desc', 'theme_monocolor');
204
$default = '0';
205
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
206
$page->add($setting);
207
 
208
// Website.
209
$name = 'theme_monocolor/website';
210
$title = get_string('website', 'theme_monocolor');
211
$description = get_string('website_desc', 'theme_monocolor');
212
$default = 'Moodle Themes';
213
$setting = new admin_setting_configtext($name, $title, $description, $default);
214
$page->add($setting);
215
 
216
// Website.
217
$name = 'theme_monocolor/cwebsiteurl';
218
$title = get_string('cwebsiteurl', 'theme_monocolor');
219
$description = get_string('cwebsiteurl_desc', 'theme_monocolor');
220
$default = 'https://rosea.io';
221
$setting = new admin_setting_configtext($name, $title, $description, $default);
222
$page->add($setting);
223
 
224
// Mobile.
225
$name = 'theme_monocolor/mobile';
226
$title = get_string('mobile', 'theme_monocolor');
227
$description = get_string('mobile_desc', 'theme_monocolor');
228
$default = 'Mobile : +12 (34) 00123-45678';
229
$setting = new admin_setting_configtext($name, $title, $description, $default);
230
$page->add($setting);
231
 
232
// Mail.
233
$name = 'theme_monocolor/mail';
234
$title = get_string('mail', 'theme_monocolor');
235
$description = get_string('mail_desc', 'theme_monocolor');
236
$default = 'sample@mail.com';
237
$setting = new admin_setting_configtext($name, $title, $description, $default);
238
$page->add($setting);
239
 
240
$name = 'theme_monocolor/showsociallist';
241
$title = get_string('showsociallist', 'theme_monocolor');
242
$description = get_string('showsociallist_desc', 'theme_monocolor');
243
$default = '0';
244
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
245
$page->add($setting);
246
 
247
// Facebook url setting.
248
$name = 'theme_monocolor/facebook';
249
$title = get_string('facebook', 'theme_monocolor');
250
$description = get_string('facebook_desc', 'theme_monocolor');
251
$default = '';
252
$setting = new admin_setting_configtext($name, $title, $description, $default);
253
$page->add($setting);
254
 
255
// Twitter url setting.
256
$name = 'theme_monocolor/twitter';
257
$title = get_string('twitter', 'theme_monocolor');
258
$description = get_string('twitter_desc', 'theme_monocolor');
259
$default = '';
260
$setting = new admin_setting_configtext($name, $title, $description, $default);
261
$page->add($setting);
262
 
263
// Linkdin url setting.
264
$name = 'theme_monocolor/linkedin';
265
$title = get_string('linkedin', 'theme_monocolor');
266
$description = get_string('linkedin_desc', 'theme_monocolor');
267
$default = '';
268
$setting = new admin_setting_configtext($name, $title, $description, $default);
269
$page->add($setting);
270
 
271
// Youtube url setting.
272
$name = 'theme_monocolor/youtube';
273
$title = get_string('youtube', 'theme_monocolor');
274
$description = get_string('youtube_desc', 'theme_monocolor');
275
$default = '';
276
$setting = new admin_setting_configtext($name, $title, $description, $default);
277
$page->add($setting);
278
 
279
// Instagram url setting.
280
$name = 'theme_monocolor/instagram';
281
$title = get_string('instagram', 'theme_monocolor');
282
$description = get_string('instagram_desc', 'theme_monocolor');
283
$default = '';
284
$setting = new admin_setting_configtext($name, $title, $description, $default);
285
$page->add($setting);
286
 
287
// Cutsom icons setting.
288
$name = 'theme_monocolor/customsocialicon';
289
$title = get_string('customsocialicon', 'theme_monocolor');
290
$description = get_string('customsocialicon_desc', 'theme_monocolor');
291
$default = '';
292
$setting = new admin_setting_configtextarea($name, $title, $description, $default);
293
$page->add($setting);
294
 
295
// Must add the page after definiting all the settings!
296
$settings->add($page);