[LON-CAPA-cvs] cvs: loncom /interface lonindexer.pm
www
lon-capa-cvs@mail.lon-capa.org
Mon, 05 Jan 2004 15:02:43 -0000
www Mon Jan 5 10:02:43 2004 EDT
Modified files:
/loncom/interface lonindexer.pm
Log:
Bug #2335: directory catalog information from default.meta
Index: loncom/interface/lonindexer.pm
diff -u loncom/interface/lonindexer.pm:1.85 loncom/interface/lonindexer.pm:1.86
--- loncom/interface/lonindexer.pm:1.85 Fri Jan 2 16:00:56 2004
+++ loncom/interface/lonindexer.pm Mon Jan 5 10:02:43 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Directory Indexer
#
-# $Id: lonindexer.pm,v 1.85 2004/01/02 21:00:56 www Exp $
+# $Id: lonindexer.pm,v 1.86 2004/01/05 15:02:43 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -956,7 +956,49 @@
$r->print ('<a href="javascript:gothere(\''.$curdir.'\')"><img src="'.
$iconpath.'folder_'.$diropen.'.gif" border="0" /></a>'.
"\n");
- $r->print ("$listname$tabtag</tr></form>\n");
+ $r->print ("$listname</td>\n");
+# Attributes
+ my $filelink = $startdir.$filecom[0].'/default';
+
+ if ($hash{'display_attrs_0'} == 1) {
+ my $title = &Apache::lonnet::gettitle($filelink,'title');
+ $r->print('<td> '.($title eq '' ? ' ' : $title).
+ ' </td>'."\n");
+ }
+ $r->print('<td align=right> ',
+ $filecom[8]," </td>\n")
+ if $hash{'display_attrs_1'} == 1;
+ $r->print('<td> '.
+ (localtime($filecom[9]))." </td>\n")
+ if $hash{'display_attrs_2'} == 1;
+ $r->print('<td> '.
+ (localtime($filecom[10]))." </td>\n")
+ if $hash{'display_attrs_3'} == 1;
+
+ if ($hash{'display_attrs_4'} == 1) {
+ my $author = &Apache::lonnet::metadata($filelink,'author');
+ $r->print('<td> '.($author eq '' ? ' ' : $author).
+ " </td>\n");
+ }
+ if ($hash{'display_attrs_5'} == 1) {
+ my $keywords = &Apache::lonnet::metadata($filelink,'keywords');
+ # $keywords = ' ' if (!$keywords);
+ $r->print('<td> '.($keywords eq '' ? ' ' : $keywords).
+ " </td>\n");
+ }
+ if ($hash{'display_attrs_6'} == 1) {
+ my $lang = &Apache::lonnet::metadata($filelink,'language');
+ $lang = &Apache::loncommon::languagedescription($lang);
+ $r->print('<td> '.($lang eq '' ? ' ' : $lang).
+ " </td>\n");
+ }
+ if ($hash{'display_attrs_7'} == 1) {
+ $r->print('<td> </td>');
+ }
+ if ($hash{'display_attrs_8'} == 1) {
+ $r->print('<td> </td>');
+ }
+ $r->print('</form></tr>');
}
}