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

amueller amueller@source.lon-capa.org
Tue, 07 Apr 2009 15:40:38 -0000


amueller		Tue Apr  7 15:40:38 2009 EDT

  Modified files:              
    /loncom/interface	lonhtmlcommon.pm 
  Log:
  Workaround. Removed the breadcrumbsymbol before the String "Main Course Documents" on the Edit Course Page Site. When this
  String stand alone a breadcrumbsymbol was written before. 
  
  added some comments .
  
  
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.206 loncom/interface/lonhtmlcommon.pm:1.207
--- loncom/interface/lonhtmlcommon.pm:1.206	Sat Apr  4 20:06:37 2009
+++ loncom/interface/lonhtmlcommon.pm	Tue Apr  7 15:40:38 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.206 2009/04/04 20:06:37 bisitz Exp $
+# $Id: lonhtmlcommon.pm,v 1.207 2009/04/07 15:40:38 amueller Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1344,7 +1344,7 @@
                     no_mt  =>$no_mt_descr,
                 });
         }
-        my $links .= '<li>'.
+        my $links .= '<li>'. 
             join('</li><li>'.$crumbsymbol,
                  map {
                      $faq = $_->{'faq'} if (exists($_->{'faq'}));
@@ -1354,6 +1354,7 @@
                      if (defined($_->{'target'}) && $_->{'target'} ne '') {
                          $result .= 'target="'.$_->{'target'}.'" ';
                      }
+			# set the possible translation for title 
 		     if ($_->{'no_mt'}) {
 			 $result .='title="'.$_->{'title'}.'">'.
 			     $_->{'text'}.'</a>';
@@ -1364,13 +1365,19 @@
                      $result;
                      } @Crumbs
                  ).'</li>';
-        $links .= '<li>'.$crumbsymbol if ($links ne '');
+#Workaround for edit course. 
+	if(@Crumbs == 0 ){
+		$links .= '<li>' if ($links ne '');
+	} else {
+		$links .= '<li>'.$crumbsymbol if ($links ne '');
+	}
+#should the last Element be translated?
 	if ($last->{'no_mt'}) {
-	    $links .= '<b>'.$last->{'text'}.'</b></li>';
+	    $links .= '<b>'.$last->{'text'}.'</b>';
 	} else {
-	    $links .= '<b>'.&mt($last->{'text'}).'</b></li>';
+	    $links .= '<b>'.&mt($last->{'text'}).'</b>';
 	}
-        #
+	$links .= '</li>';
         my $icons = '';
         $faq = $last->{'faq'} if (exists($last->{'faq'}));
         $bug = $last->{'bug'} if (exists($last->{'bug'}));
@@ -1413,7 +1420,7 @@
         # Return the @Crumbs stack to what we started with
         push(@Crumbs,$last);
         shift(@Crumbs);
-        #
+        # Return a table and after that the breadcrumb's line
         return "$Str\n$Str1";
     }