c577c50aa4b2280dddf3646b8d1cb2e6c9824bac
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-opensearch.tt
1 <?xml version='1.0' encoding='utf-8'  ?>
2 [% USE Koha %]
3 [% IF ( opensearchdescription ) %]
4 <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
5    <ShortName>[% LibraryName | html %] Search</ShortName>
6    <Description>Search the [% LibraryName | html %]</Description>
7    <Tags>koha opac [% LibraryName | html %]</Tags>
8    <Contact>[% KohaAdminEmailAddress | html %]</Contact>
9    <Url type="application/rss+xml"
10         template="[% OPACBaseURL | html %]/cgi-bin/koha/opac-search.pl?q={searchTerms}&amp;pw={startPage?}&amp;format=rss2"/>
11 </OpenSearchDescription>
12
13 [% ELSE %]
14
15 [% IF ( rss2 ) %]
16 <rss version="2.0"
17       xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"
18       xmlns:dc="http://purl.org/dc/elements/1.1/"
19       xmlns:atom="http://www.w3.org/2005/Atom">
20    <channel>
21      <title><![CDATA[[% LibraryName | html %] Search [% IF ( query_desc ) %]for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %]]]></title>
22      <link>[% OPACBaseURL | html %]/cgi-bin/koha/opac-search.pl?[% query_cgi | html %][% limit_cgi | html %]&amp;format=rss2</link>
23      <atom:link rel="self" type="application/rss+xml" href="[% OPACBaseURL | html %]/cgi-bin/koha/opac-search.pl?[% query_cgi |uri %][% limit_cgi |uri %]&amp;sort_by=[% sort_by | uri %]&amp;format=rss2"/>
24      <description><![CDATA[ Search results [% IF ( query_desc ) %]for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %] at [% LibraryName | html %]]]></description>
25      <opensearch:totalResults>[% total | html %]</opensearch:totalResults>
26      <opensearch:startIndex>[% offset | html %]</opensearch:startIndex>
27      [% IF ( results_per_page ) %]
28        <opensearch:itemsPerPage>[% results_per_page | html %]</opensearch:itemsPerPage>
29      [% ELSE %]
30        <opensearch:itemsPerPage>20</opensearch:itemsPerPage>
31      [% END %]
32          [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
33      <atom:link rel="search" type="application/opensearchdescription+xml" href="[% OPACBaseURL | html %]/cgi-bin/koha/opac-search.pl?[% SEARCH_RESULT.query_cgi |uri %][% SEARCH_RESULT.limit_cgi |uri %]&amp;sort_by=[% SEARCH_RESULT.sort_by |uri %]&amp;format=opensearchdescription"/>
34      <opensearch:Query role="request" searchTerms="[% SEARCH_RESULT.query_desc |uri %][% SEARCH_RESULT.limit_desc |uri %]" startPage="[% SEARCH_RESULT.page | html %]" />
35      <item>
36        <title>[% SEARCH_RESULT.title | html %] [% FOREACH subtitl IN SEARCH_RESULT.subtitle %], [% subtitl.subfield | html %][% END %]</title>
37        <dc:identifier>ISBN [% SEARCH_RESULT.isbn | html %]</dc:identifier>
38        <link>[% IF ( SEARCH_RESULT.BiblioDefaultViewmarc ) %][% OPACBaseURL | html %]/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | html %][% ELSE %][% IF ( SEARCH_RESULT.BiblioDefaultViewisbd ) %][% OPACBaseURL | html %]/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | html %][% ELSE %][% OPACBaseURL | html %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | html %][% END %][% END %]</link>
39        <description><![CDATA[
40 [% IF ( OPACAmazonCoverImages ) %][% IF ( SEARCH_RESULT.normalized_isbn ) %]<img src="https://images-na.ssl-images-amazon.com/images/P/[% SEARCH_RESULT.normalized_isbn | html %].01.TZZZZZZZ.jpg" alt="" />[% END %][% END %]
41 [% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsCoverImages ) %][% IF ( SEARCH_RESULT.content_identifier_exists ) %]<img src="http://www.syndetics.com/index.aspx?isbn=[% SEARCH_RESULT.normalized_isbn | html %]/SC.GIF&amp;client=[% SEARCH_RESULT.SyndeticsClientCode | html %]&amp;type=xw10[% IF ( SEARCH_RESULT.normalized_upc ) %]&amp;upc=[% SEARCH_RESULT.normalized_upc | html %][% END %][% IF ( SEARCH_RESULT.normalized_oclc ) %]&amp;oclc=[% SEARCH_RESULT.normalized_oclc | html %][% END %]" alt="" />
42 [% ELSE %]
43 <img src="http://www.syndetics.com/index.aspx?isbn=[% SEARCH_RESULT.normalized_isbn | html %]/SC.GIF&amp;client=[% SyndeticsClientCode | html %]&amp;type=xw10&amp;upc=[% SEARCH_RESULT.normalized_upc | html %]&amp;oclc=[% SEARCH_RESULT.normalized_oclc | html %]" alt="" />
44 [% END %][% END %][% END %]
45
46 [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) | html %]
47 [% IF ( BakerTaylorEnabled ) %][% IF bt_id %]<a href="https://[% BakerTaylorBookstoreURL |url %][% bt_id | html %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL |url %][% bt_id | html %]" /></a>[% END %][% END %]
48            <p>[% IF ( SEARCH_RESULT.author ) %]By [% SEARCH_RESULT.author | html %]. [% END %]
49            [% IF ( SEARCH_RESULT.place ) %][% SEARCH_RESULT.place | html %] [% END %][% IF ( SEARCH_RESULT.publishercode ) %][% SEARCH_RESULT.publishercode | html %][% END %][% IF ( SEARCH_RESULT.publicationyear ) %] [% SEARCH_RESULT.publicationyear | html %]
50                     [% ELSE %][% IF ( SEARCH_RESULT.copyrightdate ) %] [% SEARCH_RESULT.copyrightdate | html %][% END %][% END %]
51                         [% IF ( SEARCH_RESULT.pages ) %]. [% SEARCH_RESULT.pages | html %][% END %]
52                         [% IF ( SEARCH_RESULT.notes ) %], [% SEARCH_RESULT.notes | html %][% END %]
53                         [% IF ( SEARCH_RESULT.size ) %] [% SEARCH_RESULT.size | html %]. [% END %]
54                         [% IF ( SEARCH_RESULT.isbn ) %] [% SEARCH_RESULT.isbn | html %][% END %]
55        </p>
56 [% IF Koha.Preference( 'RequestOnOpac' ) == 1 %]
57 <p><a href="[% OPACBaseURL | html %]/cgi-bin/koha/opac-reserve.pl?biblionumber=[% SEARCH_RESULT.biblionumber | html %]">Place Hold on <i>[% SEARCH_RESULT.title | html %]</i></a></p>
58 [% END %]
59                                                 ]]></description>
60        <guid>[% OPACBaseURL | html %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | html %]</guid>
61      </item>
62          [% END %]
63    </channel>
64 </rss>
65 [% END %]
66
67 [% IF ( atom ) %]
68 <feed xmlns="http://www.w3.org/2005/Atom"
69        xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
70    <id>[% OPACBaseURL | html %]/cgi-bin/koha/opac-search.pl?[% query_cgi | html %][% limit_cgi | html %]&amp;format=atom</id>
71    <title>[% LibraryName | html %] Search [% IF ( query_desc ) %]for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %]&nbsp;with limit(s):&nbsp;'[% limit_desc | html %]'[% END %]</title>
72     <link href="[% OPACBaseURL | html %]/cgi-bin/koha/opac-search.pl?[% query_cgi |uri %][% limit_cgi |uri %]&amp;format=rss2"/>
73    <updated>[% timestamp | html %]</updated>
74    <author>
75      <name>[% LibraryName | html %]</name>
76    </author>
77    <!-- <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id> -->
78    <opensearch:totalResults>[% total | html %]</opensearch:totalResults>
79    <opensearch:startIndex>[% page | html %]</opensearch:startIndex>
80    [% IF ( results_per_page ) %]
81      <opensearch:itemsPerPage>[% results_per_page | html %]</opensearch:itemsPerPage>
82    [% ELSE %]
83      <opensearch:itemsPerPage>20</opensearch:itemsPerPage>
84    [% END %]
85    <opensearch:Query role="request" searchTerms="[% query_desc | html %] [% limit_desc | html %]" startPage="[% page | html %]" />
86    <link rel="alternate" href="[% OPACBaseURL | html %]/cgi-bin/koha/opac-search.pl?[% query_cgi | html %][% limit_cgi | html %]pw=[% page | html %]&amp;format=atom" type="application/atom+xml"/>
87    <link rel="self" href="[% OPACBaseURL | html %]/cgi-bin/koha/opac-search.pl?[% query_cgi | html %][% limit_cgi | html %]&amp;format=atom" type="application/atom+xml"/>
88    <link rel="first" href="[% OPACBaseURL | html %]/cgi-bin/koha/opac-search.pl?[% query_cgi | html %][% limit_cgi | html %]pw=1&amp;format=atom" type="application/atom+xml"/>
89    <link rel="previous" href="[% OPACBaseURL | html %]/cgi-bin/koha/opac-search.pl?[% query_cgi | html %][% limit_cgi | html %]pw=2&amp;format=atom" type="application/atom+xml"/>
90    <link rel="next" href="[% OPACBaseURL | html %]/cgi-bin/koha/opac-search.pl?[% query_cgi | html %][% limit_cgi | html %]pw=4&amp;format=atom" type="application/atom+xml"/>
91    <link rel="last" href="[% OPACBaseURL | html %]/cgi-bin/koha/opac-search.pl?[% query_cgi | html %][% limit_cgi | html %]pw=42299&amp;format=atom" type="application/atom+xml"/>
92    <link rel="search" type="application/opensearchdescription+xml" href="[% OPACBaseURL | html %]/cgi-bin/koha/opac-search.pl?format=opensearchdescription"/>
93
94    [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
95    <entry>
96      <title>[% SEARCH_RESULT.title | html %]</title>
97      <link href="[% OPACBaseURL | html %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | html %]"/>
98      <!-- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id> -->
99      <updated>[% SEARCH_RESULT.timestamp | html %]</updated>
100      <content type="text"><!-- put content here -->
101      </content>
102      <id>[% OPACBaseURL | html %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | html %]</id>
103    </entry>
104    [% END %]
105  </feed>
106 [% END %]
107
108 [% END %]