Merge branch 'master' of git.moodle.org:/git/integration

This commit is contained in:
Eloy Lafuente (stronk7) 2011-08-29 02:04:46 +02:00
commit 6843dea2e9
6 changed files with 43 additions and 32 deletions

View file

@ -65,13 +65,15 @@ $string['fontsizereference'] = 'Font size reference';
$string['fontsizereferencedesc'] = 'This allows you to set the default font size for this theme. It is not recommended to set this higher than 13px as it is known to cause display problems with certain blocks.'; $string['fontsizereferencedesc'] = 'This allows you to set the default font size for this theme. It is not recommended to set this higher than 13px as it is known to cause display problems with certain blocks.';
$string['footnote'] = 'Footnote'; $string['footnote'] = 'Footnote';
$string['footnotedesc'] = 'The content from this textarea will be displayed in the footer of every page.'; $string['footnotedesc'] = 'The content from this textarea will be displayed in the footer of every page.';
$string['frontpagelogo'] = 'Custom front page logo';
$string['frontpagelogodesc'] = 'Change the logo that is displayed on the front page of your site by entering the URL to the image you wish to use (i.e. http://www.yoursite.local/myfrontpagelogo.png). This setting overrides the custom logo setting. As a reference the default logo is 300px wide, 80px high and a transparent png will work best.';
$string['headerbgc'] = 'Header background colour'; $string['headerbgc'] = 'Header background colour';
$string['headerbgcdesc'] = 'This sets the blocks header background colour for the theme.'; $string['headerbgcdesc'] = 'This sets the blocks header background colour for the theme.';
$string['heading'] = 'Display page heading'; $string['heading'] = 'Display page heading';
$string['lblockcolumnbgc'] = 'Left column background colour'; $string['lblockcolumnbgc'] = 'Left column background colour';
$string['lblockcolumnbgcdesc'] = 'This sets the left column background colour for the theme.'; $string['lblockcolumnbgcdesc'] = 'This sets the left column background colour for the theme.';
$string['logo'] = 'logo'; $string['logo'] = 'Custom logo';
$string['logodesc'] = 'Change the logo of this theme by entering the URL to a new one (i.e., http://www.somesite/animage.png). As a reference, the default logo is 300px wide by 80px high. A transparent .png will work best.<br />The chosen logo will be shown in each page of the site without any distinction between front page and other pages.'; $string['logodesc'] = 'Change the logo for this theme by entering the URL to an image you wish to use (i.e. http://www.yoursite.local/mylogo.png). As a reference the default logo is 200px wide, 50px high and a transparent png will work best.';
$string['moodlelogo'] = 'Display moodle logo'; $string['moodlelogo'] = 'Display moodle logo';
$string['noframe'] = 'Formal white 1.9 look'; $string['noframe'] = 'Formal white 1.9 look';
$string['noframedesc'] = 'Select this option to require your moodle page to look like moodle 1.*, alias, without the surrounding frame.'; $string['noframedesc'] = 'Select this option to require your moodle page to look like moodle 1.*, alias, without the surrounding frame.';

View file

@ -29,7 +29,9 @@ if ($hascustommenu) {
} }
/************************************************************************************************/ /************************************************************************************************/
if (!empty($PAGE->theme->settings->logo)) { if (!empty($PAGE->theme->settings->frontpagelogo)) {
$logourl = $PAGE->theme->settings->frontpagelogo;
} else if (!empty($PAGE->theme->settings->logo)) {
$logourl = $PAGE->theme->settings->logo; $logourl = $PAGE->theme->settings->logo;
} else { } else {
$logourl = $OUTPUT->pix_url('logo', 'theme'); $logourl = $OUTPUT->pix_url('logo', 'theme');

View file

@ -125,4 +125,3 @@ function formal_white_set_customcss($css, $customcss) {
$css = str_replace($tag, $customcss, $css); $css = str_replace($tag, $customcss, $css);
return $css; return $css;
} }

View file

@ -29,11 +29,11 @@ if ($ADMIN->fulltree) {
$title = get_string('displaylogo','theme_formal_white'); $title = get_string('displaylogo','theme_formal_white');
$description = get_string('displaylogodesc', 'theme_formal_white'); $description = get_string('displaylogodesc', 'theme_formal_white');
$default = '1'; $default = '1';
$choices = array(1=>get_string('moodlelogo', 'theme_formal_white'),0=>get_string('heading', 'theme_formal_white')); $choices = array(1=>get_string('moodlelogo', 'theme_formal_white'), 0=>get_string('heading', 'theme_formal_white'));
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices); $setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$settings->add($setting); $settings->add($setting);
// Logo file setting // Custom site logo setting
$name = 'theme_formal_white/logo'; $name = 'theme_formal_white/logo';
$title = get_string('logo','theme_formal_white'); $title = get_string('logo','theme_formal_white');
$description = get_string('logodesc', 'theme_formal_white'); $description = get_string('logodesc', 'theme_formal_white');
@ -41,6 +41,14 @@ if ($ADMIN->fulltree) {
$setting = new admin_setting_configtext($name, $title, $description, $default, PARAM_URL); $setting = new admin_setting_configtext($name, $title, $description, $default, PARAM_URL);
$settings->add($setting); $settings->add($setting);
// Custom front page site logo setting
$name = 'theme_formal_white/frontpagelogo';
$title = get_string('frontpagelogo','theme_formal_white');
$description = get_string('frontpagelogodesc', 'theme_formal_white');
$default = '';
$setting = new admin_setting_configtext($name, $title, $description, $default, PARAM_URL);
$settings->add($setting);
// page header background colour setting // page header background colour setting
$name = 'theme_formal_white/headerbgc'; $name = 'theme_formal_white/headerbgc';
$title = get_string('headerbgc','theme_formal_white'); $title = get_string('headerbgc','theme_formal_white');
@ -50,6 +58,15 @@ if ($ADMIN->fulltree) {
$setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig); $setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
$settings->add($setting); $settings->add($setting);
// Block region width
$name = 'theme_formal_white/blockcolumnwidth';
$title = get_string('blockcolumnwidth','theme_formal_white');
$description = get_string('blockcolumnwidthdesc', 'theme_formal_white');
$default = '200';
$choices = array(150=>'150px', 170=>'170px', 200=>'200px', 240=>'240px', 290=>'290px', 350=>'350px', 420=>'420px');
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$settings->add($setting);
// Block content background colour setting // Block content background colour setting
$name = 'theme_formal_white/blockcontentbgc'; $name = 'theme_formal_white/blockcontentbgc';
$title = get_string('blockcontentbgc','theme_formal_white'); $title = get_string('blockcontentbgc','theme_formal_white');
@ -77,15 +94,6 @@ if ($ADMIN->fulltree) {
$setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig); $setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
$settings->add($setting); $settings->add($setting);
// Block region width
$name = 'theme_formal_white/blockcolumnwidth';
$title = get_string('blockcolumnwidth','theme_formal_white');
$description = get_string('blockcolumnwidthdesc', 'theme_formal_white');
$default = '200';
$choices = array(150=>'150px', 170=>'170px', 200=>'200px', 240=>'240px', 290=>'290px', 350=>'350px', 420=>'420px');
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$settings->add($setting);
// Foot note setting // Foot note setting
$name = 'theme_formal_white/footnote'; $name = 'theme_formal_white/footnote';
$title = get_string('footnote','theme_formal_white'); $title = get_string('footnote','theme_formal_white');

View file

@ -25,9 +25,9 @@ h2.main, h3.main, h4.main {margin:0;padding:0;text-align: center;}
h1.headerheading {margin:14px 11px 8px 11px;float:left;font-size:200%;} h1.headerheading {margin:14px 11px 8px 11px;float:left;font-size:200%;}
/* headermenu */ /* headermenu */
#page-header{line-height:0;} #page-header{line-height:0;overflow:hidden;}
/*#headerlogo img {margin:7px;}*/ /*#headerlogo img {margin:7px;}*/
.headermenu {position:relative;line-height:1.7em;font-size:90%;margin:0.3em 0.3em 0 0;right:0.3em;margin-bottom:0.3em;} .headermenu {position:relative;line-height:1.7em;font-size:90%;margin:0.3em 0.3em 0.3em 0;right:0.3em;}
#dock {background-color:[[setting:blockcontentbgc]];border-right:1px #000 dashed;} #dock {background-color:[[setting:blockcontentbgc]];border-right:1px #000 dashed;}
#dock .dockeditem_container {margin-top: 10px;} #dock .dockeditem_container {margin-top: 10px;}
@ -45,16 +45,16 @@ h1.headerheading {margin:14px 11px 8px 11px;float:left;font-size:200%;}
.navbutton table td {padding:0;} .navbutton table td {padding:0;}
/*.block_navigation .block_tree li.type_category.contains_branch>p span { /*.block_navigation .block_tree li.type_category.contains_branch>p span {
padding-left: 20px; padding-left: 20px;
background-image: url([[pix:theme|folderopen]]); background-image: url([[pix:theme|folderopen]]);
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: 0 -1px; background-position: 0 -1px;
} }
.block_navigation .block_tree li.type_category.contains_branch.collapsed>p span { .block_navigation .block_tree li.type_category.contains_branch.collapsed>p span {
padding-left: 20px; padding-left: 20px;
background-image: url([[pix:theme|folderclose]]); background-image: url([[pix:theme|folderclose]]);
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: 0 -1px; background-position: 0 -1px;
}*/ }*/
.block_settings .block_tree .tree_item a:link, .block_settings .block_tree .tree_item a:link,

View file

@ -101,11 +101,11 @@ div.yui3-menu-content {
/* cancellazione della bordatura superiore alla lista delle voci di menu */ /* cancellazione della bordatura superiore alla lista delle voci di menu */
.yui3-skin-sam .yui3-menu .yui3-menu { .yui3-skin-sam .yui3-menu .yui3-menu {
border-top:none; border-top:none;
padding-left:-1px; padding-left:-1px;
border-right:1px #CCC solid; border-right:1px #CCC solid;
border-bottom:1px #CCC solid; border-bottom:1px #CCC solid;
border-left:1px #CCC solid; border-left:1px #CCC solid;
} }
/* color of selected item in FF */ /* color of selected item in FF */