Bug 21850: (follow-up) Add query information in title attribute
[srvgit] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-results.tt
index 1d3742d..e35af15 100644 (file)
@@ -3,11 +3,17 @@
 [% USE Koha %]
 [% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsShowOnList ) %]
 [% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsInputOnList ) %]
+[% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %]
+[% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %]
 
 [% INCLUDE 'doc-head-open.inc' %]
 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog &rsaquo;
 [% IF ( searchdesc ) %]
-    Results of search [% IF ( query_desc ) %]for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %]&nbsp;with limit(s):&nbsp;'[% limit_desc | html %]'[% END %]
+    [% IF ( ms_value ) %]
+        Results of search for '[% ms_value | html %]'
+    [% ELSE %]
+        Search results
+    [% END %]
 [% ELSE %]
     You did not specify any search criteria.
 [% END %]</title>
@@ -18,7 +24,7 @@
     [% END %]
 [% END %]
 
-<link rel="alternate" type="application/rss+xml" title="[% LibraryName | html %] Search RSS feed" href="[% OPACBaseURL | html %]/cgi-bin/koha/opac-search.pl?[% query_cgi | url %][% limit_cgi |uri %]&amp;count=[% countrss |uri %]&amp;sort_by=acqdate_dsc&amp;format=rss2" />
+<link rel="alternate" type="application/rss+xml" title="[% LibraryName | html %] Search RSS feed" href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;count=[% countrss |uri %]&amp;sort_by=acqdate_dsc&amp;format=rss2" />
 </head>
 
 [% INCLUDE 'bodytag.inc' bodyid='results' bodyclass='scrollto' %]
     <div class="main">
         <ul class="breadcrumb">
             <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
-            <li>
                 [% IF ( searchdesc ) %]
-                    <a href="#">Results of search [% IF ( query_desc ) %]for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %]&nbsp;with limit(s):&nbsp;'[% limit_desc | html %]'[% END %]</a>
+                    [% IF ( ReturnPath ) %]
+                        <li>
+                            <a href="[% ReturnPath | url %]">Advanced search</a> <span class="divider">&rsaquo;</span>
+                        </li>
+                    [% END %]
+                    <li>
+                        [% IF ( ms_value ) %]
+                            <a href="#" title="You searched [% IF ( query_desc ) %] for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %]">Results of search for '[% ms_value | html %]'</a>
+                        [% ELSE %]
+                            <a href="#" title="You searched [% IF ( query_desc ) %] for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %]">Search results</a>
+                        [% END %]
+                    </li>
                 [% ELSE %]
-                    <a href="#">You did not specify any search criteria</a>
+                    <li>
+                        <a href="#">You did not specify any search criteria</a>
+                    </li>
                 [% END %]
-            </li>
         </ul>
 
         [% UNLESS ( total ) %]
                         <strong>No results found!</strong>
                         <p>
                             [% IF ( searchdesc ) %]
-                                No results found for that in [% LibraryName | html %] catalog. <a href="[% OPACBaseURL | html %]/cgi-bin/koha/opac-search.pl?[% query_cgi | url %][% limit_cgi | html | url %]&amp;format=rss2" class="rsssearchlink noprint"><img src="[% interface | html %]/[% theme | html %]/images/feed-icon-16x16.png" alt="Subscribe to this search" title="Subscribe to this search" border="0" class="rsssearchicon"/></a>
+                                No results found for that in [% LibraryName | html %] catalog. <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;format=rss2" class="rsssearchlink noprint"><img src="[% interface | html %]/[% theme | html %]/images/feed-icon-16x16.png" alt="Subscribe to this search" title="Subscribe to this search" border="0" class="rsssearchicon"/></a>
                             [% ELSE %]
                                 You did not specify any search criteria.
                             [% END %]
                         </p>
                         [% IF ( ReturnPath ) %]
                            <div class="returntosearch">
-                                <p><a href="[% ReturnPath | html %]">Return to the last advanced search</a></p>
+                                <p><a href="[% ReturnPath | url %]">Return to the last advanced search</a></p>
                             </div>
                         [% END %]
                         [% IF ( OPACNoResultsFound ) %]
                                 [% END %]
                             ).
                         [% END %]
-                        <a href="[% OPACBaseURL | html %]/cgi-bin/koha/opac-search.pl?[% query_cgi | url %][% limit_cgi |html | url %]&amp;count=[% countrss | html %]&amp;sort_by=acqdate_dsc&amp;format=rss2" class="rsssearchlink noprint"><img src="[% interface | html %]/[% theme | html %]/images/feed-icon-16x16.png" alt="Subscribe to this search" title="Subscribe to this search" class="rsssearchicon"/></a>
+                        <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;count=[% countrss | uri %]&amp;sort_by=acqdate_dsc&amp;format=rss2" class="rsssearchlink noprint"><img src="[% interface | html %]/[% theme | html %]/images/feed-icon-16x16.png" alt="Subscribe to this search" title="Subscribe to this search" class="rsssearchicon"/></a>
                     [% END # / IF total %]
                     </p>
                 [% END # / IF searchdesc %]
                         <ul style="list-style: none;">
                             [% FOREACH SPELL_SUGGES IN SPELL_SUGGEST %]
                             <li>
-                                <a href="/cgi-bin/koha/opac-search.pl?q=[% SPELL_SUGGES.spsuggestion | html %]">[% SPELL_SUGGES.spsuggestion | html %]</a>
+                                <a href="/cgi-bin/koha/opac-search.pl?q=[% SPELL_SUGGES.spsuggestion | uri %]">[% SPELL_SUGGES.spsuggestion | html %]</a>
                             </li>
                             [% END %]
                         </ul>
                     [% IF ( total ) %]
                         [% IF ( ReturnPath ) %]
                             <div class="returntosearch">
-                                <p><a href="[% ReturnPath | html %]">Return to the last advanced search</a></p>
+                                <p><a href="[% ReturnPath | url %]">Return to the last advanced search</a></p>
                             </div>
                         [% END %]
                     [% END %]
                                                         [% IF ( OPACLocalCoverImages ) %]
                                                             <span title="[% SEARCH_RESULT.biblionumber |url %]" class="[% SEARCH_RESULT.biblionumber | html %]" id="local-thumbnail[% loop.count | html %]"></span>
                                                         [% END %]
+
+                                                        [% IF ( AdlibrisEnabled && SEARCH_RESULT.normalized_isbn ) %]
+                                                            <span title="[% SEARCH_RESULT.biblionumber | html %]" id="adlibris-thumbnail[% loop.count | html %]">
+                                                                <img src="[% AdlibrisURL | html %]?isbn=[% SEARCH_RESULT.normalized_isbn | html %]"
+                                                                     alt="Adlibris thumbnail for ISBN: [% SEARCH_RESULT.normalized_isbn | html %]" class="adlibris-cover" />
+                                                            </span>
+                                                        [% END %]
                                                         [% IF ( OPACAmazonCoverImages ) %]
                                                             [% IF ( SEARCH_RESULT.normalized_isbn ) %]
                                                                     <span title="[% SEARCH_RESULT.biblionumber | html %]" id="amazon-thumbnail[% loop.count | html %]"><img src="https://images-na.ssl-images-amazon.com/images/P/[% SEARCH_RESULT.normalized_isbn | html %].01.TZZZZZZZ.jpg" alt="" class="item-thumbnail" /></span>
                                                         [% END %]
 
                                                         [% IF ( Koha.Preference('Coce') && Koha.Preference('CoceProviders') ) %]
-                                                          [% coce_id = SEARCH_RESULT.normalized_ean || SEARCH_RESULT.normalized_isbn | html %]
+                                                          [% coce_id = SEARCH_RESULT.normalized_ean || SEARCH_RESULT.normalized_isbn %]
                                                           [% IF ( coce_id ) %]
                                                             <span title="[% SEARCH_RESULT.biblionumber |url %]" class="[% coce_id | html %]" id="coce-thumbnail[% loop.count | html %]"></span>
                                                           [% ELSE %]
                                                         [% END %]
 
                                                         [% IF ( BakerTaylorEnabled && !BakerTaylorBookstoreURL ) %]
-                                                            [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) | html %]
+                                                            [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
                                                             [% IF ( bt_id ) %]
                                                                 <img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
                                                             [% ELSE %]
                                                     </a>
 
                                                     [% IF ( BakerTaylorEnabled && BakerTaylorBookstoreURL ) %]
-                                                        [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) | html %]
+                                                        [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
                                                         [% IF ( bt_id ) %]
-                                                            <a href="https://[% BakerTaylorBookstoreURL | html %][% bt_id | html %]">
+                                                            <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]">
                                                                 <img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
                                                             </a>
                                                         [% ELSE %]
                                                     [% IF ( IDreamBooksResults && SEARCH_RESULT.normalized_isbn ) %]
                                                         <div class="idbresult" style="display: none;">
                                                             [% IF ( IDreamBooksReviews ) %]
-                                                                <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | html %]#idb_critic_reviews">
+                                                                <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]#idb_critic_reviews">
                                                             [% ELSE %]
-                                                                <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | html %]">
+                                                                <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]">
                                                             [% END %]
                                                             [% SEARCH_RESULT.normalized_isbn | html %]</a>
                                                         </div>
                                                         <span class="label">Lists:</span>
                                                             <ul>
                                                                 [% FOREACH shelf IN SEARCH_RESULT.shelves %]
-                                                                    <li><a href="/cgi-bin/koha/opac-shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | html %]">[% shelf.shelfname | html %]</a></li>
+                                                                    <li><a href="/cgi-bin/koha/opac-shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | uri %]">[% shelf.shelfname | html %]</a></li>
                                                                     [%~ UNLESS loop.last %], [% ELSE %].[% END ~%]
                                                                 [% END %]
                                                             </ul>