--- loncom/publisher/lonpubdir.pm 2004/01/15 20:22:47 1.58
+++ loncom/publisher/lonpubdir.pm 2004/06/18 16:52:19 1.61
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Construction Space Directory Lister
#
-# $Id: lonpubdir.pm,v 1.58 2004/01/15 20:22:47 www Exp $
+# $Id: lonpubdir.pm,v 1.61 2004/06/18 16:52:19 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -222,8 +222,15 @@ ENDPUBDIRSCRIPT
$r->print('
'.&mt('Co-Author').': '.$uname.' at '.$udom.
'
');
}
- $r->print(
- &Apache::lonhtmlcommon::crumbs($uname.'/'.$thisdisfn.'/','_top','/priv').'
');
+ my $formaction='/priv/'.$uname.'/'.$thisdisfn.'/';
+ $formaction=~s/\/+/\//g;
+ $r->print('');
+ &Apache::lonhtmlcommon::store_recent('construct',$formaction,$formaction);
}
#
@@ -249,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)
@@ -305,15 +317,18 @@ sub putresource {
my $status=&mt('Unpublished');
my $bgcolor='#FFAA99';
my $title=' ';
+ my $publish_button=&mt('Publish');
if (-e $resdir.'/'.$filename) {
my ($rdev,$rino,$rmode,$rnlink,
$ruid,$rgid,$rrdev,$rsize,
$ratime,$rmtime,$rctime,
$rblksize,$rblocks)=stat($resdir.'/'.$filename);
+ $publish_button=&mt('Re-Publish');
if ($rmtime>=$cmtime) {
$status=&mt('Published').'
'.
- &mt(&getCopyRightString($targetdir.'/'.$filename));
- $bgcolor='#CCFF88';
+ &mt(&getCopyRightString($targetdir.'/'.$filename)).' '.
+ &mt(&getSourceRightString($targetdir.'/'.$filename));
+ $bgcolor='#CCFF88';
if (&Apache::lonnet::metadata($targetdir.'/'.$filename,'obsolete')) {
$status=&mt('Obsolete');
$bgcolor='#AAAAAA';
@@ -323,7 +338,8 @@ sub putresource {
&getTitleString($targetdir.'/'.$filename).'';
} else {
$status=&mt('Modified').'
'.
- &mt(&getCopyRightString($targetdir.'/'.$filename));
+ &mt(&getCopyRightString($targetdir.'/'.$filename)).' '.
+ &mt(&getSourceRightString($targetdir.'/'.$filename));
$bgcolor='#FFFF77';
$title=''.
&getTitleString($targetdir.'/'.$filename).'';
@@ -355,7 +371,7 @@ sub putresource {
''.($filename=~/[\#\~]$/?' ':
' | ').
''.&mt('Publish').''.
+ $uname.$thisdisfn.'/'.$filename.'">'.$publish_button.''.
' | '.
''.
''.
|