--- loncom/publisher/lonpubdir.pm 2004/06/07 22:34:12 1.60
+++ loncom/publisher/lonpubdir.pm 2004/08/20 16:29:15 1.63
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Construction Space Directory Lister
#
-# $Id: lonpubdir.pm,v 1.60 2004/06/07 22:34:12 albertel Exp $
+# $Id: lonpubdir.pm,v 1.63 2004/08/20 16:29:15 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -256,6 +256,11 @@ sub getCopyRightString {
my $fullname = shift;
return &Apache::lonnet::metadata($fullname, 'copyright');
}
+
+sub getSourceRightString {
+ my $fullname = shift;
+ return &Apache::lonnet::metadata($fullname, 'sourceavail');
+}
#
# Put out a directory table row:
# putdirectory(r, base, here, dirname, modtime)
@@ -313,6 +318,10 @@ sub putresource {
my $bgcolor='#FFAA99';
my $title=' ';
my $publish_button=&mt('Publish');
+ my $action_buttons=
+ '
'.
+ &mt('Delete').'';
if (-e $resdir.'/'.$filename) {
my ($rdev,$rino,$rmode,$rnlink,
$ruid,$rgid,$rrdev,$rsize,
@@ -321,19 +330,24 @@ sub putresource {
$publish_button=&mt('Re-Publish');
if ($rmtime>=$cmtime) {
$status=&mt('Published').'
'.
- &mt(&getCopyRightString($targetdir.'/'.$filename));
+ &mt(&getCopyRightString($targetdir.'/'.$filename)).' '.
+ &mt(&getSourceRightString($targetdir.'/'.$filename));
$bgcolor='#CCFF88';
if (&Apache::lonnet::metadata($targetdir.'/'.$filename,'obsolete')) {
$status=&mt('Obsolete');
$bgcolor='#AAAAAA';
+ } else {
+ $action_buttons='';
}
$title=''.
&getTitleString($targetdir.'/'.$filename).'';
} else {
$status=&mt('Modified').'
'.
- &mt(&getCopyRightString($targetdir.'/'.$filename));
+ &mt(&getCopyRightString($targetdir.'/'.$filename)).' '.
+ &mt(&getSourceRightString($targetdir.'/'.$filename));
$bgcolor='#FFFF77';
+ $action_buttons='';
$title=''.
&getTitleString($targetdir.'/'.$filename).'';
if (&Apache::loncommon::fileembstyle(($filename=~/\.(\w+)$/)) eq 'ssi') {
@@ -345,7 +359,7 @@ sub putresource {
$title.='
'.
($$bombs{$targetdir.'/'.$filename}?'':'Edit Metadata').'';
$status.='
'.&mt('Retrieve').'';
+ $thisdisfn.'/'.$filename.'" target="_top">'.&mt('Retrieve').'';
}
my $editlink='';
my $editlink2='';
@@ -365,6 +379,7 @@ sub putresource {
'').
'