4 j = ws.bootstrap_client("/pines/conf/bootstrap.conf");
9 IF CGI.param('pagesize');
10 pagesize = CGI.param('pagesize');
13 itempage = CGI.param('page');
15 #type,string,location,depth
16 count_meth = 'open-ils.search.biblio.class.count';
18 #type,string,location,depth,limit,offset
19 search_meth = 'open-ils.search.biblio.class';
21 session = ws.init_app_session('open-ils.search');
23 type = CGI.param('mr_search_type');
24 string = CGI.param('mr_search_query');
25 location = CGI.param('mr_search_location');
26 depth = CGI.param('mr_search_depth');
28 offset = ((itempage - 1) * pagesize) - 1;
34 count_req = session.request(count_meth, type, string, location, depth);
35 id_req = session.request(search_meth, type, string, location, depth, limit, offset);
37 j = count_req.wait_complete();
38 count = count_req.recv().content();
41 j = id_req.wait_complete();
42 list = id_req.recv().content();
49 <rss version="2.0" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">
51 <title>Pines Catalogue Search: [% string | html %] </title>
52 <link>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 %]</link>
53 <description>Search results for "[% string | html %]" at gapines.org</description>
54 <language>en-us</language>
55 <copyright>&copy;2004-2005, Georga Public Library Service.</copyright>
56 <openSearch:totalResults>[% count %]</openSearch:totalResults>
57 <openSearch:startIndex>[% offset + 1 %]</openSearch:startIndex>
58 <openSearch:itemsPerPage>[% pagesize %]</openSearch:itemsPerPage>
63 FOREACH mr_id IN mr_list;
64 req = session.request('open-ils.search.biblio.metarecord.mods_slim.retrieve', mr_id.0);
65 j = req.wait_complete();
71 rank = mr_id.1 / max_rank;
73 rank = rank.split('\.').0;
75 mods = req.recv().content();
80 <title>[% mods.title() | html %]</title>
81 <link>http://gapines.org/opac/?sub_frame=1&target=record_result&page=0&mrid=[% mr_id.0 %]&hits_per_page=10</link>
82 <rank>[% rank %]</rank>
87 <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>
92 <b>Subjects:</b>
94 FOREACH sub IN mods.subject();
102 -%]<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>[%-
108 <b>Copies Available:</b> [% mr_id.2 %]