Bug 13597: Make staff client Amazon no image results match OPAC

The point is to make staff client HTML for missing Amazon cover
images more equivalent to that of the OPAC

To test:
1 - Enable Amazon images everywhere
2 - Search on the staff and OPAC to get some results without
    Amazon covers (missing ISBNs and bad ISBNs)
3 - Note OPAC missing images are like:
<span class="no-image">No cover image available</span>
4 - Note staff client are like:
<img src="https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif" alt="" class="thumbnail" />
5 - The staff links do not lend themselves to easy CSS hiding/styling
6 - Apply patch
7 - Repeat
8 - Note increased consistency

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Nick Clemens 2019-07-01 11:45:14 +00:00 committed by Martin Renvoize
parent e269d6e6e6
commit fcc22df8ff
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 4 additions and 4 deletions

View File

@ -390,8 +390,8 @@
<a class="p1" href="/cgi-bin/koha/catalogue/[% DetailPage | html %]?biblionumber=[% SEARCH_RESULT.biblionumber |url %]">
<img src="https://images-na.ssl-images-amazon.com/images/P/[% SEARCH_RESULT.normalized_isbn | html %].01.TZZZZZZZ.jpg" alt="" class="thumbnail" />
[% ELSIF ( !LocalCoverImages ) %]
<a class="p1 no-amazon-cover" href="/cgi-bin/koha/catalogue/[% DetailPage | html %]?biblionumber=[% SEARCH_RESULT.biblionumber |url %]">
<img src="https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif" alt="" class="thumbnail" />
<a class="p1" href="/cgi-bin/koha/catalogue/[% DetailPage | html %]?biblionumber=[% SEARCH_RESULT.biblionumber |url %]">
<span class="no-image">No cover image available</span>
[% END %]
</a>
[% END # /IF AmazonCoverImages %]
@ -653,9 +653,9 @@
w = this.width;
h = this.height;
if ((w == 1) || (h == 1)) {
this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
$(this).parent().html('<span class="no-image">No cover image available</span>');
} else if ((this.complete != null) && (!this.complete)) {
this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
$(this).parent().html('<span class="no-image">No cover image available</span>');
}
}
});