Skip to content

Commit 2cc08cf

Browse files
committed
Fix merge with main.
1 parent f0ff0b2 commit 2cc08cf

File tree

1 file changed

+70
-67
lines changed

1 file changed

+70
-67
lines changed

settings.php

+70-67
Original file line numberDiff line numberDiff line change
@@ -2802,7 +2802,6 @@
28022802
// Add tab to settings page.
28032803
$page->add($tab);
28042804

2805-
28062805
// Create administration tab.
28072806
$tab = new admin_settingpage('theme_boost_union_functionality_administration',
28082807
get_string('administrationtab', 'theme_boost_union', null, true));
@@ -2830,24 +2829,6 @@
28302829
// Add settings page to the admin settings category.
28312830
$ADMIN->add('theme_boost_union', $page);
28322831

2833-
// Create SCSS snippets settings page with tabs (and external pages).
2834-
// (and allow users with the theme/boost_union:configure capability to access it).
2835-
$page = new admin_settingspage_tabs_with_external('theme_boost_union_snippets',
2836-
get_string('configtitlesnippets', 'theme_boost_union', null, true),
2837-
'theme/boost_union:configure');
2838-
2839-
// Create SCSS snippets overview tab
2840-
// (and allow users with the theme/boost_union:configure capability to access it).
2841-
$tab = new admin_externalpage_in_tab('theme_boost_union_snippets_overview',
2842-
get_string('snippetsoverview', 'theme_boost_union', null, true),
2843-
new moodle_url('/theme/boost_union/snippets/overview.php'),
2844-
'theme/boost_union:configure');
2845-
2846-
// Add tab to settings page.
2847-
$page->add($tab);
2848-
2849-
// Add settings page to the admin settings category.
2850-
$ADMIN->add('theme_boost_union', $page);
28512832

28522833
// Create Accessibility settings page with tabs
28532834
// (and allow users with the theme/boost_union:configure capability to access it).
@@ -2921,54 +2902,6 @@
29212902
// Add tab to settings page.
29222903
$page->add($tab);
29232904

2924-
// Create SCSS snippets settings tab.
2925-
$tab = new admin_settingpage('theme_boost_union_snippets_settings',
2926-
get_string('snippetssettings', 'theme_boost_union', null, true));
2927-
2928-
// Create built-in snippets heading.
2929-
$name = 'theme_boost_union/builtinsnippetsheading';
2930-
$title = get_string('snippetsbuiltinsnippetsheading', 'theme_boost_union', null, true);
2931-
$setting = new admin_setting_heading($name, $title, null);
2932-
$tab->add($setting);
2933-
2934-
// Setting: Enable built-in snippets.
2935-
$name = 'theme_boost_union/enablebuiltinsnippets';
2936-
$title = get_string('enablebuiltinsnippets', 'theme_boost_union', null, true);
2937-
$description = get_string('enablebuiltinsnippets_desc', 'theme_boost_union', null, true);
2938-
$setting = new admin_setting_configselect($name, $title, $description, THEME_BOOST_UNION_SETTING_SELECT_NO, $yesnooption);
2939-
$setting->set_updatedcallback('theme_reset_all_caches');
2940-
$tab->add($setting);
2941-
2942-
// Create uploaded snippets heading.
2943-
$name = 'theme_boost_union/uploadedsnippetsheading';
2944-
$title = get_string('snippetsuploadedsnippetsheading', 'theme_boost_union', null, true);
2945-
$setting = new admin_setting_heading($name, $title, null);
2946-
$tab->add($setting);
2947-
2948-
// Setting: Enable uploaded snippets.
2949-
$name = 'theme_boost_union/enableuploadedsnippets';
2950-
$title = get_string('enableuploadedsnippets', 'theme_boost_union', null, true);
2951-
$description = get_string('enableuploadedsnippets_desc', 'theme_boost_union', null, true);
2952-
$setting = new admin_setting_configselect($name, $title, $description, THEME_BOOST_UNION_SETTING_SELECT_NO, $yesnooption);
2953-
$setting->set_updatedcallback('theme_reset_all_caches');
2954-
$tab->add($setting);
2955-
2956-
// Setting: Uploaded snippets.
2957-
$name = 'theme_boost_union/uploadedsnippets';
2958-
$title = get_string('uploadedsnippets', 'theme_boost_union', null, true);
2959-
$snippetrepourl = 'https://github.com/moodle-an-hochschulen/moodle-theme_boost_union_snippets';
2960-
$description = get_string('uploadedsnippets_desc', 'theme_boost_union', ['url' => $snippetrepourl], true);
2961-
$uploadedsnippetsextensions = array_map(function($item) {
2962-
return '.'.$item;
2963-
}, snippets::ALLOWED_PREVIEW_FILE_EXTENSIONS);;
2964-
$uploadedsnippetsextensions[] = '.scss';
2965-
$uploadedsnippetsextensions[] = '.zip';
2966-
$setting = new admin_setting_configstoredfile($name, $title, $description, 'snippets', 0,
2967-
['maxfiles' => -1, 'subdirs' => 1, 'accepted_types' => $uploadedsnippetsextensions]);
2968-
$tab->add($setting);
2969-
$page->hide_if('theme_boost_union/uploadedsnippets', 'theme_boost_union/enableuploadedsnippets', 'neq',
2970-
THEME_BOOST_UNION_SETTING_SELECT_YES);
2971-
29722905
// Create Support tab.
29732906
$tab = new admin_settingpage('theme_boost_union_content_accessibilitysupport',
29742907
get_string('accessibilitysupporttab', 'theme_boost_union', null, true));
@@ -3119,6 +3052,76 @@
31193052

31203053
// Add settings page to the admin settings category.
31213054
$ADMIN->add('theme_boost_union', $page);
3055+
3056+
// Create SCSS snippets settings page with tabs (and external pages).
3057+
// (and allow users with the theme/boost_union:configure capability to access it).
3058+
$page = new admin_settingspage_tabs_with_external('theme_boost_union_snippets',
3059+
get_string('configtitlesnippets', 'theme_boost_union', null, true),
3060+
'theme/boost_union:configure');
3061+
3062+
// Create SCSS snippets overview tab
3063+
// (and allow users with the theme/boost_union:configure capability to access it).
3064+
$tab = new admin_externalpage_in_tab('theme_boost_union_snippets_overview',
3065+
get_string('snippetsoverview', 'theme_boost_union', null, true),
3066+
new moodle_url('/theme/boost_union/snippets/overview.php'),
3067+
'theme/boost_union:configure');
3068+
3069+
// Add tab to settings page.
3070+
$page->add($tab);
3071+
3072+
// Create SCSS snippets settings tab.
3073+
$tab = new admin_settingpage('theme_boost_union_snippets_settings',
3074+
get_string('snippetssettings', 'theme_boost_union', null, true));
3075+
3076+
// Create built-in snippets heading.
3077+
$name = 'theme_boost_union/builtinsnippetsheading';
3078+
$title = get_string('snippetsbuiltinsnippetsheading', 'theme_boost_union', null, true);
3079+
$setting = new admin_setting_heading($name, $title, null);
3080+
$tab->add($setting);
3081+
3082+
// Setting: Enable built-in snippets.
3083+
$name = 'theme_boost_union/enablebuiltinsnippets';
3084+
$title = get_string('enablebuiltinsnippets', 'theme_boost_union', null, true);
3085+
$description = get_string('enablebuiltinsnippets_desc', 'theme_boost_union', null, true);
3086+
$setting = new admin_setting_configselect($name, $title, $description, THEME_BOOST_UNION_SETTING_SELECT_NO, $yesnooption);
3087+
$setting->set_updatedcallback('theme_reset_all_caches');
3088+
$tab->add($setting);
3089+
3090+
// Create uploaded snippets heading.
3091+
$name = 'theme_boost_union/uploadedsnippetsheading';
3092+
$title = get_string('snippetsuploadedsnippetsheading', 'theme_boost_union', null, true);
3093+
$setting = new admin_setting_heading($name, $title, null);
3094+
$tab->add($setting);
3095+
3096+
// Setting: Enable uploaded snippets.
3097+
$name = 'theme_boost_union/enableuploadedsnippets';
3098+
$title = get_string('enableuploadedsnippets', 'theme_boost_union', null, true);
3099+
$description = get_string('enableuploadedsnippets_desc', 'theme_boost_union', null, true);
3100+
$setting = new admin_setting_configselect($name, $title, $description, THEME_BOOST_UNION_SETTING_SELECT_NO, $yesnooption);
3101+
$setting->set_updatedcallback('theme_reset_all_caches');
3102+
$tab->add($setting);
3103+
3104+
// Setting: Uploaded snippets.
3105+
$name = 'theme_boost_union/uploadedsnippets';
3106+
$title = get_string('uploadedsnippets', 'theme_boost_union', null, true);
3107+
$snippetrepourl = 'https://github.com/moodle-an-hochschulen/moodle-theme_boost_union_snippets';
3108+
$description = get_string('uploadedsnippets_desc', 'theme_boost_union', ['url' => $snippetrepourl], true);
3109+
$uploadedsnippetsextensions = array_map(function($item) {
3110+
return '.'.$item;
3111+
}, snippets::ALLOWED_PREVIEW_FILE_EXTENSIONS);;
3112+
$uploadedsnippetsextensions[] = '.scss';
3113+
$uploadedsnippetsextensions[] = '.zip';
3114+
$setting = new admin_setting_configstoredfile($name, $title, $description, 'snippets', 0,
3115+
['maxfiles' => -1, 'subdirs' => 1, 'accepted_types' => $uploadedsnippetsextensions]);
3116+
$tab->add($setting);
3117+
$page->hide_if('theme_boost_union/uploadedsnippets', 'theme_boost_union/enableuploadedsnippets', 'neq',
3118+
THEME_BOOST_UNION_SETTING_SELECT_YES);
3119+
3120+
// Add tab to settings page.
3121+
$page->add($tab);
3122+
3123+
// Add settings page to the admin settings category.
3124+
$ADMIN->add('theme_boost_union', $page);
31223125
}
31233126

31243127
// Add JS to remember the active admin tab to the page.

0 commit comments

Comments
 (0)