]> git.mjollnir.org Git - moodle.git/commitdiff
Merged the flexible column patch from Urs (1.11.2.3) to HEAD
authormoodler <moodler>
Wed, 10 Oct 2007 14:31:27 +0000 (14:31 +0000)
committermoodler <moodler>
Wed, 10 Oct 2007 14:31:27 +0000 (14:31 +0000)
my/index.php

index b83209292bb928b83ddc834e5bb56358c4437982..151e230b9b72211ee8d8cdc7ac3e2711267a490a 100644 (file)
 
     $PAGE->print_header($mymoodlestr);
 
-    echo '<table border="0" cellpadding="3" cellspacing="0" width="100%" id="layout-table">';
+    echo '<table id="layout-table">';
     echo '<tr valign="top">';
 
+    $lt = (empty($THEME->layouttable)) ? array('left', 'middle', 'right') : $THEME->layouttable;
+    foreach ($lt as $column) {
+        switch ($column) {
+            case 'left':
 
     $blocks_preferred_width = bounded_number(180, blocks_preferred_width($pageblocks[BLOCK_POS_LEFT]), 210);
 
         if (!empty($THEME->customcorners)) print_custom_corners_end();
         echo '</td>';
     }
-
+    
+            break;
+            case 'middle':
+    
     echo '<td valign="top" id="middle-column">';
     if (!empty($THEME->customcorners)) print_custom_corners_start(TRUE);
 
     
     if (!empty($THEME->customcorners)) print_custom_corners_end();
     echo '</td>';
-
+    
+            break;
+            case 'right':
+            
     $blocks_preferred_width = bounded_number(180, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]), 210);
 
     if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $PAGE->user_is_editing()) {
         if (!empty($THEME->customcorners)) print_custom_corners_end();
         echo '</td>';
     }
-
+            break;
+        }
+    }
 
     /// Finish the page
     echo '</tr></table>';