--- loncom/publisher/lonpubdir.pm 2004/01/03 15:11:37 1.53
+++ 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.53 2004/01/03 15:11:37 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'}.' '.
+ ' | '.
+ $disfilename.' | '.
+ ''.($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').'';
}
@@ -336,11 +341,11 @@ sub putresource {
my $editlink='';
my $editlink2='';
if ($filename=~/\.(xml|html|htm|xhtml|xhtm|sty)$/) {
- $editlink=' ('.&mt('Edit').')';
+ $editlink='
('.&mt('Edit').')';
}
if ($filename=~/\.(problem|exam|quiz|assess|survey|form|library)$/) {
$editlink=' ('.&mt('EditXML').')';
- $editlink2=' ('.&mt('Edit').')';
+ $editlink2='
('.&mt('Edit').')';
}
if ($filename=~/\.(zip|tar|bz2|gz|tar.gz|tar.bz2|tgz)$/) {
$editlink=' ('.&mt('Publish').''.
''.
- ''.
+ ' | '.
''.
- $filename.''.$editlink2.$editlink.
+ $filename.''.$editlink2.$editlink.
' | '.
''.$title.' | '.
''.$status.' | '.