From 97946708bd48cdfa07430b0e9342de2d081fb3c8 Mon Sep 17 00:00:00 2001 From: erickson Date: Thu, 9 Jun 2005 18:24:50 +0000 Subject: [PATCH] mike stuff + fieldmapper for web stuff git-svn-id: svn://svn.open-ils.org/ILS/trunk@794 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/extras/fieldmapper.pl | 3 +- Open-ILS/src/extras/opensearch.ttk | 58 +++++++++++++++++++----------- 2 files changed, 39 insertions(+), 22 deletions(-) diff --git a/Open-ILS/src/extras/fieldmapper.pl b/Open-ILS/src/extras/fieldmapper.pl index 549b0f8755..ab75f5e894 100755 --- a/Open-ILS/src/extras/fieldmapper.pl +++ b/Open-ILS/src/extras/fieldmapper.pl @@ -8,7 +8,8 @@ my $map = $Fieldmapper::fieldmap; # if a true value is provided, we generate the web (light) version of the fieldmapper my $web = $ARGV[0]; # List of classes needed by the opac -my @web_hints = ("ex", "mvr", "au", "aou","aout", "asv", "asva", "asvr", "asvq"); +my @web_hints = ("ex", "mvr", "au", "aou", + "aout", "asv", "asva", "asvr", "asvq", "circ", "acp"); print < rank_threshold; - search_meth = 'open-ils.search.biblio.class.unordered'; -END; - -req = session.request(search_meth, type, string, location, depth, limit, offset); -j = req.wait_complete(); +j = id_req.wait_complete(); +list = id_req.recv().content(); +j = id_req.finish; -list = req.recv().content(); -j = req.finish; +max_rank = 0; -%] - Pines Catalogue Search: [% string %] - http://http://gapines.org/opensearch/?target=mr_result&mr_search_type=[% type %]&mr_search_query=[% string %]&page=[% itempage %]&mr_search_depth=[% depth %]&mr_search_location=[% location %] - Search results for "[% string %]" at gapines.org + Pines Catalogue Search: [% string | html %] + http://http://gapines.org/opensearch/?target=mr_result&mr_search_type=[% type %]&mr_search_query=[% string | uri | html %]&page=[% itempage %]&mr_search_depth=[% depth %]&mr_search_location=[% location %] + Search results for "[% string | html %]" at gapines.org en-us &copy;2004-2005, Georga Public Library Service. [% count %] @@ -67,29 +64,48 @@ FOREACH mr_id IN mr_list; req = session.request('open-ils.search.biblio.metarecord.mods_slim.retrieve', mr_id.0); j = req.wait_complete(); + IF max_rank == 0; + max_rank = mr_id.1; + END; + + rank = mr_id.1 / max_rank; + rank = rank * 100; + rank = rank.split('\.').0; + mods = req.recv().content(); j = req.finish; -%] - [% mods.title() %] - http://gapines.org/opac/?target=record_result&page=0&mrid=[% mr_id.0 %]&hits_per_page=10 + [% mods.title() | html %] + http://gapines.org/opac/?sub_frame=1&target=record_result&page=0&mrid=[% mr_id.0 %]&hits_per_page=10 + [% rank %] - <b>Author:</b> <a href="http://http://gapines.org/opensearch/?target=mr_result&mr_search_type=author&mr_search_query=[% mods.author() %]&page=1&mr_search_depth=[% depth %]&mr_search_location=[% location %]">[% mods.author() %]</a><br> +[%- + IF mods.author(); +-%] + <b>Author:</b> <a href="http://gapines.org/opac/?sub_frame=1&target=mr_result&mr_search_type=author&mr_search_query=[% mods.author() | uri | html %]&page=0&mr_search_depth=[% depth %]&mr_search_location=[% location %]">[% mods.author() | html %]</a><br> +[%- + END; + IF mods.subject(); +-%] <b>Subjects:</b> [%- FOREACH sub IN mods.subject(); - IF loop.count() > 5; + IF loop.count() > 3; ', ...'; LAST; END; IF loop.index; ', '; END; - -%]<a href="http://http://gapines.org/opensearch/?target=mr_result&mr_search_type=subject&mr_search_query=[% sub.list.0 %]&page=1&mr_search_depth=[% depth %]&mr_search_location=[% location %]">[% sub.list.0 %]</a>[%- + -%]<a href="http://gapines.org/opac/?sub_frame=1&target=mr_result&mr_search_type=subject&mr_search_query=[% sub.list.0 | uri | html %]&page=0&mr_search_depth=[% depth %]&mr_search_location=[% location %]">[% sub.list.0 | html %]</a>[%- END; -%]<br> - <b>Available:</b> [% mr_id.2 %] +[%- + END; +-%] + <b>Copies Available:</b> [% mr_id.2 %] [%- -- 2.43.2