version 1.76, 2001/03/22 14:58:58
|
version 1.77, 2001/03/26 21:24:12
|
Line 229 LASTREVISIONDATEEND
|
Line 229 LASTREVISIONDATEEND
|
# ------------------------------------------- Compute customized metadata field |
# ------------------------------------------- Compute customized metadata field |
$scrout.=<<CUSTOMMETADATA; |
$scrout.=<<CUSTOMMETADATA; |
<p> |
<p> |
<font color="#800000" face="helvetica"><b>LIMIT BY OTHER METADATA FIELDS:</b> |
<font color="#800000" face="helvetica"><b>LIMIT BY SPECIAL METADATA FIELDS:</b> |
</font> |
</font> |
For author-specific metadata, enter in an expression in the form of |
For resource-specific metadata, enter in an expression in the form of |
<i>key</i>=<i>value</i> separated by operators such as AND or OR.<br> |
<i>key</i>=<i>value</i> separated by operators such as AND or OR.<br> |
<b>Example:</b> grandmother=75 OR grandfather=85 |
<b>Example:</b> grandmother=75 OR grandfather=85 |
<br> |
<br> |
Line 239 CUSTOMMETADATA
|
Line 239 CUSTOMMETADATA
|
$scrout.=&simpletextfield('custommetadata',$ENV{'form.custommetadata'}); |
$scrout.=&simpletextfield('custommetadata',$ENV{'form.custommetadata'}); |
$scrout.=' <i>initial users of this system do not need to worry about this option</i>'; |
$scrout.=' <i>initial users of this system do not need to worry about this option</i>'; |
|
|
|
$scrout.=<<CUSTOMSHOW; |
|
<p> |
|
<font color="#800000" face="helvetica"><b>SHOW SPECIAL METADATA FIELDS:</b> |
|
</font> |
|
Enter in a space-separated list of special metadata fields to show |
|
in a fielded listing for each record result. |
|
<br> |
|
CUSTOMSHOW |
|
$scrout.=&simpletextfield('customshow',$ENV{'form.customshow'}); |
|
$scrout.=' <i>initial users of this system do not need to worry about this option</i>'; |
|
|
# ---------------------------------------------------------------- Print screen |
# ---------------------------------------------------------------- Print screen |
$r->print(<<ENDDOCUMENT); |
$r->print(<<ENDDOCUMENT); |
<html> |
<html> |
Line 487 sub advancedsearch {
|
Line 498 sub advancedsearch {
|
'lastrevisiondatestart_year','lastrevisiondateend_month', |
'lastrevisiondatestart_year','lastrevisiondateend_month', |
'lastrevisiondateend_day','lastrevisiondateend_year', |
'lastrevisiondateend_day','lastrevisiondateend_year', |
'notes','abstract','mime','language','owner', |
'notes','abstract','mime','language','owner', |
'custommetadata') { |
'custommetadata','customshow') { |
$ENV{"form.$field"}=~s/[^\w\s\(\)\=\-\"\']//g; |
$ENV{"form.$field"}=~s/[^\w\s\(\)\=\-\"\']//g; |
} |
} |
for my $field ('title','author','subject','keywords','url','version', |
for my $field ('title','author','subject','keywords','url','version', |
Line 665 sub output_results {
|
Line 676 sub output_results {
|
@results=<$fh>; |
@results=<$fh>; |
} |
} |
|
|
|
my $customshow=''; |
|
my $extrashow=''; |
|
if ($ENV{'form.customshow'}) { |
|
$customshow=$ENV{'form.customshow'}; |
|
$customshow=~s/[^\w\s]//g; |
|
my @fields=map {"<font color=\"#008000\">$_:</font>"} |
|
split(/\s+/,$customshow); |
|
$extrashow="<ul><li>".join("</li><li>",@fields)."</li></ul>\n"; |
|
} |
foreach my $result (@results) { |
foreach my $result (@results) { |
my @fields=map |
my @fields=map |
{&Apache::lonnet::unescape($_)} |
{&Apache::lonnet::unescape($_)} |
Line 696 END
|
Line 716 END
|
|
|
if ($viewselect eq 'Detailed Citation View') { |
if ($viewselect eq 'Detailed Citation View') { |
$compiledresult.=&detailed_citation_view(@fields, |
$compiledresult.=&detailed_citation_view(@fields, |
$hostname,$httphost); |
$hostname,$httphost, |
|
$extrashow); |
} |
} |
elsif ($viewselect eq 'Summary View') { |
elsif ($viewselect eq 'Summary View') { |
$compiledresult.=&summary_view(@fields,$hostname,$httphost); |
$compiledresult.=&summary_view(@fields,$hostname,$httphost, |
|
$extrashow); |
} |
} |
elsif ($viewselect eq 'Fielded Format') { |
elsif ($viewselect eq 'Fielded Format') { |
$compiledresult.=&fielded_format_view(@fields,$hostname, |
$compiledresult.=&fielded_format_view(@fields,$hostname, |
$httphost); |
$httphost,$extrashow); |
} |
} |
elsif ($viewselect eq 'XML/SGML') { |
elsif ($viewselect eq 'XML/SGML') { |
$compiledresult.=&xml_sgml_view(@fields,$hostname,$httphost); |
$compiledresult.=&xml_sgml_view(@fields,$hostname,$httphost, |
|
$extrashow); |
} |
} |
|
|
} |
} |
Line 839 sub detailed_citation_view {
|
Line 862 sub detailed_citation_view {
|
my ($title,$author,$subject,$url,$keywords,$version, |
my ($title,$author,$subject,$url,$keywords,$version, |
$notes,$shortabstract,$mime,$lang, |
$notes,$shortabstract,$mime,$lang, |
$creationdate,$lastrevisiondate,$owner,$copyright, |
$creationdate,$lastrevisiondate,$owner,$copyright, |
$hostname,$httphost)=@_; |
$hostname,$httphost,$extrashow)=@_; |
my $result=<<END; |
my $result=<<END; |
<i>$owner</i>, last revised $lastrevisiondate |
<i>$owner</i>, last revised $lastrevisiondate |
<h3><A HREF="http://$httphost$url" TARGET='search_preview'>$title</A></h3> |
<h3><A HREF="http://$httphost$url" TARGET='search_preview'>$title</A></h3> |
Line 852 sub detailed_citation_view {
|
Line 875 sub detailed_citation_view {
|
<b>MIME Type:</b> $mimetag{$mime}<br> |
<b>MIME Type:</b> $mimetag{$mime}<br> |
<b>Language:</b> $language{$lang}<br> |
<b>Language:</b> $language{$lang}<br> |
<b>Copyright/Distribution:</b> $cprtag{$copyright}<br> |
<b>Copyright/Distribution:</b> $cprtag{$copyright}<br> |
|
$extrashow |
$shortabstract |
$shortabstract |
</p> |
</p> |
END |
END |
Line 863 sub summary_view {
|
Line 887 sub summary_view {
|
my ($title,$author,$subject,$url,$keywords,$version, |
my ($title,$author,$subject,$url,$keywords,$version, |
$notes,$shortabstract,$mime,$lang, |
$notes,$shortabstract,$mime,$lang, |
$creationdate,$lastrevisiondate,$owner,$copyright, |
$creationdate,$lastrevisiondate,$owner,$copyright, |
$hostname,$httphost)=@_; |
$hostname,$httphost,$extrashow)=@_; |
my $result=<<END; |
my $result=<<END; |
<a href="http://$httphost$url" TARGET='search_preview'>$author</a><br /> |
<a href="http://$httphost$url" TARGET='search_preview'>$author</a><br /> |
$title<br /> |
$title<br /> |
$owner -- $lastrevisiondate<br /> |
$owner -- $lastrevisiondate<br /> |
$cprtag{$copyright}<br /> |
$cprtag{$copyright}<br /> |
|
$extrashow |
</p> |
</p> |
END |
END |
return $result; |
return $result; |
Line 879 sub fielded_format_view {
|
Line 904 sub fielded_format_view {
|
my ($title,$author,$subject,$url,$keywords,$version, |
my ($title,$author,$subject,$url,$keywords,$version, |
$notes,$shortabstract,$mime,$lang, |
$notes,$shortabstract,$mime,$lang, |
$creationdate,$lastrevisiondate,$owner,$copyright, |
$creationdate,$lastrevisiondate,$owner,$copyright, |
$hostname,$httphost)=@_; |
$hostname,$httphost,$extrashow)=@_; |
my $result=<<END; |
my $result=<<END; |
<b>URL: </b> <A HREF="http://$httphost$url" TARGET='search_preview'>$url</A> |
<b>URL: </b> <A HREF="http://$httphost$url" TARGET='search_preview'>$url</A> |
<br /> |
<br /> |
Line 896 sub fielded_format_view {
|
Line 921 sub fielded_format_view {
|
<b>Copyright/Distribution:</b> $cprtag{$copyright}<br /> |
<b>Copyright/Distribution:</b> $cprtag{$copyright}<br /> |
<b>Repository Location:</b> $hostname<br /> |
<b>Repository Location:</b> $hostname<br /> |
<b>Abstract:</b> $shortabstract<br /> |
<b>Abstract:</b> $shortabstract<br /> |
|
$extrashow |
</p> |
</p> |
END |
END |
return $result; |
return $result; |
Line 906 sub xml_sgml_view {
|
Line 932 sub xml_sgml_view {
|
my ($title,$author,$subject,$url,$keywords,$version, |
my ($title,$author,$subject,$url,$keywords,$version, |
$notes,$shortabstract,$mime,$lang, |
$notes,$shortabstract,$mime,$lang, |
$creationdate,$lastrevisiondate,$owner,$copyright, |
$creationdate,$lastrevisiondate,$owner,$copyright, |
$hostname,$httphost)=@_; |
$hostname,$httphost,$extrashow)=@_; |
my $result=<<END; |
my $result=<<END; |
<pre> |
<pre> |
<LonCapaResource> |
<LonCapaResource> |
Line 935 sub xml_sgml_view {
|
Line 961 sub xml_sgml_view {
|
<shortabstract>$shortabstract</shortabstract> |
<shortabstract>$shortabstract</shortabstract> |
</LonCapaResource> |
</LonCapaResource> |
</pre> |
</pre> |
|
$extrashow |
END |
END |
return $result; |
return $result; |
} |
} |