]> git.mjollnir.org Git - moodle.git/commitdiff
Don't show block table layout when there are no blocks
authormoodler <moodler>
Tue, 28 Aug 2007 06:11:23 +0000 (06:11 +0000)
committermoodler <moodler>
Tue, 28 Aug 2007 06:11:23 +0000 (06:11 +0000)
tag/index.php

index 1c5719d4bdabdc4a760161afabb3d6cd181dcd5e..e4aed35909f94de405fac03f81fd4c8beb84a3a5 100644 (file)
@@ -42,11 +42,11 @@ echo '<tr valign="top">';
 
 $blocks_preferred_width = bounded_number(180, blocks_preferred_width($pageblocks[BLOCK_POS_LEFT]), 210);
 
-echo '<td style="vertical-align: top; width: '.$blocks_preferred_width.'px;" id="left-column">';
 if (blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $PAGE->user_is_editing()) {
+    echo '<td style="vertical-align: top; width: '.$blocks_preferred_width.'px;" id="left-column">';
     blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT);
+    echo '</td>';
 }
-echo '</td>';
 
 
 
@@ -54,7 +54,6 @@ echo '</td>';
 
 echo '<td valign="top" id="middle-column">';
 
-
 $tagname  = tag_display_name($tag);
 
 $systemcontext   = get_context_instance(CONTEXT_SYSTEM);
@@ -92,11 +91,11 @@ echo '</td>';
 
 $blocks_preferred_width = bounded_number(180, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]), 210);
 
-echo '<td style="vertical-align: top; width: '.$blocks_preferred_width.'px;" id="right-column">';
 if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $PAGE->user_is_editing()) {
+    echo '<td style="vertical-align: top; width: '.$blocks_preferred_width.'px;" id="right-column">';
     blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT);
+    echo '</td>';
 }
-echo '</td>';
 
 /// Finish the page
 echo '</tr></table>';