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

raeburn lon-capa-cvs@mail.lon-capa.org
Sat, 04 Dec 2004 02:05:23 -0000


raeburn		Fri Dec  3 21:05:23 2004 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  Include filename of resource being viewed at the end of the crumbs in remoteless CSTR, but don't make it a link.
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.240 loncom/interface/loncommon.pm:1.241
--- loncom/interface/loncommon.pm:1.240	Thu Dec  2 16:30:16 2004
+++ loncom/interface/loncommon.pm	Fri Dec  3 21:05:23 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.240 2004/12/02 21:30:16 albertel Exp $
+# $Id: loncommon.pm,v 1.241 2004/12/04 02:05:23 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2608,14 +2608,18 @@
 	    $formaction=~s/\/+/\//g;
             unless ($customtitle) {  #this is for resources; directories have customtitle, and crumbs and select recent are created in lonpubdir.pm  
                 my $parentpath = '';
-                if ($thisdisfn =~ m-(.+/)[^/]*$-) {
+                my $lastitem = '';
+                if ($thisdisfn =~ m-(.+/)([^/]*)$-) {
                     $parentpath = $1;
+                    $lastitem = $2;
+                } else {
+                    $lastitem = $thisdisfn;
                 }
 	        $titleinfo = &Apache::loncommon::help_open_menu('','','','',3,'Authoring').
                       '<font face="Arial, Helvetica, sans-serif"><b>Construction Space</b>:</font>&nbsp;'. 
                       '<form name="dirs" method="post" action="'.$formaction
 		    .'" target="_top"><tt><b>'
-		    .&Apache::lonhtmlcommon::crumbs($uname.'/'.$parentpath,'_top','/priv','','+1',1)."</b></tt><br />"
+		    .&Apache::lonhtmlcommon::crumbs($uname.'/'.$parentpath,'_top','/priv','','+1',1)."<font size=\"+1\">$lastitem</font></b></tt><br />"
 		    .&Apache::lonhtmlcommon::select_recent('construct','recent','this.form.action=this.form.recent.value;this.form.submit()')
 		    .'</form>'
 		    .&Apache::lonmenu::constspaceform();