From 758027d0e7c4c040e4d08ba03de63869e3e86e0c Mon Sep 17 00:00:00 2001 From: urs_hunkler Date: Thu, 11 Jan 2007 17:01:32 +0000 Subject: [PATCH] 'more flexible round corner version, added pageclass nocoursepage to style course pages being no course view, admin view or site index' --- lib/weblib.php | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/lib/weblib.php b/lib/weblib.php index 528cf1911e..2cfac7ee93 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -2199,6 +2199,11 @@ function print_header ($title='', $heading='', $navigation='', $focus='', $pageclass .= ' course-'.SITEID; } + if (($pageid != 'site-index') && ($pageid != 'course-view') && + ($pageid != 'admin-settings')) { + $pageclass .= ' nocoursepage'; + } + if (!isloggedin()) { $pageclass .= ' notloggedin'; } @@ -5221,7 +5226,7 @@ function print_side_block($heading='', $content='', $list=NULL, $icons=NULL, $fo */ function print_side_block_start($heading='', $attributes = array()) { - global $CFG; + global $CFG, $THEME; // If there are no special attributes, give a default CSS class if (empty($attributes) || !is_array($attributes)) { @@ -5253,9 +5258,28 @@ function print_side_block_start($heading='', $attributes = array()) { } echo '
'; + if ($heading) { //Accessibility: replaced
with H2; no, H2 more appropriate in moodleblock.class.php: _title_html. - echo '
'.$heading.'
'; + // echo '
'.$heading.'
'; + echo '
'; + if (!empty($THEME->roundcorners)) { + echo '
'; + echo '
'; + } + echo $heading; + if (!empty($THEME->roundcorners)) { + echo '
'; + } + echo '
'; + } else { + if (!empty($THEME->roundcorners)) { + echo '
'; + } + } + + if (!empty($THEME->roundcorners)) { + echo '
'; } echo '
'; @@ -5266,9 +5290,16 @@ function print_side_block_start($heading='', $attributes = array()) { * Print table ending tags for a side block box. */ function print_side_block_end($attributes = array()) { - global $CFG; + global $CFG, $THEME; + + echo '
'; + + if (!empty($THEME->roundcorners)) { + echo '
'; + echo '
'; + } - echo '
'; + echo ''; // IE workaround: if I do it THIS way, it works! WTF? if (!empty($CFG->allowuserblockhiding) && isset($attributes['id'])) { -- 2.39.5