--- loncom/interface/lonindexer.pm 2003/12/22 18:58:26 1.82
+++ loncom/interface/lonindexer.pm 2003/12/30 20:47:23 1.84
@@ -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.84 2003/12/30 20:47:23 albertel 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 @@ package Apache::lonindexer;
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 @Only = ();
my @Omit = ();
-# ------------------------------------------------------- Puts directory header
-
-sub crumbs {
- my $uri=shift;
- my $output='
/';
- my $path='/';
- foreach (split('/',$uri)) {
- unless ($_) { next; }
- $path.=$_.'/';
- $output.=''.$_.'/';
- }
- return $output.'
';
-}
-
# ----------------------------- Handling routine called via Apache and mod_perl
sub handler {
my $r = shift;
@@ -473,7 +445,7 @@ $groupimportbutton
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());
@@ -821,12 +793,7 @@ sub display_line {
return OK if ($skip > 0);
}
# Set the icon for the file
- my $iconname = "unknown.gif";
- my $embstyle = &Apache::loncommon::fileembstyle($curfext);
- # The unless conditional that follows is a bit of overkill
- $iconname = $curfext.".gif" unless
- (!defined($embstyle) || $embstyle eq 'unk' || $embstyle eq 'hdn');
- #
+ my $iconname = &Apache::loncommon::icon($listname);
$r->print("