Bug 30512: Staff interface search results template error
authorOwen Leonard <oleonard@myacpl.org>
Tue, 12 Apr 2022 11:56:43 +0000 (11:56 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 22 Apr 2022 07:01:09 +0000 (21:01 -1000)
This patch removes some markup from the search results template which
was causing markup to be output on the screen. Rather than correct the
markup so that the "p1" class is correctly added to the relevant links
I'm removing it. The "p1" class isn't used anywhere.

The patch also corrects two incorrect template filters on one of the
page's links.

To test, apply the patch and enable the following system preferences:

- AmazonCoverImages
- IntranetCoce (if available)
- LocalCoverImages

- Perform a catalog search in the staff interface which will return
  results with cover images from each of the enabled services.
- The covers should show correctly in the search results with no markup
  being output on screen.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt

index 6e58c78..cde3f0f 100644 (file)
         <div id="cover-slides-[% SEARCH_RESULT.biblionumber | html %]" class="cover-slides" data-biblionumber="[% SEARCH_RESULT.biblionumber | html %]">
             [% IF ( LocalCoverImages ) %][% SEARCH_RESULT.localimage | html %]
                 <div id="local-coverimg-[% SEARCH_RESULT.biblionumber | html %]" class="cover-image local-coverimg">
-                    <a href="[% PROCESS biblio_a_href biblionumber => SEARCH_RESULT.biblionumber %]" class => 'p1'>
+                    <a href="[% PROCESS biblio_a_href biblionumber => SEARCH_RESULT.biblionumber %]">
                         <img src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&amp;biblionumber=[% SEARCH_RESULT.biblionumber | uri %]" alt="Local cover image" />
                     </a>
                     <div class="hint">Local cover image</div>
 
             [% IF ( AmazonCoverImages && SEARCH_RESULT.normalized_isbn ) %]
                 <div id="amazon-bookcoverimg-[% SEARCH_RESULT.biblionumber | html %]" class="cover-image amazon-bookcoverimg">
-                    <a href="[% PROCESS biblio_a_href biblionumber => SEARCH_RESULT.biblionumber %]" class => 'p1'>
+                    <a href="[% PROCESS biblio_a_href biblionumber => SEARCH_RESULT.biblionumber %]">
                         <img src="https://images-na.ssl-images-amazon.com/images/P/[% SEARCH_RESULT.normalized_isbn | html %].01.TZZZZZZZ.jpg" alt="Cover image from Amazon.com" />
                     </a>
                     <div class="hint">Amazon cover image</div>
             [% IF ( SyndeticsCovers ) %]
                     [% IF ( SEARCH_RESULT.normalized_isbn || SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_oclc ) %]
                         <div id="syndetics-bookcoverimg-[% SEARCH_RESULT.biblionumber | html %]" class="cover-image syndetics-bookcoverimg">
-                            <a class="p1" href="/cgi-bin/koha/catalogue/[% DetailPage | html %]?biblionumber=[% SEARCH_RESULT.biblionumber |url %]">
+                            <a href="/cgi-bin/koha/catalogue/[% DetailPage | url %]?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]">
                                 <img src="https://secure.syndetics.com/index.aspx?isbn=[% SEARCH_RESULT.normalized_isbn | html %]/SC.GIF&amp;client=[% Koha.Preference('SyndeticsClientCode') | html %]&amp;type=xw10&amp;upc=[% SEARCH_RESULT.normalized_upc | html %]&amp;oclc=[% SEARCH_RESULT.normalized_oclc | html %]" alt="Cover from Syndetics" />
                             </a>
                             <div class="hint">Syndetics cover image</div>
                 [% coce_id = SEARCH_RESULT.normalized_ean || SEARCH_RESULT.normalized_isbn %]
                 [% IF ( coce_id ) %]
                     <div id="coce-coverimg-[% SEARCH_RESULT.biblionumber | html %]" class="cover-image coce-coverimg">
-                        <a href="[% PROCESS biblio_a_href biblionumber => SEARCH_RESULT.biblionumber %]" class => 'p1'>
+                        <a href="[% PROCESS biblio_a_href biblionumber => SEARCH_RESULT.biblionumber %]">
                             <span style="block" title="[% SEARCH_RESULT.biblionumber | url %]" class="[% coce_id | html %]" id="coce-thumbnail[% SEARCH_RESULT.biblionumber | html %]"></span>
                         </a>
                         <div class="hint">Coce cover image</div>