MDL-29614 theme_formal_white: Change the way Formal White theme shrinks pages
authorKordan <kordan@mclink.it>
Thu, 19 Jan 2012 08:15:04 +0000 (09:15 +0100)
committerSam Hemelryk <sam@moodle.com>
Tue, 24 Jan 2012 05:11:38 +0000 (13:11 +0800)
12 files changed:
theme/formal_white/config.php
theme/formal_white/lang/en/theme_formal_white.php
theme/formal_white/layout/embedded.php
theme/formal_white/layout/frontpage.php
theme/formal_white/layout/general.php
theme/formal_white/layout/report.php [new file with mode: 0755]
theme/formal_white/lib.php
theme/formal_white/settings.php
theme/formal_white/style/formal_white.css
theme/formal_white/style/frame.css
theme/formal_white/style/quiz.css
theme/formal_white/version.php

index 69b2759..eee75c3 100644 (file)
@@ -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',
     ),
index d243b1b..eb7721b 100644 (file)
@@ -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';
index ab99794..1f7fee9 100644 (file)
@@ -11,20 +11,22 @@ echo $OUTPUT->doctype() ?>
 <body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses) ?>">
 <?php echo $OUTPUT->standard_top_of_body_html(); ?>
 
-    <div id="page-content">
-        <div id="region-main-box">
-            <div id="region-post-box">
+    <div id="page">
+        <div id="page-content">
+            <div id="region-main-box">
+                <div id="region-post-box">
 
-                <!-- main mandatory content of the moodle page  -->
-                <div id="region-main-wrap">
-                    <div id="region-main">
-                        <div class="region-content">
-                            <?php echo $OUTPUT->main_content() ?>
+                    <!-- main mandatory content of the moodle page  -->
+                    <div id="region-main-wrap">
+                        <div id="region-main">
+                            <div class="region-content">
+                                <?php echo $OUTPUT->main_content() ?>
+                            </div>
                         </div>
                     </div>
-                </div>
-                <!-- end of main mandatory content of the moodle page -->
+                    <!-- end of main mandatory content of the moodle page -->
 
+                </div>
             </div>
         </div>
     </div>
index 4105a29..88edd8a 100644 (file)
@@ -50,110 +50,111 @@ echo $OUTPUT->doctype() ?>
     <?php echo $OUTPUT->standard_head_html() ?>
 </head>
 <body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
-    <?php echo $OUTPUT->standard_top_of_body_html();
-
-if ($hasframe) { ?>
-    <div id="frametop">
-        <div id="framebottom">
-            <div id="frametopright">
-                <div>&nbsp;</div>
-            </div>
-            <div id="frameleft">
-                <div id="frameright">
-                    <div id="wrapper">
+    <?php echo $OUTPUT->standard_top_of_body_html(); ?>
+    <div id="page">
+
+    <?php if ($hasframe) { ?>
+        <div id="frametop">
+            <div id="framebottom">
+                <div id="frametopright">
+                    <div>&nbsp;</div>
+                </div>
+                <div id="frameleft">
+                    <div id="frameright">
+                        <div id="wrapper">
 <?php } ?>
 
 <!-- begin of page-header -->
-            <?php if ($hasheading) { ?>
-                <div id="page-header">
-                    <?php if ($displaylogo) { ?>
-                        <div id="headerlogo">
-                            <img src="<?php echo $logourl ?>" alt="Custom logo here" />
-                        </div>
-                    <?php } else { ?>
-                        <h1 class="headerheading"><?php echo $PAGE->heading ?></h1>
-                    <?php } ?>
-
-                    <div class="headermenu">
-                        <?php
-                            echo $OUTPUT->login_info();
-                            if (($CFG->langmenu) && (!empty($PAGE->layout_options['langmenu']))) {
-                                echo $OUTPUT->lang_menu();
-                            }
-                            echo $PAGE->headingmenu;
-                        ?>
-                    </div>
-                </div>
-            <?php } ?>
+                            <?php if ($hasheading) { ?>
+                            <div id="page-header">
+                            <?php if ($displaylogo) { ?>
+                                <div id="headerlogo">
+                                    <img src="<?php echo $logourl ?>" alt="Custom logo here" />
+                                </div>
+                            <?php } else { ?>
+                                <h1 class="headerheading"><?php echo $PAGE->heading ?></h1>
+                            <?php } ?>
+
+                                <div class="headermenu">
+                                    <?php
+                                    echo $OUTPUT->login_info();
+                                    if (($CFG->langmenu) && (!empty($PAGE->layout_options['langmenu']))) {
+                                        echo $OUTPUT->lang_menu();
+                                    }
+                                    echo $PAGE->headingmenu;
+                                ?>
+                                </div>
+                            </div>
+                            <?php } ?>
 <!-- end of page-header -->
 
 <!-- begin of custom menu -->
-            <?php if ($hascustommenu) { ?>
-                <div id="custommenu"><?php echo $custommenu; ?></div>
-            <?php } ?>
+                            <?php if ($hascustommenu) { ?>
+                            <div id="custommenu"><?php echo $custommenu; ?></div>
+                            <?php } ?>
 <!-- end of custom menu -->
 
 <!-- begin of navigation bar -->
-            <?php if ($hasnavbar) { ?>
-                <div class="navbar clearfix">
-                    <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
-                    <div class="navbutton"><?php echo $PAGE->button; ?></div>
-                </div>
-            <?php } ?>
+                            <?php if ($hasnavbar) { ?>
+                            <div class="navbar clearfix">
+                                <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
+                                <div class="navbutton"><?php echo $PAGE->button; ?></div>
+                            </div>
+                            <?php } ?>
 <!-- end of navigation bar -->
 
 <!-- start of moodle content -->
-            <div id="page-content">
-                <div id="region-main-box">
-                    <div id="region-post-box">
-
-                        <!-- main mandatory content of the moodle page  -->
-                        <div id="region-main-wrap">
-                            <div id="region-main">
-                                <div class="region-content">
-                                    <?php echo $OUTPUT->main_content() ?>
+                            <div id="page-content">
+                                <div id="region-main-box">
+                                    <div id="region-post-box">
+
+                                        <!-- main mandatory content of the moodle page  -->
+                                        <div id="region-main-wrap">
+                                            <div id="region-main">
+                                                <div class="region-content">
+                                                    <?php echo $OUTPUT->main_content() ?>
+                                                </div>
+                                            </div>
+                                        </div>
+                                        <!-- end of main mandatory content of the moodle page -->
+
+
+                                        <!-- left column block - diplayed only if... -->
+                                        <?php if ($hassidepre) { ?>
+                                        <div id="region-pre" class="block-region">
+                                            <div class="region-content">
+                                                <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
+                                            </div>
+                                        </div>
+                                        <?php } ?>
+                                        <!-- end of left column block - diplayed only if... -->
+
+                                        <!-- right column block - diplayed only if... -->
+                                        <?php if ($hassidepost) { ?>
+                                        <div id="region-post" class="block-region">
+                                            <div class="region-content">
+                                                <?php echo $OUTPUT->blocks_for_region('side-post') ?>
+                                            </div>
+                                        </div>
+                                        <?php } ?>
+                                        <!-- end of right column block - diplayed only if... -->
+
+                                    </div>
                                 </div>
                             </div>
-                        </div>
-                        <!-- end of main mandatory content of the moodle page -->
-
-
-                        <!-- left column block - diplayed only if... -->
-                        <?php if ($hassidepre) { ?>
-                        <div id="region-pre" class="block-region">
-                            <div class="region-content">
-                                <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
-                            </div>
-                        </div>
-                        <?php } ?>
-                        <!-- end of left column block - diplayed only if... -->
-
-                        <!-- right column block - diplayed only if... -->
-                        <?php if ($hassidepost) { ?>
-                        <div id="region-post" class="block-region">
-                            <div class="region-content">
-                                <?php echo $OUTPUT->blocks_for_region('side-post') ?>
-                            </div>
-                        </div>
-                        <?php } ?>
-                        <!-- end of right column block - diplayed only if... -->
-
-                    </div>
-                </div>
-            </div>
 <!-- end of moodle content -->
 
-            <div class="clearfix"></div>
+                            <div class="clearfix"></div>
 
 <?php if ($hasframe) { ?>
-                    </div> <!-- end of wrapper -->
-                </div> <!-- </frameright> -->
-            </div> <!-- </frameleft> -->
-            <div id="framebottomright">
-                <div>&nbsp;</div>
-            </div>
-        </div> <!-- </framebottom> -->
-    </div> <!-- </frametop> -->
+                        </div> <!-- </wrapper> -->
+                    </div> <!-- </frameright> -->
+                </div> <!-- </frameleft> -->
+                <div id="framebottomright">
+                    <div>&nbsp;</div>
+                </div>
+            </div> <!-- </framebottom> -->
+        </div> <!-- </frametop> -->
 
 <?php }
 
@@ -162,7 +163,7 @@ if ($hasfooter) {
 
         <!-- START OF FOOTER -->
         <div id="page-footer">
-        <?php if (!empty($PAGE->theme->settings->footnote)) { ?>
+            <?php if (!empty($PAGE->theme->settings->footnote)) { ?>
             <div id="footerframetop">
                 <div id="footerframebottom">
                     <div id="footerframetopright">
@@ -170,51 +171,58 @@ if ($hasfooter) {
                     </div>
                     <div id="footerframeleft">
                         <div id="footerframeright">
+
                             <!-- the content to show -->
                             <div id="footerwrapper">
                                 <?php echo $PAGE->theme->settings->footnote; ?>
-                            </div> <!-- end of footerwrapper -->
-                        </div>
-                    </div> <!-- </footerframeright></footerframeleft> -->
+                            </div> <!-- </footerwrapper> -->
+
+                        </div> <!-- </footerframeright> -->
+                    </div> <!-- </footerframeleft> -->
                     <div id="footerframebottomright">
                         <div>&nbsp;</div>
                     </div>
-                </div>
-            </div> <!-- </footerframebottom></footerframetop> -->
-        <?php }
-        //one more div is waiting to be closed
+                </div> <!-- </footerframebottom> -->
+            </div> <!-- </footerframetop> -->
+            <?php }
+            //one more div is waiting to be closed
 
     } else { ?>
 
         <!-- START OF FOOTER -->
         <div id="page-footer" class="noframefooter">
             <?php if (!empty($PAGE->theme->settings->footnote)) { ?>
-                <div id="page-footer-content">
+            <div id="page-footer-content">
 
-                    <!-- the content to show -->
-                    <div id="footerwrapper">
-                        <?php echo $PAGE->theme->settings->footnote; ?>
-                    </div> <!-- end of footerwrapper -->
+                <!-- the content to show -->
+                <div id="footerwrapper">
+                    <?php echo $PAGE->theme->settings->footnote; ?>
+                </div> <!-- </footerwrapper> -->
 
-                </div> <!-- end of page-footer_noframe-content -->
+            </div> <!-- </page-footer-content> -->
             <?php }
-        //one more div is waiting to be closed
+            //one more div is waiting to be closed
+
     } ?>
+
             <div class="moodledocsleft">
-            <?php
+                <?php
                 echo $OUTPUT->login_info();
                 if ($PAGE->theme->settings->creditstomoodleorg) {
                     echo $OUTPUT->home_link();
                 }
                 echo $OUTPUT->standard_footer_html();
-            ?>
+                ?>
             </div>
             <div class="moodledocs">
                 <?php echo page_doc_link(get_string('moodledocslink')); ?>
             </div>
-        </div> <!-- end of page-footer or page-footer_noframe -->
-<?php   //the waiting div has been closed
-}
+        </div> <!-- </page-footer> -->
+    </div> <!-- </page"> -->
+
+    <div class="clearfix"></div>
+
+<?php  } //the waiting div has been closed: </page-footer>
     echo $OUTPUT->standard_end_of_body_html(); ?>
 </body>
 </html>
\ No newline at end of file
index 8d0a497..8dfd26c 100644 (file)
@@ -48,110 +48,111 @@ echo $OUTPUT->doctype() ?>
     <?php echo $OUTPUT->standard_head_html() ?>
 </head>
 <body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
-    <?php echo $OUTPUT->standard_top_of_body_html();
-
-if ($hasframe) { ?>
-    <div id="frametop">
-        <div id="framebottom">
-            <div id="frametopright">
-                <div>&nbsp;</div>
-            </div>
-            <div id="frameleft">
-                <div id="frameright">
-                    <div id="wrapper">
+    <?php echo $OUTPUT->standard_top_of_body_html(); ?>
+    <div id="page">
+
+    <?php if ($hasframe) { ?>
+        <div id="frametop">
+            <div id="framebottom">
+                <div id="frametopright">
+                    <div>&nbsp;</div>
+                </div>
+                <div id="frameleft">
+                    <div id="frameright">
+                        <div id="wrapper">
 <?php } ?>
 
 <!-- begin of page-header -->
-            <?php if ($hasheading) { ?>
-                <div id="page-header">
-                    <?php if ($displaylogo) { ?>
-                        <div id="headerlogo">
-                            <img src="<?php echo $logourl ?>" alt="Custom logo here" />
-                        </div>
-                    <?php } else { ?>
-                        <h1 class="headerheading"><?php echo $PAGE->heading ?></h1>
-                    <?php } ?>
-
-                    <div class="headermenu">
-                        <?php
-                            echo $OUTPUT->login_info();
-                            if (($CFG->langmenu) && (!empty($PAGE->layout_options['langmenu']))) {
-                                echo $OUTPUT->lang_menu();
-                            }
-                            echo $PAGE->headingmenu;
-                        ?>
-                    </div>
-                </div>
-            <?php } ?>
+                            <?php if ($hasheading) { ?>
+                            <div id="page-header">
+                            <?php if ($displaylogo) { ?>
+                                <div id="headerlogo">
+                                    <img src="<?php echo $logourl ?>" alt="Custom logo here" />
+                                </div>
+                            <?php } else { ?>
+                                <h1 class="headerheading"><?php echo $PAGE->heading ?></h1>
+                            <?php } ?>
+
+                                <div class="headermenu">
+                                    <?php
+                                    echo $OUTPUT->login_info();
+                                    if (($CFG->langmenu) && (!empty($PAGE->layout_options['langmenu']))) {
+                                        echo $OUTPUT->lang_menu();
+                                    }
+                                    echo $PAGE->headingmenu;
+                                ?>
+                                </div>
+                            </div>
+                            <?php } ?>
 <!-- end of page-header -->
 
 <!-- begin of custom menu -->
-            <?php if ($hascustommenu) { ?>
-                <div id="custommenu"><?php echo $custommenu; ?></div>
-            <?php } ?>
+                            <?php if ($hascustommenu) { ?>
+                            <div id="custommenu"><?php echo $custommenu; ?></div>
+                            <?php } ?>
 <!-- end of custom menu -->
 
 <!-- begin of navigation bar -->
-            <?php if ($hasnavbar) { ?>
-                <div class="navbar clearfix">
-                    <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
-                    <div class="navbutton"><?php echo $PAGE->button; ?></div>
-                </div>
-            <?php } ?>
+                            <?php if ($hasnavbar) { ?>
+                            <div class="navbar clearfix">
+                                <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
+                                <div class="navbutton"><?php echo $PAGE->button; ?></div>
+                            </div>
+                            <?php } ?>
 <!-- end of navigation bar -->
 
 <!-- start of moodle content -->
-            <div id="page-content">
-                <div id="region-main-box">
-                    <div id="region-post-box">
-
-                        <!-- main mandatory content of the moodle page  -->
-                        <div id="region-main-wrap">
-                            <div id="region-main">
-                                <div class="region-content">
-                                    <?php echo $OUTPUT->main_content() ?>
+                            <div id="page-content">
+                                <div id="region-main-box">
+                                    <div id="region-post-box">
+
+                                        <!-- main mandatory content of the moodle page  -->
+                                        <div id="region-main-wrap">
+                                            <div id="region-main">
+                                                <div class="region-content">
+                                                    <?php echo $OUTPUT->main_content() ?>
+                                                </div>
+                                            </div>
+                                        </div>
+                                        <!-- end of main mandatory content of the moodle page -->
+
+
+                                        <!-- left column block - diplayed only if... -->
+                                        <?php if ($hassidepre) { ?>
+                                        <div id="region-pre" class="block-region">
+                                            <div class="region-content">
+                                                <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
+                                            </div>
+                                        </div>
+                                        <?php } ?>
+                                        <!-- end of left column block - diplayed only if... -->
+
+                                        <!-- right column block - diplayed only if... -->
+                                        <?php if ($hassidepost) { ?>
+                                        <div id="region-post" class="block-region">
+                                            <div class="region-content">
+                                                <?php echo $OUTPUT->blocks_for_region('side-post') ?>
+                                            </div>
+                                        </div>
+                                        <?php } ?>
+                                        <!-- end of right column block - diplayed only if... -->
+
+                                    </div>
                                 </div>
                             </div>
-                        </div>
-                        <!-- end of main mandatory content of the moodle page -->
-
-
-                        <!-- left column block - diplayed only if... -->
-                        <?php if ($hassidepre) { ?>
-                        <div id="region-pre" class="block-region">
-                            <div class="region-content">
-                                <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
-                            </div>
-                        </div>
-                        <?php } ?>
-                        <!-- end of left column block - diplayed only if... -->
-
-                        <!-- right column block - diplayed only if... -->
-                        <?php if ($hassidepost) { ?>
-                        <div id="region-post" class="block-region">
-                            <div class="region-content">
-                                <?php echo $OUTPUT->blocks_for_region('side-post') ?>
-                            </div>
-                        </div>
-                        <?php } ?>
-                        <!-- end of right column block - diplayed only if... -->
-
-                    </div>
-                </div>
-            </div>
 <!-- end of moodle content -->
 
-            <div class="clearfix"></div>
+                            <div class="clearfix"></div>
 
 <?php if ($hasframe) { ?>
-                    </div> <!-- end of wrapper -->
-                </div> <!-- </frameright> -->
-            </div> <!-- </frameleft> -->
-            <div id="framebottomright">
-                <div>&nbsp;</div>
-            </div>
-        </div> <!-- </framebottom> -->
-    </div> <!-- </frametop> -->
+                        </div> <!-- </wrapper> -->
+                    </div> <!-- </frameright> -->
+                </div> <!-- </frameleft> -->
+                <div id="framebottomright">
+                    <div>&nbsp;</div>
+                </div>
+            </div> <!-- </framebottom> -->
+        </div> <!-- </frametop> -->
 
 <?php }
 
@@ -160,7 +161,7 @@ if ($hasfooter) {
 
         <!-- START OF FOOTER -->
         <div id="page-footer">
-        <?php if (!empty($PAGE->theme->settings->footnote)) { ?>
+            <?php if (!empty($PAGE->theme->settings->footnote)) { ?>
             <div id="footerframetop">
                 <div id="footerframebottom">
                     <div id="footerframetopright">
@@ -168,62 +169,68 @@ if ($hasfooter) {
                     </div>
                     <div id="footerframeleft">
                         <div id="footerframeright">
+
                             <!-- the content to show -->
                             <div id="footerwrapper">
                                 <?php echo $PAGE->theme->settings->footnote; ?>
-                            </div> <!-- end of footerwrapper -->
-                        </div>
-                    </div> <!-- </footerframeright></footerframeleft> -->
+                            </div> <!-- </footerwrapper> -->
+
+                        </div> <!-- </footerframeright> -->
+                    </div> <!-- </footerframeleft> -->
                     <div id="footerframebottomright">
                         <div>&nbsp;</div>
                     </div>
-                </div>
-            </div> <!-- </footerframebottom></footerframetop> -->
-        <?php }
-        //one more div is waiting to be closed
+                </div> <!-- </footerframebottom> -->
+            </div> <!-- </footerframetop> -->
+            <?php }
+            //one more div is waiting to be closed
 
     } else { ?>
 
         <!-- START OF FOOTER -->
         <div id="page-footer" class="noframefooter">
             <?php if (!empty($PAGE->theme->settings->footnote)) { ?>
-                <div id="page-footer-content">
-                    <!-- the content to show -->
-                    <div id="footerwrapper">
-                        <?php echo $PAGE->theme->settings->footnote; ?>
-                    </div> <!-- end of footerwrapper -->
-                </div> <!-- end of page-footer_noframe-content -->
+            <div id="page-footer-content">
+
+                <!-- the content to show -->
+                <div id="footerwrapper">
+                    <?php echo $PAGE->theme->settings->footnote; ?>
+                </div> <!-- </footerwrapper> -->
+
+            </div> <!-- </page-footer-content> -->
             <?php }
-        //one more div is waiting to be closed
+            //one more div is waiting to be closed
+
     } ?>
             <div class="moodledocsleft">
-            <?php
+                <?php
                 echo $OUTPUT->login_info();
                 //echo $OUTPUT->home_link();
-            ?>
+                ?>
                 <div class="moodledocs">
                     <?php echo page_doc_link(get_string('moodledocslink')); ?>
                 </div>
-            <?php
+                <?php
                 if ($PAGE->theme->settings->creditstomoodleorg == 2) {
                     // can not use $OUTPUT->home_link() here because whether $OUTPUT->page->pagetype != 'site-index'
                     // the output of the function is not the classic nice moodle logo $this->pix_url('moodlelogo')
-            ?>
+                ?>
                     <div class="sitelink">
                         <a title="Moodle" href="http://moodle.org/">
                             <img style="width:100px;height:30px" src="<?php echo $this->pix_url('moodlelogo') ?>" alt="moodlelogo" />
                         </a>
                     </div>
-            <?php
+                <?php
                 }
-            ?>
-            <?php                   
                 echo $OUTPUT->standard_footer_html();
-            ?>
+                ?>
             </div>
-        </div> <!-- end of page-footer or page-footer_noframe -->
-<?php   //the waiting div has been closed
-}
+        </div> <!-- </page-footer> -->
+    </div> <!-- </page"> -->
+
+    <div class="clearfix"></div>
+
+<?php  } //the waiting div has been closed: </page-footer>
     echo $OUTPUT->standard_end_of_body_html(); ?>
 </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 (executable)
index 0000000..1f508b7
--- /dev/null
@@ -0,0 +1,193 @@
+<?php\r
+\r
+$hasheading = ($PAGE->heading);\r
+$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());\r
+$hasfooter = (empty($PAGE->layout_options['nofooter']));\r
+$hassidepre = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-pre', $OUTPUT));\r
+$haslogininfo = (empty($PAGE->layout_options['nologininfo']));\r
+\r
+$showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));\r
+\r
+$custommenu = $OUTPUT->custom_menu();\r
+$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));\r
+\r
+$bodyclasses = array();\r
+if (!$showsidepre) {\r
+    $bodyclasses[] = 'content-only';\r
+}\r
+if ($hascustommenu) {\r
+    $bodyclasses[] = 'has_custom_menu';\r
+}\r
+\r
+/************************************************************************************************/\r
+if (!empty($PAGE->theme->settings->logo)) {\r
+    $logourl = $PAGE->theme->settings->logo;\r
+} else {\r
+    $logourl = $OUTPUT->pix_url('logo_small', 'theme');\r
+}\r
+\r
+$hasframe = !isset($PAGE->theme->settings->noframe) || !$PAGE->theme->settings->noframe;\r
+\r
+$displaylogo = !isset($PAGE->theme->settings->displaylogo) || $PAGE->theme->settings->displaylogo;\r
+/************************************************************************************************/\r
+\r
+echo $OUTPUT->doctype() ?>\r
+<html <?php echo $OUTPUT->htmlattributes() ?>>\r
+<head>\r
+    <title><?php echo $PAGE->title ?></title>\r
+    <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />\r
+    <?php echo $OUTPUT->standard_head_html() ?>\r
+</head>\r
+<body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">\r
+    <?php echo $OUTPUT->standard_top_of_body_html(); ?>\r
+    <div id="page">\r
+\r
+    <?php if ($hasframe) { ?>\r
+        <div id="frametop">\r
+            <div id="framebottom">\r
+                <div id="frametopright">\r
+                    <div>&nbsp;</div>\r
+                </div>\r
+                <div id="frameleft">\r
+                    <div id="frameright">\r
+                        <div id="wrapper">\r
+<?php } ?>\r
+\r
+<!-- begin of page-header -->\r
+                            <?php if ($hasheading) { ?>\r
+                            <div id="page-header">\r
+                            <?php if ($displaylogo) { ?>\r
+                                <div id="headerlogo">\r
+                                    <img src="<?php echo $logourl ?>" alt="Custom logo here" />\r
+                                </div>\r
+                            <?php } else { ?>\r
+                                <h1 class="headerheading"><?php echo $PAGE->heading ?></h1>\r
+                            <?php } ?>\r
+\r
+                                <div class="headermenu">\r
+                                    <?php\r
+                                    echo $OUTPUT->login_info();\r
+                                    if (($CFG->langmenu) && (!empty($PAGE->layout_options['langmenu']))) {\r
+                                        echo $OUTPUT->lang_menu();\r
+                                    }\r
+                                    echo $PAGE->headingmenu;\r
+                                    ?>\r
+                                </div>\r
+                            </div>\r
+                            <?php } ?>\r
+<!-- end of page-header -->\r
+\r
+<!-- begin of custom menu -->\r
+                            <?php if ($hascustommenu) { ?>\r
+                            <div id="custommenu"><?php echo $custommenu; ?></div>\r
+                            <?php } ?>\r
+<!-- end of custom menu -->\r
+\r
+<!-- begin of navigation bar -->\r
+                            <?php if ($hasnavbar) { ?>\r
+                            <div class="navbar clearfix">\r
+                                <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>\r
+                                <div class="navbutton"><?php echo $PAGE->button; ?></div>\r
+                            </div>\r
+                            <?php } ?>\r
+<!-- end of navigation bar -->\r
+\r
+<!-- start of moodle content -->\r
+                            <div id="page-content" class="clearfix">\r
+                                <div id="report-main-content">\r
+                                    <div class="region-content">\r
+                                        <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>\r
+                                    </div>\r
+                                </div>\r
+                                <?php if ($hassidepre) { ?>\r
+                                <div id="report-region-wrap">\r
+                                    <div id="report-region-pre" class="block-region">\r
+                                        <div class="region-content">\r
+                                            <?php echo $OUTPUT->blocks_for_region('side-pre') ?>\r
+                                        </div>\r
+                                    </div>\r
+                                </div>\r
+                                <?php } ?>\r
+                            </div>\r
+<!-- end of moodle content -->\r
+\r
+                            <div class="clearfix"></div>\r
+\r
+<?php if ($hasframe) { ?>\r
+                        </div> <!-- end of wrapper -->\r
+                    </div> <!-- </frameright> -->\r
+                </div> <!-- </frameleft> -->\r
+                <div id="framebottomright">\r
+                    <div>&nbsp;</div>\r
+                </div>\r
+            </div> <!-- </framebottom> -->\r
+        </div> <!-- </frametop> -->\r
+\r
+<?php }\r
+\r
+if ($hasfooter) {\r
+    if ($hasframe) { ?>\r
+\r
+        <!-- START OF FOOTER -->\r
+        <div id="page-footer">\r
+            <?php if (!empty($PAGE->theme->settings->footnote)) { ?>\r
+            <div id="footerframetop">\r
+                <div id="footerframebottom">\r
+                    <div id="footerframetopright">\r
+                        <div>&nbsp;</div>\r
+                    </div>\r
+                    <div id="footerframeleft">\r
+                        <div id="footerframeright">\r
+\r
+                            <!-- the content to show -->\r
+                            <div id="footerwrapper">\r
+                                <?php echo $PAGE->theme->settings->footnote; ?>\r
+                            </div> <!-- </footerwrapper> -->\r
+\r
+                        </div> <!-- </footerframeright> -->\r
+                    </div> <!-- </footerframeleft> -->\r
+                    <div id="footerframebottomright">\r
+                        <div>&nbsp;</div>\r
+                    </div>\r
+                </div> <!-- </footerframebottom> -->\r
+            </div> <!-- </footerframetop> -->\r
+            <?php }\r
+            //one more div is waiting to be closed\r
+\r
+    } else { ?>\r
+\r
+        <!-- START OF FOOTER -->\r
+        <div id="page-footer" class="noframefooter">\r
+            <?php if (!empty($PAGE->theme->settings->footnote)) { ?>\r
+            <div id="page-footer-content">\r
+\r
+                <!-- the content to show -->\r
+                <div id="footerwrapper">\r
+                    <?php echo $PAGE->theme->settings->footnote; ?>\r
+                </div> <!-- </footerwrapper> -->\r
+\r
+            </div> <!-- </page-footer-content> -->\r
+            <?php }\r
+            //one more div is waiting to be closed\r
+\r
+    } ?>\r
+\r
+            <div class="moodledocsleft">\r
+                <?php\r
+                //echo $OUTPUT->login_info();\r
+                //echo $OUTPUT->home_link();\r
+                echo $OUTPUT->standard_footer_html();\r
+                ?>\r
+            </div>\r
+            <div class="moodledocs">\r
+                <?php echo page_doc_link(get_string('moodledocslink')); ?>\r
+            </div>\r
+        </div> <!-- </page-footer> -->\r
+    </div> <!-- </page"> -->\r
+\r
+    <div class="clearfix"></div>\r
+\r
+<?php  } //the waiting div has been closed: </page-footer>\r
+    echo $OUTPUT->standard_end_of_body_html(); ?>\r
+</body>\r
+</html>
\ No newline at end of file
index 2869b80..79b458c 100644 (file)
@@ -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;
 }
 
index a12cce8..d7f252f 100644 (file)
@@ -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');
index e1b79ed..d3564d8 100644 (file)
@@ -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;}
 
-/* headermenu */
+/* page-header */
 #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;}
+
+/* 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 */
+.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]]
index 00d8675..c16aeef 100644 (file)
 #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,
index ce3804f..4edf6ca 100644 (file)
@@ -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
index 1eecf35..c1166dd 100644 (file)
@@ -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