version 1.35, 2003/09/22 00:48:32
|
version 1.37, 2003/09/27 13:20:46
|
Line 244 if ($content{'customdistributionfile'})
|
Line 244 if ($content{'customdistributionfile'})
|
$customdistributionfile='<a href="'.$content{'customdistributionfile'}. |
$customdistributionfile='<a href="'.$content{'customdistributionfile'}. |
'"><tt>'.$content{'customdistributionfile'}.'</tt></a>'; |
'"><tt>'.$content{'customdistributionfile'}.'</tt></a>'; |
} |
} |
|
|
|
my $obsolete=$content{'obsolete'}; |
|
my $obsoletereplace=$content{'obsoletereplacement'}; |
|
my $obsoletewarning=''; |
|
if (($obsolete) && ($ENV{'user.adv'})) { |
|
$obsoletewarning='<p><font color="red">'.&mt('This resource has been marked obsolete by the author(s)').'</font></p>'; |
|
} |
|
|
my %lt=&Apache::lonlocal::texthash( |
my %lt=&Apache::lonlocal::texthash( |
'au' =>'Author(s)', |
'au' =>'Author(s)', |
'sb' => 'Subject', |
'sb' => 'Subject', |
Line 255 my %lt=&Apache::lonlocal::texthash(
|
Line 263 my %lt=&Apache::lonlocal::texthash(
|
'cd' => 'Creation Date', |
'cd' => 'Creation Date', |
'pu' => 'Publisher/Owner', |
'pu' => 'Publisher/Owner', |
'co' => 'Copyright/Distribution', |
'co' => 'Copyright/Distribution', |
'cf' => 'Custom Distribution File'); |
'cf' => 'Custom Distribution File', |
|
'ob' => 'Obsolete', |
|
'or' => |
|
'Suggested Replacement for Obsolete File'); |
my $bodytag=&Apache::loncommon::bodytag |
my $bodytag=&Apache::loncommon::bodytag |
('Catalog Information','','','',$resdomain); |
('Catalog Information','','','',$resdomain); |
$r->print(<<ENDHEAD); |
$r->print(<<ENDHEAD); |
Line 263 my $bodytag=&Apache::loncommon::bodytag
|
Line 274 my $bodytag=&Apache::loncommon::bodytag
|
$bodytag |
$bodytag |
<h2>$content{'title'}</h2> |
<h2>$content{'title'}</h2> |
<h3><tt>$disuri</tt></h3> |
<h3><tt>$disuri</tt></h3> |
|
$obsoletewarning |
$versiondisplay<br /> |
$versiondisplay<br /> |
<table cellspacing=2 border=0> |
<table cellspacing=2 border=0> |
<tr><td bgcolor='#AAAAAA'>$lt{'au'}</td> |
<tr><td bgcolor='#AAAAAA'>$lt{'au'}</td> |
Line 289 Last Revision Date</td><td bgcolor="#CCC
|
Line 301 Last Revision Date</td><td bgcolor="#CCC
|
<td bgcolor="#CCCCCC">$content{'copyright'} </td></tr> |
<td bgcolor="#CCCCCC">$content{'copyright'} </td></tr> |
<tr><td bgcolor='#AAAAAA'>$lt{'cf'}</td> |
<tr><td bgcolor='#AAAAAA'>$lt{'cf'}</td> |
<td bgcolor="#CCCCCC">$customdistributionfile </td></tr> |
<td bgcolor="#CCCCCC">$customdistributionfile </td></tr> |
|
<tr><td bgcolor='#AAAAAA'>$lt{'ob'}</td> |
|
<td bgcolor="#CCCCCC">$obsolete </td></tr> |
|
<tr><td bgcolor='#AAAAAA'>$lt{'or'}</td> |
|
<td bgcolor="#CCCCCC">$obsoletereplace </td></tr> |
</table> |
</table> |
ENDHEAD |
ENDHEAD |
delete($content{'title'}); |
delete($content{'title'}); |
Line 304 ENDHEAD
|
Line 320 ENDHEAD
|
delete($content{'owner'}); |
delete($content{'owner'}); |
delete($content{'copyright'}); |
delete($content{'copyright'}); |
delete($content{'customdistributionfile'}); |
delete($content{'customdistributionfile'}); |
|
delete($content{'obsolete'}); |
|
delete($content{'obsoletereplacement'}); |
if ($ENV{'user.adv'}) { |
if ($ENV{'user.adv'}) { |
# ------------------------------------------------------------ Dynamic Metadata |
# ------------------------------------------------------------ Dynamic Metadata |
$r->print( |
$r->print( |
Line 383 $dynmeta{$_}." </td></tr>\n");
|
Line 401 $dynmeta{$_}." </td></tr>\n");
|
'<h4>'.&mt('Evaluation Comments').' ('.&mt('visible to author and co-authors only').')</h4>'. |
'<h4>'.&mt('Evaluation Comments').' ('.&mt('visible to author and co-authors only').')</h4>'. |
'<blockquote>'.$dynmeta{'comments'}.'</blockquote>'); |
'<blockquote>'.$dynmeta{'comments'}.'</blockquote>'); |
$r->print( |
$r->print( |
'<h4>Error Messages (visible to author and co-authors only)</h4>'); |
'<h4>'.&mt('Error Messages').' ('. |
|
&mt('visible to author and co-authors only').')</h4>'); |
my %errormsgs=&Apache::lonnet::dump('nohist_res_msgs',$1,$2); |
my %errormsgs=&Apache::lonnet::dump('nohist_res_msgs',$1,$2); |
foreach (keys %errormsgs) { |
foreach (keys %errormsgs) { |
if ($_=~/^\Q$disuri\E\_\d+$/) { |
if ($_=~/^\Q$disuri\E\_\d+$/) { |
Line 436 $dynmeta{$_}." </td></tr>\n");
|
Line 455 $dynmeta{$_}." </td></tr>\n");
|
if ($disuri=~/\/default$/) { |
if ($disuri=~/\/default$/) { |
my $dir=$disuri; |
my $dir=$disuri; |
$dir=~s/default$//; |
$dir=~s/default$//; |
$displayfile='Default Cataloging Information for Directory '.$dir; |
$displayfile=&mt('Default Cataloging Information for Directory').' '. |
|
$dir; |
} |
} |
%Apache::lonpublisher::metadatafields=(); |
%Apache::lonpublisher::metadatafields=(); |
%Apache::lonpublisher::metadatakeys=(); |
%Apache::lonpublisher::metadatakeys=(); |
Line 448 $bodytag
|
Line 468 $bodytag
|
<form method="post"> |
<form method="post"> |
ENDEDIT |
ENDEDIT |
foreach ('author','title','subject','keywords','abstract','notes', |
foreach ('author','title','subject','keywords','abstract','notes', |
'copyright','customdistributionfile','language') { |
'copyright','customdistributionfile','language', |
|
'obsolete','obsoletereplacement') { |
if ($ENV{'form.new_'.$_}) { |
if ($ENV{'form.new_'.$_}) { |
$Apache::lonpublisher::metadatafields{$_}=$ENV{'form.new_'.$_}; |
$Apache::lonpublisher::metadatafields{$_}=$ENV{'form.new_'.$_}; |
} |
} |
Line 471 ENDEDIT
|
Line 492 ENDEDIT
|
my $mfh; |
my $mfh; |
unless ($mfh=Apache::File->new('>'.$fn)) { |
unless ($mfh=Apache::File->new('>'.$fn)) { |
$r->print( |
$r->print( |
'<p><font color=red>Could not write metadata, FAIL</font>'); |
'<p><font color=red>'.&mt('Could not write metadata').', '. |
|
&mt('FAIL').'</font>'); |
} else { |
} else { |
foreach (sort keys %Apache::lonpublisher::metadatafields) { |
foreach (sort keys %Apache::lonpublisher::metadatafields) { |
unless ($_=~/\./) { |
unless ($_=~/\./) { |
Line 492 ENDEDIT
|
Line 514 ENDEDIT
|
.'</'.$tag.'>'; |
.'</'.$tag.'>'; |
} |
} |
} |
} |
$r->print('<p>Wrote Metadata'); |
$r->print('<p>'.&mt('Wrote Metadata')); |
} |
} |
} |
} |
$r->print( |
$r->print( |
'<br /><input type="submit" name="store" value="Store Catalog Information"></form></body></html>'); |
'<br /><input type="submit" name="store" value="'. |
|
&mt('Store Catalog Information').'"></form></body></html>'); |
return OK; |
return OK; |
} |
} |
} |
} |