]> git.mjollnir.org Git - moodle.git/commitdiff
Small fix for admin menu layout and also print_table
authormoodler <moodler>
Mon, 20 Mar 2006 15:33:18 +0000 (15:33 +0000)
committermoodler <moodler>
Mon, 20 Mar 2006 15:33:18 +0000 (15:33 +0000)
admin/index.php
lib/weblib.php

index db93b82aab58d124b3f8f59006348f5065622991..634be0b774558b6313694807ed549564f23e673a 100644 (file)
         print_simple_box_end();
     }
 
-    $table->tablealign = "right";
+    $table->tablealign = "center";
     $table->align = array ("right", "left");
     $table->wrap = array ("nowrap", "nowrap");
     $table->cellpadding = 5;
     $table->cellspacing = 0;
-    $table->width = '100%';
+    $table->width = '40%';
 
     $configdata  = '<div class="adminlink"><a href="config.php">'.get_string('configvariables', 'admin').
                    '</a> - <span class="explanation">'.get_string('adminhelpconfigvariables').'</span></div>';
index 38f974eb5af10fe0258f98753d259ba1dc82b090..b78518cba32a11a26ca9d025d004a5793e0ba68a 100644 (file)
@@ -2910,6 +2910,7 @@ function print_png($url, $sizex, $sizey, $returnstring, $parameters='alt=""') {
  *     <li>$table->wrap - An array of "nowrap"s or nothing
  *     <li>$table->data[] - An array of arrays containing the data.
  *     <li>$table->width  - A percentage of the page
+ *     <li>$table->tablealign  - Align the whole table
  *     <li>$table->cellpadding  - Padding on each cell
  *     <li>$table->cellspacing  - Spacing between cells
  * </ul>
@@ -2950,6 +2951,10 @@ function print_table($table) {
         $table->width = '80%';
     }
 
+    if (empty($table->tablealign)) {
+        $table->tablealign = 'center';
+    }
+
     if (empty($table->cellpadding)) {
         $table->cellpadding = '5';
     }
@@ -2964,8 +2969,7 @@ function print_table($table) {
 
     $tableid = empty($table->id) ? '' : 'id="'.$table->id.'"';
 
-    print_simple_box_start('center', $table->width, '#ffffff', 0);
-    echo '<table width="100%" border="0" align="center" ';
+    echo '<table width="'.$table->width.'" border="0" align="'.$table->tablealign.'" ';
     echo " cellpadding=\"$table->cellpadding\" cellspacing=\"$table->cellspacing\" class=\"$table->class\" $tableid>\n";
 
     $countcols = 0;
@@ -3011,7 +3015,6 @@ function print_table($table) {
         }
     }
     echo '</table>'."\n";
-    print_simple_box_end();
 
     return true;
 }