Don't show block table layout when there are no blocks

This commit is contained in:
moodler 2007-08-28 06:11:23 +00:00
parent 5099a71166
commit ea6401875e

View 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>';