diff --git a/theme/formal_white/config.php b/theme/formal_white/config.php index 69b275972d2..eee75c392bd 100644 --- a/theme/formal_white/config.php +++ b/theme/formal_white/config.php @@ -175,7 +175,7 @@ $THEME->layouts = array( 'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true), ), 'report' => array( - 'file' => 'general.php', + 'file' => 'report.php', 'regions' => array('side-pre'), 'defaultregion' => 'side-pre', ), diff --git a/theme/formal_white/lang/en/theme_formal_white.php b/theme/formal_white/lang/en/theme_formal_white.php index d243b1b04cb..eb7721ba35d 100644 --- a/theme/formal_white/lang/en/theme_formal_white.php +++ b/theme/formal_white/lang/en/theme_formal_white.php @@ -70,6 +70,8 @@ $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['footnote'] = 'Footnote'; $string['footnotedesc'] = 'The content from this textarea will be displayed in the footer of every page.'; +$string['framemargin'] = 'Frame margin'; +$string['framemargindesc'] = 'Room between the frame and the edge of the browser window. (This setting will be ignored whether "Formal white 1.9 look" is requested).'; $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'; diff --git a/theme/formal_white/layout/embedded.php b/theme/formal_white/layout/embedded.php index ab997946f41..1f7fee9627a 100644 --- a/theme/formal_white/layout/embedded.php +++ b/theme/formal_white/layout/embedded.php @@ -11,20 +11,22 @@ echo $OUTPUT->doctype() ?> standard_top_of_body_html(); ?> -
-
-
+
+
+
+
- -
-
-
- main_content() ?> + +
+
+
+ main_content() ?> +
-
- + +
diff --git a/theme/formal_white/layout/frontpage.php b/theme/formal_white/layout/frontpage.php index 4105a295a23..88edd8a0d3e 100644 --- a/theme/formal_white/layout/frontpage.php +++ b/theme/formal_white/layout/frontpage.php @@ -50,110 +50,111 @@ echo $OUTPUT->doctype() ?> standard_head_html() ?> - standard_top_of_body_html(); + standard_top_of_body_html(); ?> +
-if ($hasframe) { ?> -
-
-
-
 
-
-
-
-
+ +
+
+
+
 
+
+
+
+
- - + - -
- + +
+ - - - + + + -
-
-
+
+
+
- -
-
-
- main_content() ?> + +
+
+
+ main_content() ?> +
+
+
+ + + + + +
+
+ blocks_for_region('side-pre') ?> +
+
+ + + + + +
+
+ blocks_for_region('side-post') ?> +
+
+ + + +
-
- - - - - -
-
- blocks_for_region('side-pre') ?> -
-
- - - - - -
-
- blocks_for_region('side-post') ?> -
-
- - - -
-
-
-
+
-
-
-
-
-
 
-
-
-
+
+
+
+
+
 
+
+
+
 
-
-
- +
+ - +
+ +
+ + echo $OUTPUT->standard_end_of_body_html(); ?> \ No newline at end of file diff --git a/theme/formal_white/layout/general.php b/theme/formal_white/layout/general.php index 8d0a497a370..8dfd26ccc3a 100644 --- a/theme/formal_white/layout/general.php +++ b/theme/formal_white/layout/general.php @@ -48,110 +48,111 @@ echo $OUTPUT->doctype() ?> standard_head_html() ?> - standard_top_of_body_html(); + standard_top_of_body_html(); ?> +
-if ($hasframe) { ?> -
-
-
-
 
-
-
-
-
+ +
+
+
+
 
+
+
+
+
- - + - -
- + +
+ - - - + + + -
-
-
+
+
+
- -
-
-
- main_content() ?> + +
+
+
+ main_content() ?> +
+
+
+ + + + + +
+
+ blocks_for_region('side-pre') ?> +
+
+ + + + + +
+
+ blocks_for_region('side-post') ?> +
+
+ + + +
-
- - - - - -
-
- blocks_for_region('side-pre') ?> -
-
- - - - - -
-
- blocks_for_region('side-post') ?> -
-
- - - -
-
-
-
+
-
-
-
-
-
 
-
-
-
+
+
+
+
+
 
+
+
+
 
-
-
- +
+ - +
+ +
+ + echo $OUTPUT->standard_end_of_body_html(); ?> \ No newline at end of file diff --git a/theme/formal_white/layout/report.php b/theme/formal_white/layout/report.php new file mode 100755 index 00000000000..1f508b7471e --- /dev/null +++ b/theme/formal_white/layout/report.php @@ -0,0 +1,193 @@ +heading); +$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar()); +$hasfooter = (empty($PAGE->layout_options['nofooter'])); +$hassidepre = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-pre', $OUTPUT)); +$haslogininfo = (empty($PAGE->layout_options['nologininfo'])); + +$showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT)); + +$custommenu = $OUTPUT->custom_menu(); +$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu)); + +$bodyclasses = array(); +if (!$showsidepre) { + $bodyclasses[] = 'content-only'; +} +if ($hascustommenu) { + $bodyclasses[] = 'has_custom_menu'; +} + +/************************************************************************************************/ +if (!empty($PAGE->theme->settings->logo)) { + $logourl = $PAGE->theme->settings->logo; +} else { + $logourl = $OUTPUT->pix_url('logo_small', 'theme'); +} + +$hasframe = !isset($PAGE->theme->settings->noframe) || !$PAGE->theme->settings->noframe; + +$displaylogo = !isset($PAGE->theme->settings->displaylogo) || $PAGE->theme->settings->displaylogo; +/************************************************************************************************/ + +echo $OUTPUT->doctype() ?> +htmlattributes() ?>> + + <?php echo $PAGE->title ?> + + standard_head_html() ?> + + + standard_top_of_body_html(); ?> +
+ + +
+
+
+
 
+
+
+
+
+ + + + + + + + + + +
+ + + + + + + + + + +
+
+
+ +
+
+ +
+
+
+ blocks_for_region('side-pre') ?> +
+
+
+ +
+ + +
+ + +
+
+
+
+
 
+
+
+
+ + + + + + +
+ + + echo $OUTPUT->standard_end_of_body_html(); ?> + + \ No newline at end of file diff --git a/theme/formal_white/lib.php b/theme/formal_white/lib.php index 2869b801525..79b458ce216 100644 --- a/theme/formal_white/lib.php +++ b/theme/formal_white/lib.php @@ -19,6 +19,14 @@ function formal_white_user_settings($css, $theme) { } $css = formal_white_set_fontsizereference($css, $fontsizereference); + // Set the frame margin + if (!isset($theme->settings->framemargin)) { + $framemargin = 15; // default + } else { + $framemargin = $theme->settings->framemargin; + } + $css = formal_white_set_framemargin($css, $framemargin); + // Set the page header background color if (empty($theme->settings->headerbgc)) { $headerbgc = '#E3DFD4'; // default @@ -67,7 +75,6 @@ function formal_white_user_settings($css, $theme) { } $css = formal_white_set_customcss($css, $customcss); - // Return the CSS return $css; } @@ -83,6 +90,17 @@ function formal_white_set_fontsizereference($css, $fontsizereference) { return $css; } +function formal_white_set_framemargin($css, $framemargin) { + $tag = '[[setting:framemargin]]'; + $css = str_replace($tag, $framemargin.'px', $css); + + // Set .headermenu right + $tag = '[[setting:headermenuright]]'; + $css = str_replace($tag, ($framemargin+17).'px', $css); // 17px is the width of the frame + + return $css; +} + function formal_white_set_headerbgc($css, $headerbgc) { $tag = '[[setting:headerbgc]]'; $css = str_replace($tag, $headerbgc, $css); @@ -117,6 +135,13 @@ function formal_white_set_blockcolumnwidth($css, $blockcolumnwidth) { $tag = '[[setting:doubleblockcolumnwidth]]'; $css = str_replace($tag, (2*$blockcolumnwidth).'px', $css); + // set the min-width of the page to provide: content region min-width = block region width + // I do not care $framemargin because the min-width applies to #frametop that is free from $framemargin + // I need to add twice the width of the frame because it is inside #frametop + // (this code here because it HAS TO come later than $blockcolumnwidth definition) + $tag = '[[setting:minwidth]]'; + $css = str_replace($tag, (3*$blockcolumnwidth + 34).'px', $css); // 34 = 2*17 (17px is the width of the frame) + return $css; } diff --git a/theme/formal_white/settings.php b/theme/formal_white/settings.php index a12cce82813..d7f252f7d38 100644 --- a/theme/formal_white/settings.php +++ b/theme/formal_white/settings.php @@ -24,6 +24,15 @@ if ($ADMIN->fulltree) { $setting = new admin_setting_configcheckbox($name, $title, $description, $default); $settings->add($setting); + // Frame margin + $name = 'theme_formal_white/framemargin'; + $title = get_string('framemargin','theme_formal_white'); + $description = get_string('framemargindesc', 'theme_formal_white'); + $default = '15'; + $choices = array(0=>'0px', 5=>'5px', 10=>'10px', 15=>'15px', 20=>'20px', 25=>'25px', 30=>'30px', 35=>'35px', 40=>'40px', 45=>'45px', 50=>'50px'); + $setting = new admin_setting_configselect($name, $title, $description, $default, $choices); + $settings->add($setting); + // Display logo or heading $name = 'theme_formal_white/displaylogo'; $title = get_string('displaylogo','theme_formal_white'); diff --git a/theme/formal_white/style/formal_white.css b/theme/formal_white/style/formal_white.css index e1b79ed7f79..d3564d839d7 100644 --- a/theme/formal_white/style/formal_white.css +++ b/theme/formal_white/style/formal_white.css @@ -19,15 +19,19 @@ h2 {font-size:130%;} h3 {font-size:120%;} h4 {font-weight:bold;} -h2.main, h3.main, h4.main {margin:0;padding:0;text-align: center;} - -#headerlogo {margin:0.3em;float:left;top:1em;} h1.headerheading {margin:14px 11px 8px 11px;float:left;font-size:200%;} +h2.main, h3.main, h4.main {margin:0;padding:0;text-align:center;} + +/* page-header */ +#page-header{line-height:0;overflow:hidden;} + +/* headerlogo */ +#headerlogo {position:relative;margin:0.3em;} + /* if I use: position:absolute; I even need height:105px; in #page-header */ + /* if I use: position:relative; z-index doesn't work*/ /* headermenu */ -#page-header{line-height:0;overflow:hidden;} -/*#headerlogo img {margin:7px;}*/ -.headermenu {position:relative;line-height:1.7em;font-size:90%;margin:0.3em 0.3em 0.3em 0;right:0.3em;} +.headermenu {position:absolute;text-align:right;line-height:1.7em;font-size:90%;margin:0.3em;right:[[setting:headermenuright]];top:15px;} #dock {background-color:[[setting:blockcontentbgc]];border-right:1px #000 dashed;} #dock .dockeditem_container {margin-top: 10px;} @@ -40,6 +44,13 @@ h1.headerheading {margin:14px 11px 8px 11px;float:left;font-size:200%;} .navbar li span {color:#E3DFD4;} .navbar li a:link, .navbar li a:visited {color:white;} +#page-content { + /* min-width here is useless until min-width in frame.css/#frametop is gretaer enought to hold this #page-content min-width */ + /* #page-content min-width is inherited by parent themes */ + /* #page-content min-width = 0 frees me from possible related problems */ + min-width:0; +} + /* navbutton */ .navbutton {padding-right:0.5em;} .navbutton table td {padding:0;} @@ -50,6 +61,7 @@ h1.headerheading {margin:14px 11px 8px 11px;float:left;font-size:200%;} background-repeat: no-repeat; background-position: 0 -1px; } + .block_navigation .block_tree li.type_category.contains_branch.collapsed>p span { padding-left: 20px; background-image: url([[pix:theme|folderclose]]); @@ -143,7 +155,7 @@ ul.topics .section span.commands {position:absolute;right:1em;} .mform fieldset {border:1px #DDD solid;} .mform .fitem .fitemtitle {width:25%;} .mform .fitem .fitemtitle label {padding-right:5px;} -.mform .fitem .felement {margin-left:26%;width:73%;} +.mform .fitem .felement {margin-left:26%;width:73%;min-height: 0.8em;} /*.mform .fitem fieldset.felement {padding-left:0}*/ .mform .fitem .fitemtitle .helplink img {margin-right:-5px;} .mform .fsubmit {text-align:left} @@ -206,9 +218,18 @@ pre, code, tt { background: none repeat scroll 0 0 [[setting:lblockcolumnbgc]]; } +.notifytiny { + font-size: 1em; +} + /* MDL-29403 */ .capdefault {background-image:url([[pix:theme|gradient_h]]);background-repeat:repeat-x;background-color:#E3DFD4;} table#defineroletable th {border-top:none;} +form.loginform .rememberusername { + padding-left:0.3em; + width: auto; +} + /** Custom CSS **/ [[setting:customcss]] diff --git a/theme/formal_white/style/frame.css b/theme/formal_white/style/frame.css index 00d8675c9e5..c16aeef78ba 100644 --- a/theme/formal_white/style/frame.css +++ b/theme/formal_white/style/frame.css @@ -55,10 +55,10 @@ #frametop, #footerframetop { background-image:url([[pix:theme|roundcorner/header]]); - margin:15px 15px 0; + margin:[[setting:framemargin]] [[setting:framemargin]] 0; background-position:0 0; background-repeat:repeat-x; - min-width:934px; + min-width:[[setting:minwidth]]; } #frametopright, diff --git a/theme/formal_white/style/quiz.css b/theme/formal_white/style/quiz.css index ce3804f9f24..4edf6cab1ad 100644 --- a/theme/formal_white/style/quiz.css +++ b/theme/formal_white/style/quiz.css @@ -27,4 +27,6 @@ #page-mod-quiz-edit .quizpagedelete, #page-mod-quiz-edit .quizpagedelete img {background-color:transparent;} -#page-mod-quiz-edit #page-footer {padding:0;} \ No newline at end of file +#page-mod-quiz-edit #page-footer {padding:0;} + +/*#page-mod-quiz-report.pagelayout-report .no-overflow {overflow: auto;}*/ \ No newline at end of file diff --git a/theme/formal_white/version.php b/theme/formal_white/version.php index 1eecf355084..c1166ddeb60 100644 --- a/theme/formal_white/version.php +++ b/theme/formal_white/version.php @@ -25,7 +25,7 @@ defined('MOODLE_INTERNAL') || die; -$plugin->version = 2011082400; // The current module version (Date: YYYYMMDDXX) +$plugin->version = 2012011900; // The current module version (Date: YYYYMMDDXX) $plugin->requires = 2011081700; // Requires this Moodle version $plugin->component = 'theme_formal_white'; $plugin->maturity = MATURITY_STABLE; \ No newline at end of file