--- loncom/publisher/lonpubdir.pm 2004/01/03 15:57:11 1.54
+++ loncom/publisher/lonpubdir.pm 2004/01/15 20:22:47 1.58
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Construction Space Directory Lister
#
-# $Id: lonpubdir.pm,v 1.54 2004/01/03 15:57:11 www Exp $
+# $Id: lonpubdir.pm,v 1.58 2004/01/15 20:22:47 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -245,7 +245,10 @@ sub getTitleString {
return $title;
}
-
+sub getCopyRightString {
+ my $fullname = shift;
+ return &Apache::lonnet::metadata($fullname, 'copyright');
+}
#
# Put out a directory table row:
# putdirectory(r, base, here, dirname, modtime)
@@ -268,12 +271,12 @@ sub putdirectory {
($dirname eq '.')) {
my $kaputt=0;
foreach (keys %{$bombs}) {
- if ($_=~/^$resdir\/$disfilename\//) { $kaputt=1; last; }
+ if ($_=~m:^\Q$resdir\E/\Q$disfilename\E/:) { $kaputt=1; last; }
}
%Apache::lonpublisher::metadatafields=();
%Apache::lonpublisher::metadatakeys=();
my $construct=$here;
- $construct=~s/^\/priv\/(\w+)$/\/home\/$1\/public_html/;
+ $construct=~s:^/priv/(\w+)$:/home/$1/public_html:;
&Apache::lonpublisher::metaeval(&Apache::lonnet::getfile(
$construct.'/'.$dirname.'/default.meta'
));
@@ -281,9 +284,9 @@ sub putdirectory {
'
| '.
''.&mt('Go to ...').' | '.
- ''.
+ ' | '.
$disfilename.' | '.
- ''.($kaputt?'':'').$Apache::lonpublisher::metadatafields{'title'}.' '.
+ ' | '.($kaputt?&Apache::lonhtmlcommon::authorbombs($resdir.'/'.$disfilename.'/'):'').$Apache::lonpublisher::metadatafields{'title'}.' '.
$Apache::lonpublisher::metadatafields{'subject'}.' '.
$Apache::lonpublisher::metadatafields{'keywords'}.' | '.
''.&Apache::lonlocal::locallocaltime($modtime).' | '.
@@ -308,7 +311,8 @@ sub putresource {
$ratime,$rmtime,$rctime,
$rblksize,$rblocks)=stat($resdir.'/'.$filename);
if ($rmtime>=$cmtime) {
- $status=&mt('Published');
+ $status=&mt('Published').'
'.
+ &mt(&getCopyRightString($targetdir.'/'.$filename));
$bgcolor='#CCFF88';
if (&Apache::lonnet::metadata($targetdir.'/'.$filename,'obsolete')) {
$status=&mt('Obsolete');
@@ -316,14 +320,15 @@ sub putresource {
}
$title=''.
- getTitleString($targetdir.'/'.$filename, 'title').'';
+ &getTitleString($targetdir.'/'.$filename).'';
} else {
- $status=&mt('Modified');
+ $status=&mt('Modified').'
'.
+ &mt(&getCopyRightString($targetdir.'/'.$filename));
$bgcolor='#FFFF77';
$title=''.
- getTitleString($targetdir.'/'.$filename,'title').'';
+ &getTitleString($targetdir.'/'.$filename).'';
if (&Apache::loncommon::fileembstyle(($filename=~/\.(\w+)$/)) eq 'ssi') {
- $status.='
'.&mt('Diffs').'';
}
@@ -352,7 +357,7 @@ sub putresource {
''.&mt('Publish').''.
' | '.
- ''.
+ ' | '.
''.
$filename.''.$editlink2.$editlink.
' | '.