]> git.mjollnir.org Git - moodle.git/commitdiff
'added check if right column is empty - needed for round corners'
authorurs_hunkler <urs_hunkler>
Wed, 7 Feb 2007 08:22:20 +0000 (08:22 +0000)
committerurs_hunkler <urs_hunkler>
Wed, 7 Feb 2007 08:22:20 +0000 (08:22 +0000)
admin/settings.php
lib/adminlib.php

index b3e807dea07f72fcd1bda00e1958d768a7d34174..387685025d6171fa9e7f6b472cdcc5c6f9764963 100644 (file)
@@ -175,17 +175,19 @@ if (!empty($SITE->fullname)) {
     echo '</td>';
             break;
             case 'right':
-    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>';
+    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>';
     }
-    echo '</td>';
             break;
         }
     }
index c399f2e2b87e0d69c2359e17adec79830a44c9b8..dba2bb47dd86dca289037faa1e2e84e41ceeafc8 100644 (file)
@@ -2705,17 +2705,20 @@ function admin_externalpage_print_footer($adminroot) {
             echo '<div class="bb"><div></div></div>';
         }
         echo '</td>';
-        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>';
+        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>';
         }
-        echo '</td></tr></table>';
+        echo '</tr></table>';
     }
     print_footer();
 }