Permalink
Browse files

'added felxible columns and round corner code'

  • Loading branch information...
1 parent 012beaf commit dd9098cc8b45550f11ad7fb39ae3f45eae5542a0 urs_hunkler committed Feb 6, 2007
Showing with 49 additions and 3 deletions.
  1. +49 −3 course/format/weeks/format.php
@@ -58,17 +58,41 @@
$context = get_context_instance(CONTEXT_COURSE, $course->id);
/// Layout the whole page as three big columns.
echo '<table id="layout-table" cellspacing="0" summary="'.get_string('layouttable').'"><tr>';
-
+ $lt = (empty($THEME->layouttable)) ? array('left', 'middle', 'right') : $THEME->layouttable;
+ foreach ($lt as $column) {
+ switch ($column) {
+ case 'left':
+
/// The left column ...
if (blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $editing) {
echo '<td style="width:'.$preferred_width_left.'px" id="left-column">';
+
+ if (!empty($THEME->roundcorners)) {
+ echo '<div class="bt"><div></div></div>';
+ echo '<div class="i1"><div class="i2"><div class="i3">';
+ }
+
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT);
+
+ if (!empty($THEME->roundcorners)) {
+ echo '</div></div></div>';
+ echo '<div class="bb"><div></div></div>';
+ }
+
echo '</td>';
}
-
+ break;
+ case 'middle':
/// Start main column
- echo '<td id="middle-column"><a name="startofcontent"></a>';
+ echo '<td id="middle-column">';
+
+ if (!empty($THEME->roundcorners)) {
+ echo '<div class="bt"><div></div></div>';
+ echo '<div class="i1"><div class="i2"><div class="i3">';
+ }
+
+ echo '<a name="startofcontent"></a>';
print_heading_block(get_string('weeklyoutline'), 'outline');
@@ -262,15 +286,37 @@
echo '</div>';
}
+ if (!empty($THEME->roundcorners)) {
+ echo '</div></div></div>';
+ echo '<div class="bb"><div></div></div>';
+ }
+
echo '</td>';
+ break;
+ case 'right':
// The right column
if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $editing) {
echo '<td style="width: '.$preferred_width_right.'px;" id="right-column">';
+
+ if (!empty($THEME->roundcorners)) {
+ echo '<div class="bt"><div></div></div>';
+ echo '<div class="i1"><div class="i2"><div class="i3">';
+ }
+
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT);
+
+ if (!empty($THEME->roundcorners)) {
+ echo '</div></div></div>';
+ echo '<div class="bb"><div></div></div>';
+ }
+
echo '</td>';
}
+ break;
+ }
+ }
echo '</tr></table>';
?>

0 comments on commit dd9098c

Please sign in to comment.