--- loncom/interface/lonmeta.pm 2003/09/22 00:48:32 1.35 +++ loncom/interface/lonmeta.pm 2003/10/04 20:49:40 1.38 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Metadata display handler # -# $Id: lonmeta.pm,v 1.35 2003/09/22 00:48:32 www Exp $ +# $Id: lonmeta.pm,v 1.38 2003/10/04 20:49:40 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -219,9 +219,9 @@ sub handler { # --------------------------------------------------------------- Render Output my ($thisversion)=($uri=~/\.(\d+)\.(\w+)\.meta$/); -my $creationdate=localtime( +my $creationdate=&Apache::lonlocal::locallocaltime( &Apache::loncommon::unsqltime($content{'creationdate'})); -my $lastrevisiondate=localtime( +my $lastrevisiondate=&Apache::lonlocal::locallocaltime( &Apache::loncommon::unsqltime($content{'lastrevisiondate'})); my $language=&Apache::loncommon::languagedescription($content{'language'}); my $mime=&Apache::loncommon::filedescription($content{'mime'}); @@ -234,8 +234,8 @@ my $owner=$content{'owner'}; $owner=~s/(\w+)(\:|\@)(\w+)/&authordisplay($1,$3)/gse; my $versiondisplay=''; if ($thisversion) { - $versiondisplay='Version: '.$thisversion. - ' (most recent version: '.$currentversion.')'; + $versiondisplay=&mt('Version').': '.$thisversion. + ' ('.&mt('most recent version').': '.$currentversion.')'; } else { $versiondisplay='Version: '.$currentversion; } @@ -244,6 +244,14 @@ if ($content{'customdistributionfile'}) $customdistributionfile=''.$content{'customdistributionfile'}.''; } + +my $obsolete=$content{'obsolete'}; +my $obsoletereplace=$content{'obsoletereplacement'}; +my $obsoletewarning=''; +if (($obsolete) && ($ENV{'user.adv'})) { + $obsoletewarning='
'.&mt('This resource has been marked obsolete by the author(s)').'
'; +} + my %lt=&Apache::lonlocal::texthash( 'au' =>'Author(s)', 'sb' => 'Subject', @@ -255,7 +263,10 @@ my %lt=&Apache::lonlocal::texthash( 'cd' => 'Creation Date', 'pu' => 'Publisher/Owner', 'co' => 'Copyright/Distribution', - 'cf' => 'Custom Distribution File'); + 'cf' => 'Custom Distribution File', + 'ob' => 'Obsolete', + 'or' => + 'Suggested Replacement for Obsolete File'); my $bodytag=&Apache::loncommon::bodytag ('Catalog Information','','','',$resdomain); $r->print(<$lt{'au'} | @@ -289,6 +301,10 @@ Last Revision Date$content{'copyright'} |
$lt{'cf'} | $customdistributionfile |
$lt{'ob'} | +$obsolete |
$lt{'or'} | +$obsoletereplace |
'.$dynmeta{'comments'}.''); $r->print( - '