More aligned calendar controls on courses without groups
authormoodler <moodler>
Mon, 24 May 2004 05:13:34 +0000 (05:13 +0000)
committermoodler <moodler>
Mon, 24 May 2004 05:13:34 +0000 (05:13 +0000)
calendar/lib.php

index 380233d2cd21399cc38bed1e8bfbef1e953fc58d..f176cb9b24560832e6ed05ee6391624f0d19f31a 100644 (file)
@@ -626,24 +626,23 @@ function calendar_filter_controls($type, $vars = NULL, $course = NULL) {
             // This course MIGHT have group events defined, so show the filter
             if($SESSION->cal_show_groups) {
                 $content .= '<td class="cal_event_group" style="width: 8px;"></td><td><a href="'.CALENDAR_URL.'set.php?var=showgroups'.$getvars.'" title="'.get_string('tt_hidegroups', 'calendar').'">'.get_string('groupevents', 'calendar').'</a></td>'."\n";
-            }
-            else {
+            } else {
                 $content .= '<td style="width: 8px;"></td><td><a href="'.CALENDAR_URL.'set.php?var=showgroups'.$getvars.'" title="'.get_string('tt_showgroups', 'calendar').'">'.get_string('groupevents', 'calendar').'</a></td>'."\n";
             }
-            if($SESSION->cal_show_user) {
+            if ($SESSION->cal_show_user) {
                 $content .= '<td class="cal_event_user" style="width: 8px;"></td><td><a href="'.CALENDAR_URL.'set.php?var=showuser'.$getvars.'" title="'.get_string('tt_hideuser', 'calendar').'">'.get_string('userevents', 'calendar').'</a></td>'."\n";
-            }
-            else {
+            } else {
                 $content .= '<td style="width: 8px;"></td><td><a href="'.CALENDAR_URL.'set.php?var=showuser'.$getvars.'" title="'.get_string('tt_showuser', 'calendar').'">'.get_string('userevents', 'calendar').'</a></td>'."\n";
             }
-        }
-        else {
+
+        else {
             // This course CANNOT have group events, so lose the filter
+            $content .= '<td style="width: 8px;"></td><td>&nbsp;</td>'."\n";
+
             if($SESSION->cal_show_user) {
-                $content .= '<td class="cal_event_user" style="width: 8px;"></td><td colspan="3"><a href="'.CALENDAR_URL.'set.php?var=showuser'.$getvars.'" title="'.get_string('tt_hideuser', 'calendar').'">'.get_string('userevents', 'calendar').'</a></td>'."\n";
-            }
-            else {
-                $content .= '<td style="width: 8px;"></td><td colspan="3"><a href="'.CALENDAR_URL.'set.php?var=showuser'.$getvars.'" title="'.get_string('tt_showuser', 'calendar').'">'.get_string('userevents', 'calendar').'</a></td>'."\n";
+                $content .= '<td class="cal_event_user" style="width: 8px;"></td><td><a href="'.CALENDAR_URL.'set.php?var=showuser'.$getvars.'" title="'.get_string('tt_hideuser', 'calendar').'">'.get_string('userevents', 'calendar').'</a></td>'."\n";
+            } else {
+                $content .= '<td style="width: 8px;"></td><td><a href="'.CALENDAR_URL.'set.php?var=showuser'.$getvars.'" title="'.get_string('tt_showuser', 'calendar').'">'.get_string('userevents', 'calendar').'</a></td>'."\n";
             }
         }
     }