Commit 2b9f093a authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Add site option to turn off view theme selector


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 9590a268
......@@ -244,6 +244,12 @@ $siteoptionform = array(
'description' => get_string('smallviewheadersdescription', 'admin'),
'defaultvalue' => get_config('viewmicroheaders'),
),
'userscanchooseviewthemes' => array(
'type' => 'checkbox',
'title' => get_string('userscanchooseviewthemes', 'admin'),
'description' => get_string('userscanchooseviewthemesdescription', 'admin'),
'defaultvalue' => get_config('userscanchooseviewthemes'),
),
)
);
......@@ -268,7 +274,7 @@ function siteoptions_submit(Pieform $form, $values) {
'allowpublicviews', 'allowpublicprofiles', 'creategroups', 'createpublicgroups', 'searchplugin',
'registration_sendweeklyupdates', 'institutionexpirynotification', 'institutionautosuspend',
'captchaonregisterform', 'captchaoncontactform', 'showselfsearchsideblock', 'showtagssideblock',
'tagssideblockmaxtags', 'country', 'viewmicroheaders',
'tagssideblockmaxtags', 'country', 'viewmicroheaders', 'userscanchooseviewthemes',
);
$oldlanguage = get_config('lang');
$oldtheme = get_config('theme');
......
......@@ -192,6 +192,8 @@ $string['trustedsites'] = 'Trusted sites';
$string['updatesiteoptions'] = 'Update site options';
$string['usersallowedmultipleinstitutions'] = 'Users allowed multiple institutions';
$string['usersallowedmultipleinstitutionsdescription'] = 'If checked, users can be members of several institutions at the same time';
$string['userscanchooseviewthemes'] = 'Users can choose View themes';
$string['userscanchooseviewthemesdescription'] = 'If enabled, users will be allowed to select a theme when editing a View. The View will be displayed to other users using the selected theme.';
$string['usersseenewthemeonlogin'] = 'Other users will see the new theme the next time they log in.';
$string['smallviewheaders'] = 'Small View page headers';
$string['smallviewheadersdescription'] = 'If enabled, a small header and site navigation block will be displayed when viewing or editing Views.';
......
......@@ -1335,6 +1335,10 @@ function xmldb_core_upgrade($oldversion=0) {
set_config('viewmicroheaders', 1);
}
if ($oldversion < 2010012701) {
set_config('userscanchooseviewthemes', 1);
}
return $status;
}
......
......@@ -672,6 +672,7 @@ function core_install_firstcoredata_defaults() {
set_config('tagssideblockmaxtags', 20);
set_config('usersallowedmultipleinstitutions', 1);
set_config('viewmicroheaders', 1);
set_config('userscanchooseviewthemes', 1);
// install the applications
$app = new StdClass;
......
......@@ -28,7 +28,7 @@
defined('INTERNAL') || die();
$config = new StdClass;
$config->version = 2010012700;
$config->version = 2010012701;
$config->release = '1.3.0dev';
$config->minupgradefrom = 2008040200;
$config->minupgraderelease = '1.0.0 (release tag 1.0.0_RELEASE)';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment