From ff2ec3b570316e72bf4b96178c560b552f36cd71 Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 27 Apr 2004 08:49:22 +0000 Subject: [PATCH] Some changes to the layout to remove blocks etc --- calendar/preferences.php | 49 ++----------------- calendar/view.php | 101 ++++++++++----------------------------- 2 files changed, 31 insertions(+), 119 deletions(-) diff --git a/calendar/preferences.php b/calendar/preferences.php index c49838c708..380c4ad1db 100644 --- a/calendar/preferences.php +++ b/calendar/preferences.php @@ -134,49 +134,10 @@ // Layout the whole page as three big columns. echo ''; - // START: The left column - echo ''; - $sections = get_all_sections($site->id); - - if ($site->newsitems > 0 or $sections[0]->sequence or isediting($site->id) or isadmin()) { - echo "'; - } - // END: The left column - - // START: Middle column - echo ''; - // START: Last column (3-month display) + // END: Last column (3-month display) echo '
'; + // START: The main column + echo '
"; - $firstcolumn=true; - - if ($sections[0]->sequence or isediting($site->id)) { - get_all_mods($site->id, $mods, $modnames, $modnamesplural, $modnamesused); - print_section_block(get_string("mainmenu"), $site, $sections[0], - $mods, $modnames, $modnamesused, true, $side); - } - - print_courses_sideblock(0, $side); - if ($site->newsitems) { - if ($news = forum_get_course_forum($site->id, "news")) { - print_side_block_start(get_string("latestnews"), $side, "sideblocklatestnews"); - echo ""; - forum_print_latest_discussions($news->id, $site->newsitems, "minimal", "", false); - echo ""; - print_side_block_end(); - } - } - print_spacer(1,$side); - } - - if (iscreator()) { - if (!$firstcolumn) { - echo ""; - $firstcolumn=true; - } - print_admin_links($site->id, $side); - } - - if ($firstcolumn) { - echo ''; + echo ''; $text = '
'.get_string('calendarheading', 'calendar', strip_tags($site->shortname)).'
'; $text.= calendar_get_preferences_menu(); @@ -294,7 +255,7 @@ // END: Middle column // START: Last column (3-month display) - echo '
'; + echo ''; print_side_block_start(get_string('monthlyview', 'calendar'), '', 'sideblockmain'); list($prevmon, $prevyr) = calendar_sub_month($mon, $yr); list($nextmon, $nextyr) = calendar_add_month($mon, $yr); @@ -313,7 +274,7 @@ print_side_block_end(); print_spacer(1, $side); echo '
'; print_footer(); diff --git a/calendar/view.php b/calendar/view.php index 007a97d054..f33050dd89 100644 --- a/calendar/view.php +++ b/calendar/view.php @@ -56,8 +56,6 @@ //add_to_log($course->id, "course", "view", "view.php?id=$course->id", "$course->id"); - $firstcolumn = false; // for now - $lastcolumn = true; // for now $side = 175; $prefmenu = true; // By default, display it @@ -85,7 +83,6 @@ case 'month': $nav .= ' -> '.calendar_month_name($mon).' '.$yr; $pagetitle = get_string('detailedmonthview', 'calendar'); - $lastcolumn = false; break; case 'upcoming': $pagetitle = get_string('upcomingevents', 'calendar'); @@ -115,63 +112,18 @@ // Layout the whole page as three big columns. echo ''; + echo ''; - // START: The left column ... - echo ''; - } - - // END: The left column - - // START: Middle column - if ($lastcolumn) { - echo ''; - // END: Middle column + // END: Main column // START: Last column (3-month display) - if ($lastcolumn) { - echo ''; - } + echo ''; echo '
'; + // START: Main column - $sections = get_all_sections($site->id); + echo ''; - // Latest site news - if ($site->newsitems > 0 || $sections[0]->sequence || isediting($site->id) || isadmin()) { - echo ""; - $firstcolumn=true; - - if ($sections[0]->sequence or isediting($site->id)) { - get_all_mods($site->id, $mods, $modnames, $modnamesplural, $modnamesused); - print_section_block(get_string("mainmenu"), $site, $sections[0], - $mods, $modnames, $modnamesused, true, $side); - } - print_courses_sideblock(0, $side); - if ($site->newsitems) { - if ($news = forum_get_course_forum($site->id, "news")) { - print_side_block_start(get_string("latestnews"), $side, "sideblocklatestnews"); - echo ""; - forum_print_latest_discussions($news->id, $site->newsitems, "minimal", "", false); - echo ""; - print_side_block_end(); - } - } - print_spacer(1,$side); - } - - if (iscreator()) { - if (!$firstcolumn) { - echo ""; - $firstcolumn=true; - } - print_admin_links($site->id, $side); - } - - if ($firstcolumn) { - echo ''; - } - else { - echo ''; - } - - if($prefmenu) { + if ($prefmenu) { $text = '
'.get_string('calendarheading', 'calendar', strip_tags($site->shortname)).'
'; $text.= calendar_get_preferences_menu(); $text.= '
'; - } - else { + + } else { $text = get_string('calendarheading', 'calendar', strip_tags($site->shortname)); } @@ -219,31 +171,30 @@ echo '
'; - print_side_block_start(get_string('monthlyview', 'calendar'), '', 'sideblockmain'); - list($prevmon, $prevyr) = calendar_sub_month($mon, $yr); - list($nextmon, $nextyr) = calendar_add_month($mon, $yr); - echo calendar_filter_controls($_GET['view']); - echo '

'; - echo calendar_top_controls('display', array('m' => $prevmon, 'y' => $prevyr)); - echo calendar_get_mini($courses, $groups, $users, $prevmon, $prevyr); - echo '

'; - echo calendar_top_controls('display', array('m' => $mon, 'y' => $yr)); - echo calendar_get_mini($courses, $groups, $users, $mon, $yr); - echo '

'; - echo calendar_top_controls('display', array('m' => $nextmon, 'y' => $nextyr)); - echo calendar_get_mini($courses, $groups, $users, $nextmon, $nextyr); - echo '

'; - print_side_block_end(); - print_spacer(1, $side); - echo '
'; + print_side_block_start(get_string('monthlyview', 'calendar'), '', 'sideblockmain'); + list($prevmon, $prevyr) = calendar_sub_month($mon, $yr); + list($nextmon, $nextyr) = calendar_add_month($mon, $yr); + echo calendar_filter_controls($_GET['view']); + echo '

'; + echo calendar_top_controls('display', array('m' => $prevmon, 'y' => $prevyr)); + echo calendar_get_mini($courses, $groups, $users, $prevmon, $prevyr); + echo '

'; + echo calendar_top_controls('display', array('m' => $mon, 'y' => $yr)); + echo calendar_get_mini($courses, $groups, $users, $mon, $yr); + echo '

'; + echo calendar_top_controls('display', array('m' => $nextmon, 'y' => $nextyr)); + echo calendar_get_mini($courses, $groups, $users, $nextmon, $nextyr); + echo '

'; + print_side_block_end(); + print_spacer(1, $side); + echo '
'; + print_footer(); function calendar_show_event($event) { -- 2.39.5