[LON-CAPA-cvs] cvs: loncom /publisher lonpubdir.pm
www
lon-capa-cvs@mail.lon-capa.org
Sat, 03 Jan 2004 03:19:43 -0000
www Fri Jan 2 22:19:43 2004 EDT
Modified files:
/loncom/publisher lonpubdir.pm
Log:
Show default.meta info in dir listing for directory entry.
Index: loncom/publisher/lonpubdir.pm
diff -u loncom/publisher/lonpubdir.pm:1.51 loncom/publisher/lonpubdir.pm:1.52
--- loncom/publisher/lonpubdir.pm:1.51 Tue Dec 30 21:33:28 2003
+++ loncom/publisher/lonpubdir.pm Fri Jan 2 22:19:43 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Construction Space Directory Lister
#
-# $Id: lonpubdir.pm,v 1.51 2003/12/31 02:33:28 www Exp $
+# $Id: lonpubdir.pm,v 1.52 2004/01/03 03:19:43 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -270,12 +270,20 @@
foreach (keys %{$bombs}) {
if ($_=~/^$resdir\/$disfilename\//) { $kaputt=1; last; }
}
+ %Apache::lonpublisher::metadatafields=();
+ %Apache::lonpublisher::metadatakeys=();
+ my $construct=$here;
+ $construct=~s/^\/priv\/(\w+)$/\/home\/$1\/public_html/;
+ &Apache::lonpublisher::metaeval(&Apache::lonnet::getfile(
+ $construct.'/'.$dirname.'/default.meta'
+ ));
$r->print('<tr bgcolor="#CCCCFF">'.
'<td>'.&mt('Go to ...').'</td>'.
'<td><a href="'.$here.'/'.$dirname.'/" target="_top">'.
$disfilename.'</a></td>'.
- '<td>'.($kaputt?'<img src="/adm/lonMisc/bomb.gif" />':' ').'</td>'.
- '<td> </td>'.
+ '<td colspan="2">'.($kaputt?'<img src="/adm/lonMisc/bomb.gif" />':'').$Apache::lonpublisher::metadatafields{'title'}.' '.
+ $Apache::lonpublisher::metadatafields{'subject'}.' '.
+ $Apache::lonpublisher::metadatafields{'keywords'}.'</td>'.
'<td>'.&Apache::lonlocal::locallocaltime($modtime).'</td>'.
"</tr>\n");
}