--- loncom/interface/lonsearchcat.pm 2006/02/08 21:17:58 1.254
+++ loncom/interface/lonsearchcat.pm 2006/03/06 18:23:10 1.255
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Search Catalog
#
-# $Id: lonsearchcat.pm,v 1.254 2006/02/08 21:17:58 www Exp $
+# $Id: lonsearchcat.pm,v 1.255 2006/03/06 18:23:10 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -77,6 +77,7 @@ use LONCAPA::lonmetadata();
use HTML::Entities();
use Parse::RecDescent;
use Apache::lonnavmaps;
+use Apache::lonindexer();
######################################################################
######################################################################
@@ -93,7 +94,9 @@ my %persistent_db; # gdbm hash which h
# The different view modes and associated functions
my %Views = ("detailed" => \&detailed_citation_view,
+ "detailedpreview" => \&detailed_citation_preview,
"summary" => \&summary_view,
+ "summarypreview" => \&summary_preview,
"fielded" => \&fielded_format_view,
"xml" => \&xml_sgml_view,
"compact" => \&compact_view);
@@ -1080,7 +1083,9 @@ sub viewoptiontext {
'xml' => 'XML/SGML',
'compact' => 'Compact View',
'fielded' => 'Fielded Format',
- 'summary' => 'Summary View');
+ 'summary' => 'Summary View',
+ 'summarypreview' => 'Summary Preview',
+ 'detailedpreview' => 'Detailed Citation Preview');
return $desc{$code};
}
@@ -3333,6 +3338,16 @@ sub detailed_citation_view {
return $result;
}
+sub detailed_citation_preview {
+ my ($prefix,%values)=@_;
+ return '
'.
+ &detailed_citation_view($prefix,%values).
+ ' | '.
+ &Apache::lonindexer::showpreview($values{'url'}).
+ ' |
';
+}
+
+
######################################################################
######################################################################
@@ -3374,6 +3389,15 @@ END
return $result;
}
+sub summary_preview {
+ my ($prefix,%values)=@_;
+ return ''.
+ &summary_view($prefix,%values).
+ ' | '.
+ &Apache::lonindexer::showpreview($values{'url'}).
+ ' |
';
+}
+
######################################################################
######################################################################