[LON-CAPA-cvs] cvs: loncom /interface lonhtmlcommon.pm lonindexer.pm /publisher lonpubdir.pm
www
lon-capa-cvs@mail.lon-capa.org
Mon, 22 Dec 2003 19:30:25 -0000
www Mon Dec 22 14:30:25 2003 EDT
Modified files:
/loncom/interface lonhtmlcommon.pm lonindexer.pm
/loncom/publisher lonpubdir.pm
Log:
Crumbs on both /priv and /res
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.33 loncom/interface/lonhtmlcommon.pm:1.34
--- loncom/interface/lonhtmlcommon.pm:1.33 Fri Oct 17 15:56:13 2003
+++ loncom/interface/lonhtmlcommon.pm Mon Dec 22 14:30:25 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.33 2003/10/17 19:56:13 matthew Exp $
+# $Id: lonhtmlcommon.pm,v 1.34 2003/12/22 19:30:25 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -834,6 +834,22 @@
undef(%$prog_state);
$r->rflush();
}
+
+
+# ------------------------------------------------------- Puts directory header
+
+sub crumbs {
+ my ($uri,$target,$prefix)=@_;
+ my $output='<br /><tt><b><font size="+2">'.$prefix.'/';
+ my $path=$prefix.'/';
+ foreach (split('/',$uri)) {
+ unless ($_) { next; }
+ $path.=$_.'/';
+ $output.='<a href="'.$path.'"'.($target?' target="'.$target.'"':'').'>'.$_.'</a>/';
+ }
+ return $output.'</font></b></tt><br />';
+}
+
1;
Index: loncom/interface/lonindexer.pm
diff -u loncom/interface/lonindexer.pm:1.82 loncom/interface/lonindexer.pm:1.83
--- loncom/interface/lonindexer.pm:1.82 Mon Dec 22 13:58:26 2003
+++ loncom/interface/lonindexer.pm Mon Dec 22 14:30:25 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Directory Indexer
#
-# $Id: lonindexer.pm,v 1.82 2003/12/22 18:58:26 www Exp $
+# $Id: lonindexer.pm,v 1.83 2003/12/22 19:30:25 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -25,21 +25,6 @@
#
# http://www.lon-capa.org/
#
-# YEAR=1999
-# 5/21/99, 5/22,5/25,5/26,5/31,6/2,6/10,7/12,7/14 Gerd Kortemeyer)
-# 11/23 Gerd Kortemeyer
-# YEAR=2000
-# 07/20-08/04 H.K. Ng
-# YEAR=2001
-# 05/9-05/19/2001 H. K. Ng
-# 05/21/2001 H. K. Ng
-# 05/23/2001 H. K. Ng
-# 6/26,7/8 H. K. Ng
-# 8/14 H. K. Ng
-# 11/30 Matthew Hall
-# YEAR=2002
-# 6/29/2002 H. K. Ng
-#
###
###############################################################################
@@ -61,6 +46,7 @@
use strict;
use Apache::lonnet();
use Apache::loncommon();
+use Apache::lonhtmlcommon();
use Apache::Constants qw(:common);
use Apache::lonmeta;
use Apache::File;
@@ -83,20 +69,6 @@
my @Omit = ();
-# ------------------------------------------------------- Puts directory header
-
-sub crumbs {
- my $uri=shift;
- my $output='<br /><tt><b><font size="+2">/';
- my $path='/';
- foreach (split('/',$uri)) {
- unless ($_) { next; }
- $path.=$_.'/';
- $output.='<a href="'.$path.'">'.$_.'</a>/';
- }
- return $output.'</font></b></tt><br />';
-}
-
# ----------------------------- Handling routine called via Apache and mod_perl
sub handler {
my $r = shift;
@@ -473,7 +445,7 @@
</form>
END
# ---------------------------------------------------------------- Bread crumbs
- $r->print(&crumbs($uri));
+ $r->print(&Apache::lonhtmlcommon::crumbs($uri));
# ----------------- output starting row to the indexed file/directory hierarchy
my $titleclr="#ddffff";
# $r->print(&initdebug());
Index: loncom/publisher/lonpubdir.pm
diff -u loncom/publisher/lonpubdir.pm:1.47 loncom/publisher/lonpubdir.pm:1.48
--- loncom/publisher/lonpubdir.pm:1.47 Fri Dec 5 09:26:25 2003
+++ loncom/publisher/lonpubdir.pm Mon Dec 22 14:30:25 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Construction Space Directory Lister
#
-# $Id: lonpubdir.pm,v 1.47 2003/12/05 14:26:25 sakharuk Exp $
+# $Id: lonpubdir.pm,v 1.48 2003/12/22 19:30:25 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -25,19 +25,6 @@
#
# http://www.lon-capa.org/
#
-#
-# (TeX Content Handler
-#
-# YEAR=2000
-# 05/29/00,05/30,10/11 Gerd Kortemeyer)
-#
-# 11/28,11/29,11/30,12/01,12/02,12/04,12/23 Gerd Kortemeyer
-# YEAR=2001
-# 03/23 Guy Albertelli
-# 03/24,03/29 Gerd Kortemeyer)
-# 03/31,04/03,05/09,06/23,08/18,08/20 Gerd Kortemeyer
-# 12/28 Gerd Kortemeyer
-#
###
package Apache::lonpubdir;
@@ -48,6 +35,7 @@
use Apache::Constants qw(:common :http :methods);
use Apache::loncacc;
use Apache::loncommon();
+use Apache::lonhtmlcommon();
use Apache::lonlocal;
sub handler {
@@ -213,8 +201,7 @@
</script>
ENDPUBDIRSCRIPT
- $r->print('<h1>'.&mt('Construction Space Directory').' <tt>'.
- $thisdisfn.'/</tt></h1>'.
+ $r->print('<h2>'.&mt('Construction Space Directory').'</h2>'.
'<script type="text/javascript">top.document.title = \''.
$thisdisfn.'/ - LON-CAPA Construction Space\';</script>'.
$pubdirscript.
@@ -234,6 +221,8 @@
$r->print('<h3>'.&mt('Co-Author').': '.$uname.' at '.$udom.
'</h3>');
}
+ $r->print(
+ &Apache::lonhtmlcommon::crumbs($thisdisfn,'_top','/priv/'.$uname));
}
#