MDL-12221 custom themes revisited - implemented container concept; merged from MOODLE_19_STABLE

This commit is contained in:
skodak 2007-11-23 16:49:51 +00:00
parent 220f149cfc
commit 9f7f1a74a0
48 changed files with 653 additions and 732 deletions

View file

@ -66,10 +66,6 @@ foreach ($RESOURCE_WINDOW_OPTIONS as $popupoption) {
}
}
if (!empty($THEME->customcorners)) {
require_once($CFG->dirroot.'/lib/custom_corners_lib.php');
}
/**
* resource_base is the base class for resource types
*
@ -170,14 +166,14 @@ class resource_base {
if((blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $PAGE->user_is_editing())) {
echo '<td style="width: '.$blocks_preferred_width.'px;" id="left-column">';
if (!empty($THEME->customcorners)) print_custom_corners_start();
print_container_start();
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT);
if (!empty($THEME->customcorners)) print_custom_corners_end();
print_container_end();
echo '</td>';
}
echo '<td id="middle-column">';
if (!empty($THEME->customcorners)) print_custom_corners_start();
print_container_start();
echo '<div id="resource">';
}
@ -195,14 +191,14 @@ class resource_base {
$blocks_preferred_width = bounded_number(180, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]), 210);
echo '</div>';
if (!empty($THEME->customcorners)) print_custom_corners_end();
print_container_end();
echo '</td>';
if((blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $PAGE->user_is_editing())) {
echo '<td style="width: '.$blocks_preferred_width.'px;" id="right-column">';
if (!empty($THEME->customcorners)) print_custom_corners_start();
print_container_start();
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT);
if (!empty($THEME->customcorners)) print_custom_corners_end();
print_container_end();
echo '</td>';
}

View file

@ -482,10 +482,9 @@ class resource_ims extends resource_base {
/// Now, let's print the footer. It's harcoded here to save some space
/// because it's impossible to use print_footer() to print NOTHING
/// Added programatic support to customcorners themes.
if (!empty($THEME->customcorners)) {
print_custom_corners_end(false, 'content');
}
echo '</div></div></body></html>'; /// Close everything.
// this is hack!
print_container_end(); // container "content" started in header
echo '</div></body></html>'; // close page div started in header
/// log it.
add_to_log($course->id, "resource", "view", "view.php?id={$cm->id}", $resource->id, $cm->id);