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

raeburn raeburn@source.lon-capa.org
Tue, 03 Nov 2009 20:04:05 -0000


raeburn		Tue Nov  3 20:04:05 2009 EDT

  Modified files:              
    /loncom/interface	lonmenu.pm 
  Log:
  - Reverse part of 1.297 - eliminate target attribute (href points at a javascript function).
  - Community Contents as first item in breadcrumbs for course type of Community. 
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.298 loncom/interface/lonmenu.pm:1.299
--- loncom/interface/lonmenu.pm:1.298	Fri Oct 30 00:19:49 2009
+++ loncom/interface/lonmenu.pm	Tue Nov  3 20:04:05 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.298 2009/10/30 00:19:49 raeburn Exp $
+# $Id: lonmenu.pm,v 1.299 2009/11/03 20:04:05 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -150,7 +150,7 @@
     } else {             # textual Link
         $link = &mt($$menuitem[3]);
     }
-    return '<li><a href="'.$$menuitem[0].'" target="_top">'.$link.'</a></li>';
+    return '<li><a href="'.$$menuitem[0].'">'.$link.'</a></li>';
 }
 
 # primary_menu() evaluates @primary_menu and returns XHTML for the menu
@@ -545,7 +545,13 @@
 
         my $maptitle = &Apache::lonnet::gettitle($mapurl);
         my $restitle = &Apache::lonnet::gettitle(&Apache::lonnet::symbread());
-        my @crumbs = ({text  => "Course Contents", 
+        my $contentstext;
+        if ($env{'course.'.$env{'request.course.id'}.'.type'} eq 'Community') {
+            $contentstext = &mt('Community Contents');
+        } else {
+            $contentstext = &mt('Course Contents');
+        }
+        my @crumbs = ({text  => $contentstext, 
                        href  => "Javascript:gonav('/adm/navmaps')"});
 
         if ($mapurl ne $env{'course.'.$env{'request.course.id'}.'.url'}) {