[LON-CAPA-cvs] cvs: loncom /interface lonhtmlcommon.pm

bisitz bisitz@source.lon-capa.org
Thu, 22 Jan 2009 14:26:04 -0000


bisitz		Thu Jan 22 14:26:04 2009 EDT

  Modified files:              
    /loncom/interface	lonhtmlcommon.pm 
  Log:
  Separated breadcrumbs from component help
  Credits: Waldemar Kaisler
  
  
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.198 loncom/interface/lonhtmlcommon.pm:1.199
--- loncom/interface/lonhtmlcommon.pm:1.198	Tue Jan 20 16:38:39 2009
+++ loncom/interface/lonhtmlcommon.pm	Thu Jan 22 14:26:04 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.198 2009/01/20 16:38:39 bisitz Exp $
+# $Id: lonhtmlcommon.pm,v 1.199 2009/01/22 14:26:04 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1308,7 +1308,8 @@
         my ($component,$component_help,$menulink,$helplink,$css_class,$no_mt) = @_;
         #
 	$css_class ||= 'LC_breadcrumbs';
-        my $Str = "\n".'<table class="'.$css_class.'"><tr><td><ol id="LC_MenuBreadcrumbs">';
+        my $Str1 = '<ol id="LC_MenuBreadcrumbs">';
+        my $Str = '';
         #
         # Make the faq and bug data cascade
         my $faq = '';
@@ -1382,10 +1383,11 @@
 							 $faq,$bug);
 	}
         #
-        $Str .= $links.'</ol></td>';
+        $Str1 .= $links.'</ol>';
         #
         if (defined($component)) {
-            $Str .= '<td class="'.$css_class.'_component">';
+            $Str .= "\n".'<table class="'.$css_class.'">'
+                   .'<tr><td class="'.$css_class.'_component">';
             if ($no_mt) {
                 $Str .= $component;
             } else {
@@ -1394,15 +1396,14 @@
 	    if ($icons ne '') {
 		$Str .= '&nbsp;'.$icons;
 	    }
-	    $Str .= '</td>';
+	    $Str .= '</td></tr></table>'."\n";
         }
-        $Str .= '</tr></table>'."\n";
         #
         # Return the @Crumbs stack to what we started with
         push(@Crumbs,$last);
         shift(@Crumbs);
         #
-        return $Str;
+        return "$Str\n$Str1";
     }
 
     sub clear_breadcrumbs {