Bug 29180: Rename syspref RequestOnOpac with OPACHoldRequests
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-opensearch.tt
1 <?xml version='1.0' encoding='utf-8' ?>
2 [%- USE raw -%]
3 [%- USE Koha -%]
4
5 [% IF ( opensearchdescription ) %]
6     <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
7         <ShortName>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Library catalog[% END %]</ShortName>
8         <Description>Search the [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha library[% END %] catalog</Description>
9         <InputEncoding>UTF-8</InputEncoding>
10         <Image width="16" height="16" type="image/x-icon">
11             [% IF ( Koha.Preference('OpacFavicon') ) %]
12                 [% Koha.Preference('OpacFavicon') | url %]
13             [% ELSE %]
14                 [% Koha.Preference('OPACBaseURL') | url %][% interface | url %]/[% theme | url %]/images/favicon.ico
15             [% END %]
16         </Image>
17         <Url method="get" type="text/html" template="[% Koha.Preference('OPACBaseURL') | url %]/cgi-bin/koha/opac-search.pl?q={searchTerms}" />
18         <Query role="example" searchTerms="cat" />
19     </OpenSearchDescription>
20 [% ELSE %]
21
22 [% IF ( rss ) %]
23 <rss version="2.0"
24       xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"
25       xmlns:dc="http://purl.org/dc/elements/1.1/"
26       xmlns:atom="http://www.w3.org/2005/Atom">
27    <channel>
28      <title><![CDATA[[% LibraryName | html %] Search [% IF ( query_desc ) %]for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %]]]></title>
29      <link>[% OPACBaseURL | html %]/cgi-bin/koha/opac-search.pl?[% query_cgi | html %][% limit_cgi | html %]&amp;format=rss</link>
30      <atom:link rel="self" type="application/rss+xml" href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | html %][% limit_cgi | html %]&amp;sort_by=[% sort_by | uri %]&amp;format=atom"/>
31      <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>
32      <opensearch:totalResults>[% total | html %]</opensearch:totalResults>
33      <opensearch:startIndex>[% offset | html %]</opensearch:startIndex>
34      [% IF ( results_per_page ) %]
35        <opensearch:itemsPerPage>[% results_per_page | html %]</opensearch:itemsPerPage>
36      [% ELSE %]
37        <opensearch:itemsPerPage>20</opensearch:itemsPerPage>
38      [% END %]
39          [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
40      <atom:link rel="search" type="application/opensearchdescription+xml" href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% SEARCH_RESULT.query_cgi | $raw %][% SEARCH_RESULT.limit_cgi | $raw %]&amp;sort_by=[% SEARCH_RESULT.sort_by |uri %]&amp;format=opensearchdescription"/>
41      <opensearch:Query role="request" searchTerms="[% SEARCH_RESULT.query_desc |uri %][% SEARCH_RESULT.limit_desc |uri %]" startPage="[% SEARCH_RESULT.page | html %]" />
42      <item>
43        <title>[% INCLUDE 'biblio-title-head.inc' biblio=SEARCH_RESULT %]</title>
44        <dc:identifier>ISBN:[% SEARCH_RESULT.isbn | html %]</dc:identifier>
45         [% IF ( SEARCH_RESULT.BiblioDefaultViewmarc ) %]
46         <link>[% OPACBaseURL | url %]/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]</link>
47         [% ELSIF ( SEARCH_RESULT.BiblioDefaultViewisbd ) %]
48         <link>[% OPACBaseURL | url %]/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]</link>
49         [% ELSE %]
50         <link>[% OPACBaseURL | url %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]</link>
51         [% END %]
52        <description><![CDATA[
53 [% IF ( OPACAmazonCoverImages ) %][% IF ( SEARCH_RESULT.normalized_isbn ) %]<img src="https://images-na.ssl-images-amazon.com/images/P/[% SEARCH_RESULT.normalized_isbn | uri %].01.TZZZZZZZ.jpg" alt="" />[% END %][% END %]
54 [% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsCoverImages ) %][% IF ( SEARCH_RESULT.content_identifier_exists ) %]<img src="http://www.syndetics.com/index.aspx?isbn=[% SEARCH_RESULT.normalized_isbn | uri %]/SC.GIF&amp;client=[% SEARCH_RESULT.SyndeticsClientCode | uri %]&amp;type=xw10[% IF ( SEARCH_RESULT.normalized_upc ) %]&amp;upc=[% SEARCH_RESULT.normalized_upc | uri %][% END %][% IF ( SEARCH_RESULT.normalized_oclc ) %]&amp;oclc=[% SEARCH_RESULT.normalized_oclc | uri %][% END %]" alt="" />
55
56 [% ELSE %]
57 <img src="http://www.syndetics.com/index.aspx?isbn=[% SEARCH_RESULT.normalized_isbn | uri %]/SC.GIF&amp;client=[% SyndeticsClientCode | uri %]&amp;type=xw10&amp;upc=[% SEARCH_RESULT.normalized_upc | uri %]&amp;oclc=[% SEARCH_RESULT.normalized_oclc | uri %]" alt="" />
58 [% END %][% END %][% END %]
59
60 [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
61 [% IF ( BakerTaylorEnabled ) %][% IF bt_id %]<a href="https://[% BakerTaylorBookstoreURL |url %][% bt_id | uri %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL |url %][% bt_id | uri %]" /></a>[% END %][% END %]
62
63 [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
64     [% SET custom_cover_image_url = SEARCH_RESULT.biblio_object.custom_cover_image_url %]
65     [% IF custom_cover_image_url %]
66         <img alt="Cover image" src="[% custom_cover_image_url | url %]" />
67     [% END %]
68 [% END %]
69
70            <p>[% IF ( SEARCH_RESULT.author ) %]By [% SEARCH_RESULT.author | html %]. [% END %]
71            [% 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 %]
72                     [% ELSE %][% IF ( SEARCH_RESULT.copyrightdate ) %] [% SEARCH_RESULT.copyrightdate | html %][% END %][% END %]
73                         [% IF ( SEARCH_RESULT.pages ) %]. [% SEARCH_RESULT.pages | html %][% END %]
74                         [% IF ( SEARCH_RESULT.notes ) %], [% SEARCH_RESULT.notes | html %][% END %]
75                         [% IF ( SEARCH_RESULT.size ) %] [% SEARCH_RESULT.size | html %]. [% END %]
76                         [% IF ( SEARCH_RESULT.isbn ) %] [% SEARCH_RESULT.isbn | html %][% END %]
77        </p>
78 [% IF Koha.Preference( 'OPACHoldRequests' ) == 1 %]
79 <p><a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-reserve.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]">Place hold on <em>[% SEARCH_RESULT.title | html %]</em></a></p>
80 [% END %]
81                                                 ]]></description>
82        <guid>[% OPACBaseURL | url %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]</guid>
83      </item>
84          [% END %]
85    </channel>
86 </rss>
87 [% END %]
88
89 [% IF ( atom ) %]
90 <feed xmlns="http://www.w3.org/2005/Atom"
91        xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
92    <id>[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | html %][% limit_cgi | html %]&amp;format=atom</id>
93    <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>
94     <link href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | html %][% limit_cgi | html %]&amp;format=rss"/>
95    <updated>[% timestamp | html %]</updated>
96    <author>
97      <name>[% LibraryName | html %]</name>
98    </author>
99    <!-- <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id> -->
100    <opensearch:totalResults>[% total | html %]</opensearch:totalResults>
101    <opensearch:startIndex>[% page | html %]</opensearch:startIndex>
102    [% IF ( results_per_page ) %]
103      <opensearch:itemsPerPage>[% results_per_page | html %]</opensearch:itemsPerPage>
104    [% ELSE %]
105      <opensearch:itemsPerPage>20</opensearch:itemsPerPage>
106    [% END %]
107    <opensearch:Query role="request" searchTerms="[% SEARCH_RESULT.query_desc | uri %] [% SEARCH_RESULT.limit_desc | uri %]" startPage="[% page | html %]" />
108    <link rel="alternate" href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% SEARCH_RESULT.query_cgi | $raw %][% SEARCH_RESULT.limit_cgi | $raw %]pw=[% page | uri %]&amp;format=atom" type="application/atom+xml"/>
109    <link rel="self" href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% SEARCH_RESULT.query_cgi | $raw %][% SEARCH_RESULT.limit_cgi | $raw %]&amp;format=atom" type="application/atom+xml"/>
110    <link rel="first" href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% SEARCH_RESULT.query_cgi | $raw  %][% SEARCH_RESULT.limit_cgi | $raw %]pw=1&amp;format=atom" type="application/atom+xml"/>
111    <link rel="previous" href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% SEARCH_RESULT.query_cgi | $raw %][% SEARCH_RESULT.limit_cgi | $raw %]pw=2&amp;format=atom" type="application/atom+xml"/>
112    <link rel="next" href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% SEARCH_RESULT.query_cgi | $raw %][% SEARCH_RESULT.limit_cgi | $raw %]pw=4&amp;format=atom" type="application/atom+xml"/>
113    <link rel="last" href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% SEARCH_RESULT.query_cgi | $raw %][% SEARCH_RESULT.limit_cgi | $raw %]pw=42299&amp;format=atom" type="application/atom+xml"/>
114    <link rel="search" type="application/opensearchdescription+xml" href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?format=opensearchdescription"/>
115
116    [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
117    <entry>
118      <title>[% SEARCH_RESULT.title | html %] [% FOREACH subtitl IN SEARCH_RESULT.subtitle %], [% subtitl.subfield | html %][% END %]</title>
119      <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>
120      <!-- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id> -->
121      <updated>[% SEARCH_RESULT.timestamp | html %]</updated>
122      <id>[% OPACBaseURL | html %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | html %]</id>
123      <content type="text">
124
125      </content>
126    </entry>
127    [% END %]
128  </feed>
129 [% END %]
130
131 [% END %]