mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 00:42:54 +02:00
'changes for flexible column arrangement - see MDL-8109'
This commit is contained in:
parent
86aab05ced
commit
d55c9a1f33
@ -68,6 +68,12 @@
|
||||
echo '<table id="layout-table" cellspacing="0"><tr>';
|
||||
|
||||
/// The left column ...
|
||||
// uh-changes start
|
||||
$lt = (empty($THEME->layouttable)) ? array('left', 'middle', 'right') : $THEME->layouttable;
|
||||
foreach ($lt as $column) {
|
||||
switch ($column) {
|
||||
case 'left':
|
||||
// uh-changes end
|
||||
|
||||
if (blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $editing) {
|
||||
echo '<td style="width:'.$preferred_width_left.'px" id="left-column">';
|
||||
@ -75,6 +81,10 @@
|
||||
echo '</td>';
|
||||
}
|
||||
|
||||
// uh-changes start
|
||||
break;
|
||||
case 'middle':
|
||||
// uh-changes end
|
||||
/// Start main column
|
||||
echo '<td id="middle-column"><a name="startofcontent"></a>';
|
||||
|
||||
@ -260,6 +270,10 @@
|
||||
|
||||
echo '</td>';
|
||||
|
||||
// uh-changes start
|
||||
break;
|
||||
case 'right':
|
||||
// uh-changes end
|
||||
// The right column
|
||||
if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $editing) {
|
||||
echo '<td style="width:'.$preferred_width_right.'px" id="right-column">';
|
||||
@ -267,6 +281,11 @@
|
||||
echo '</td>';
|
||||
}
|
||||
|
||||
// uh-changes start
|
||||
break;
|
||||
}
|
||||
}
|
||||
// uh-changes end
|
||||
echo '</tr></table>';
|
||||
|
||||
?>
|
||||
|
25
index.php
25
index.php
@ -99,13 +99,24 @@
|
||||
<table id="layout-table" summary="">
|
||||
<tr>
|
||||
<?php
|
||||
|
||||
// uh-changes start
|
||||
// $CFG->LayoutTable = array('left', 'middle', 'right');
|
||||
// $CFG->LayoutTable = array('left', 'right', 'middle');
|
||||
// $CFG->LayoutTable = array('middle', 'left', 'right');
|
||||
$lt = (empty($THEME->layouttable)) ? array('left', 'middle', 'right') : $THEME->layouttable;
|
||||
foreach ($lt as $column) {
|
||||
switch ($column) {
|
||||
case 'left':
|
||||
// uh-changes end
|
||||
if (blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $editing) {
|
||||
echo '<td style="width: '.$preferred_width_left.'px;" id="left-column">';
|
||||
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT);
|
||||
echo '</td>';
|
||||
}
|
||||
|
||||
// uh-changes start
|
||||
break;
|
||||
case 'middle':
|
||||
// uh-changes end
|
||||
echo '<td id="middle-column">';
|
||||
|
||||
|
||||
@ -225,7 +236,10 @@
|
||||
}
|
||||
|
||||
echo '</td>';
|
||||
|
||||
// uh-changes start
|
||||
break;
|
||||
case 'right':
|
||||
// uh-changes end
|
||||
// The right column
|
||||
if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $editing || has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
|
||||
echo '<td style="width: '.$preferred_width_right.'px;" id="right-column">';
|
||||
@ -236,6 +250,11 @@
|
||||
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT);
|
||||
echo '</td>';
|
||||
}
|
||||
// uh-changes start
|
||||
break;
|
||||
}
|
||||
}
|
||||
// uh-changes end
|
||||
?>
|
||||
|
||||
</tr>
|
||||
|
Loading…
x
Reference in New Issue
Block a user