--- loncom/publisher/lonpubdir.pm 2003/09/22 03:02:06 1.39
+++ loncom/publisher/lonpubdir.pm 2003/11/18 04:08:15 1.45
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Construction Space Directory Lister
#
-# $Id: lonpubdir.pm,v 1.39 2003/09/22 03:02:06 www Exp $
+# $Id: lonpubdir.pm,v 1.45 2003/11/18 04:08:15 taceyjo1 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -113,7 +113,7 @@ sub handler {
my $dirptr=16384; # Mask indicating a directory in stat.cmode.
opendir(DIR,$fn);
- my @files=sort(readdir(DIR));
+ my @files=sort {uc($a) cmp uc($b)} (readdir(DIR));
foreach my $filename (@files) {
my ($cdev,$cino,$cmode,$cnlink,
$cuid,$cgid,$crdev,$csize,
@@ -221,11 +221,14 @@ ENDPUBDIRSCRIPT
'
');
+ $uname.$thisdisfn."/default.meta'".'" value="'.
+&mt('Edit Directory Catalog Information').'" /> '.&mt('Force publication of unmodified files').'. | |
');
if (($uname ne $ENV{'user.name'}) || ($udom ne $ENV{'user.domain'})) {
$r->print(''.&mt('Co-Author').': '.$uname.' at '.$udom.
@@ -247,7 +250,7 @@ sub getTitleString {
my $title = &Apache::lonnet::metadata($fullname, 'title');
unless ($title) {
- $title = "[untitled]";
+ $title = "[".&mt('untitled')."]";
}
return $title;
}
@@ -279,7 +282,7 @@ sub putdirectory {
$disfilename.''.
' | '.
' | '.
- ''.localtime($modtime).' | '.
+ ''.&Apache::lonlocal::locallocaltime($modtime).' | '.
"\n");
}
return OK;
@@ -301,24 +304,28 @@ sub putresource {
$ratime,$rmtime,$rctime,
$rblksize,$rblocks)=stat($resdir.'/'.$filename);
if ($rmtime>=$cmtime) {
- $status='Published';
+ $status=&mt('Published');
$bgcolor='#CCFFCC';
+ if (&Apache::lonnet::metadata($targetdir.'/'.$filename,'obsolete')) {
+ $status=&mt('Obsolete');
+ $bgcolor='#AAAAAA';
+ }
$title=''.
getTitleString($targetdir.'/'.$filename, 'title').'';
} else {
- $status='Modified';
+ $status=&mt('Modified');
$bgcolor='#FFFFCC';
$title=''.
getTitleString($targetdir.'/'.$filename,'title').'';
if (&Apache::loncommon::fileembstyle(($filename=~/\.(\w+)$/)) eq 'ssi') {
$status.='
Diffs';
+ '&versiontwo=priv" target=cat>'.&mt('Diffs').'';
}
}
$status.='
Retrieve';
+ $thisdisfn.'/'.$filename.'" target=cat>'.&mt('Retrieve').'';
}
my $editlink='';
my $editlink2='';
@@ -329,9 +336,13 @@ sub putresource {
$editlink=' ('.&mt('EditXML').')';
$editlink2=' ('.&mt('Edit').')';
}
+ if ($filename=~/\.(zip|tar|bz2|gz|tar.gz|tar.bz2|tgz)$/) {
+ &Apache::lonnet::appenv('cgi.file' => $filename);
+ $editlink=' ('.&mt('Decompress').')';
+ }
$r->print(''.
''.'Publish'.
+ $uname.$thisdisfn.'/'.$filename.'">'.&mt('Publish').''.
' | '.
''.
''.
@@ -339,7 +350,7 @@ sub putresource {
' | '.
''.$title.' | '.
''.$status.' | '.
- ''.localtime($cmtime).' | '.
+ ''.&Apache::lonlocal::locallocaltime($cmtime).' | '.
"
\n");
return OK;
}