Some tweaks for formatting sideblock footers (esp upcoming events)
authormoodler <moodler>
Mon, 10 May 2004 17:09:06 +0000 (17:09 +0000)
committermoodler <moodler>
Mon, 10 May 2004 17:09:06 +0000 (17:09 +0000)
blocks/calendar_upcoming/block_calendar_upcoming.php
calendar/lib.php
course/lib.php

index 504a83aa538373c17ed9a5787d8ca45ed78655d8..e9c7c120234c192a4faa11ec0636427d59a00d2c 100644 (file)
@@ -21,8 +21,8 @@ class CourseBlock_calendar_upcoming extends MoodleBlock {
 
         $this->content = New object;
         $this->content->text = '';
-        $this->content->footer = '<hr /><div style="text-align: center;"><a href="'.$CFG->wwwroot.'/calendar/view.php?view=month">'.get_string('gotocalendar', 'calendar').'...</a>';
-        $this->content->footer .= '<br /><a href="'.$CFG->wwwroot.'/calendar/event.php?action=new">'.get_string('newevent', 'calendar').'...</a></div>';
+        $this->content->footer = '<br /><a href="'.$CFG->wwwroot.'/calendar/view.php?view=month">'.get_string('gotocalendar', 'calendar').'</a>...';
+        $this->content->footer .= '<br /><a href="'.$CFG->wwwroot.'/calendar/event.php?action=new">'.get_string('newevent', 'calendar').'</a>...';
 
         if($this->course === NULL) {
             // Overrides: use no course at all
index b77088882d61b78bc4f3af233120f7ac23982889..5aab0ff14f26b713f22b63b81d7c9911581d7a2c 100644 (file)
@@ -778,7 +778,7 @@ function calendar_get_sideblock_upcoming($courses, $groups, $users, $daysinfutur
         } else {
             $content .= $events[$i]->name;
         }
-        $content .= '</div><div class="cal_event_date">'.$events[$i]->time.'</div>';
+        $content .= '</div><div class="cal_event_date" style="text-align:right;">'.$events[$i]->time.'</div>';
         if ($i < $lines - 1) $content .= '<hr />';
     }
 
index 398b97841fa7a18de079b891ed303b17667ee488..21f62a0b6dfcdee9efc14e03cc51f63cb0c41ff6 100644 (file)
@@ -1032,7 +1032,9 @@ function print_side_block($heading="", $content="", $list=NULL, $icons=NULL, $fo
 
     if ($content) {
         echo "$content";
-        echo "<font size=\"-1\">$footer</font>";
+        if ($footer) {
+            echo "<div style=\"font-size: x-small; text-align:right;\">$footer</div>";
+        }
     } else {
         echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">";
         if ($list) {
@@ -1050,7 +1052,7 @@ function print_side_block($heading="", $content="", $list=NULL, $icons=NULL, $fo
             if ($icons) {
                 echo "<td class=\"sideblocklinks\" valign=\"top\" width=\"16\">&nbsp;</td>";
             }
-            echo "<td class=\"sideblocklinks\"><font size=\"-1\">$footer</font></td>";
+            echo "<td class=\"sideblocklinks\"><div style=\"font-size: x-small; text-align:right;\">$footer</div></td>";
             echo "</tr>";
         }
         echo "</table>";