diff --git a/calendar/view.php b/calendar/view.php index 6eb8184ff4798..9ecc0b2e3bb22 100644 --- a/calendar/view.php +++ b/calendar/view.php @@ -190,27 +190,24 @@ list($nextmon, $nextyr) = calendar_add_month($mon, $yr); $getvars = 'id='.$courseid.'&cal_d='.$day.'&cal_m='.$mon.'&cal_y='.$yr; // For filtering - echo '
'; - echo '

'.get_string('eventskey', 'calendar').'

'; - echo '
'; - echo calendar_filter_controls($view, $getvars, NULL, $courses); - echo '
'; - echo '
'; - - echo '
'; - echo '

'.get_string('monthlyview', 'calendar').'

'; - - echo '
'; - echo calendar_top_controls('display', array('id' => $courseid, 'm' => $prevmon, 'y' => $prevyr)); - echo calendar_get_mini($courses, $groups, $users, $prevmon, $prevyr); - echo '
'; - echo calendar_top_controls('display', array('id' => $courseid, 'm' => $mon, 'y' => $yr)); - echo calendar_get_mini($courses, $groups, $users, $mon, $yr); - echo '
'; - echo calendar_top_controls('display', array('id' => $courseid, 'm' => $nextmon, 'y' => $nextyr)); - echo calendar_get_mini($courses, $groups, $users, $nextmon, $nextyr); - echo '
'; - echo '
'; + $content='
'; + $content.=calendar_filter_controls($view, $getvars, NULL, $courses); + $content.='
'; + + print_side_block(get_string('eventskey', 'calendar'),$content); + + $content='
'; + $content.=calendar_top_controls('display', array('id' => $courseid, 'm' => $prevmon, 'y' => $prevyr)); + $content.=calendar_get_mini($courses, $groups, $users, $prevmon, $prevyr); + $content.='
'; + $content.=calendar_top_controls('display', array('id' => $courseid, 'm' => $mon, 'y' => $yr)); + $content.=calendar_get_mini($courses, $groups, $users, $mon, $yr); + $content.='
'; + $content.=calendar_top_controls('display', array('id' => $courseid, 'm' => $nextmon, 'y' => $nextyr)); + $content.=calendar_get_mini($courses, $groups, $users, $nextmon, $nextyr); + $content.='
'; + + print_side_block(get_string('monthlyview', 'calendar'),$content); echo ''; diff --git a/lib/weblib.php b/lib/weblib.php index d88ec2dbc00a8..6cd96b3de4266 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -6334,8 +6334,10 @@ function rebuildnolinktag($text) { * Prints a nice side block with an optional header. The content can either * be a block of HTML or a list of text with optional icons. * - * @param string $heading Block $title embedded in HTML tags, for example

. - * @param string $content ? + * @param string $heading HTML for the heading. Can include full HTML or just + * plain text - plain text will automatically be enclosed in the appropriate + * heading tags. + * @param string $content HTML for the content * @param array $list ? * @param array $icons ? * @param string $footer ? @@ -6398,7 +6400,9 @@ function print_side_block($heading='', $content='', $list=NULL, $icons=NULL, $fo /** * Starts a nice side block with an optional header. * - * @param string $heading ? + * @param string $heading HTML for the heading. Can include full HTML or just + * plain text - plain text will automatically be enclosed in the appropriate + * heading tags. * @param array $attributes ? * @todo Finish documenting this function */ @@ -6441,7 +6445,15 @@ function print_side_block_start($heading='', $attributes = array()) { echo '
'."\n"; } if ($heading) { - //Accessibility: H2 more appropriate in moodleblock.class.php: _title_html. + // Some callers pass in complete html for the heading, which may include + // complicated things such as the 'hide block' button; some just pass in + // text. If they only pass in plain text i.e. it doesn't include a + //
, then we add in standard tags that make it look like a normal + // page block including the h2 for accessibility + if(strpos($heading,'
')===false) { + $heading='

'.$heading.'

'; + } + echo '
'; if (!empty($THEME->customcorners)) { echo '
 
'; diff --git a/theme/custom_corners/js/js.php b/theme/custom_corners/js/js.php index 4c22b19209e97..a2efde31cb85a 100644 --- a/theme/custom_corners/js/js.php +++ b/theme/custom_corners/js/js.php @@ -22,6 +22,8 @@ } else { tagname = 'haslayouttable onlymiddlecolumn'; } + } else if(document.getElementsByTagName('body')[0].id.substring(0,9)=='calendar-') { + tagname='haslayouttable onlyrightcolumn'; } function setbodytag (tagname) { diff --git a/theme/custom_corners/user_styles.css b/theme/custom_corners/user_styles.css index 4bdd853962dd2..397a03e52ea3a 100644 --- a/theme/custom_corners/user_styles.css +++ b/theme/custom_corners/user_styles.css @@ -1482,4 +1482,7 @@ body.grade-report-grader table#user-grades td.course { .tag_cloud .s2, .tag_cloud .s1 { font-size: 0.9em; +} +#calendar .maincalendar { + background:white; } \ No newline at end of file diff --git a/theme/standard/styles_color.css b/theme/standard/styles_color.css index 9be92ea5a0cda..61679203339e6 100644 --- a/theme/standard/styles_color.css +++ b/theme/standard/styles_color.css @@ -612,10 +612,6 @@ table.minicalendar { background-color: #EEEEEE; } -#calendar td.sidecalendar .sideblock { - border-color: #DDDDDD; -} - /*** *** Course diff --git a/theme/standard/styles_layout.css b/theme/standard/styles_layout.css index 283211d33640b..4188d053cc545 100644 --- a/theme/standard/styles_layout.css +++ b/theme/standard/styles_layout.css @@ -1531,16 +1531,11 @@ table.minicalendar td { height: auto; } -#calendar div.header +#calendar .maincalendar div.header { padding: 5px; } -#calendar .sideblock div.header -{ - border:none; -} - #calendar .maincalendar .buttons { float: right; } @@ -1738,11 +1733,6 @@ table.minicalendar th { border-width:0px; } -#calendar td.sidecalendar .sideblock { - border: 1px solid; - margin-bottom:10px; -} - #calendar td.sidecalendar .minicalendartop { padding-top:10px; } diff --git a/theme/wood/styles_color.css b/theme/wood/styles_color.css index d8d0c5afadf0a..3f977eed1a509 100644 --- a/theme/wood/styles_color.css +++ b/theme/wood/styles_color.css @@ -252,7 +252,6 @@ legend, #course-user .section, #site-index .sitetopic .sitetopiccontent, #calendar .maincalendar .filters table, -#calendar .sidecalendar, #calendar .sidecalendar .filters table, .block_calendar_month .filters table, #calendar .maincalendar .minicalendar,