Bug 13597 - Amazon 'no image' element needs a 'no-image' class, in the staff client
Summary: Amazon 'no image' element needs a 'no-image' class, in the staff client
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Mason James
QA Contact: Testopia
URL:
Keywords:
: 5761 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-01-19 16:07 UTC by Nicole C. Engard
Modified: 2019-10-14 20:03 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
19.11.00,19.05.03


Attachments
no image and cover image (90.93 KB, image/png)
2015-01-19 16:07 UTC, Nicole C. Engard
Details
Bug 13597 - Amazon 'no image' element needs a 'no-image' class, in the staff client (2.11 KB, patch)
2016-04-21 00:48 UTC, Mason James
Details | Diff | Splinter Review
before/after pic (274.79 KB, image/png)
2016-04-21 01:10 UTC, Mason James
Details
Bug 13597 - Amazon 'no image' element needs a 'no-image' class, in the staff client (2.22 KB, patch)
2016-04-21 09:54 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 13597: Make staff client amazon no image results match opac (2.78 KB, patch)
2019-07-01 11:48 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 13597: Make staff client amazon no image results match opac (2.83 KB, patch)
2019-07-05 19:25 UTC, Maryse Simard
Details | Diff | Splinter Review
Bug 13597: Make staff client Amazon no image results match OPAC (3.51 KB, patch)
2019-07-07 08:22 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nicole C. Engard 2015-01-19 16:07:49 UTC
Created attachment 35396 [details]
no image and cover image

In the OPAC you can hide the no image found icon using the class.  But in the staff client there is no such class and so if you have a local cover image it shows the local image and the no image found icon.

The code is:

<a class="p1" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=20366">

    <img class="thumbnail" alt="" src="https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif"></img>

</a>
Comment 1 Mason James 2016-04-21 00:48:22 UTC Comment hidden (obsolete)
Comment 2 Mason James 2016-04-21 01:10:44 UTC
Created attachment 50488 [details]
before/after pic
Comment 3 Marc Véron 2016-04-21 09:54:11 UTC
Created attachment 50497 [details] [review]
Bug 13597 - Amazon 'no image' element needs a 'no-image' class, in the staff client

to test patch...

1/ go to staff client

2/ add following CSS to 'IntranetUserCSS' syspref, to hide images...
    span.no-image {
        display: none;
    }

3/ do a search that returns 'no image' results...
   observe that 'no image' images are still displaying :(

4/ apply patch

5/ repeat step 2/
   observe that 'no image' images are not displaying :)

Works as advertised.
Signed-off-by: Marc Véron <veron@veron.ch>
Comment 4 Jonathan Druart 2016-04-23 06:49:22 UTC
I don't understand, on both interface I do not get the "no image" amazon image if [OPAC]LocalCoverImages prefs are set.
Please detail how you get the before/after pic
Comment 5 Mason James 2016-04-25 00:22:59 UTC
(In reply to Jonathan Druart from comment #4)
> I don't understand, on both interface I do not get the "no image" amazon
> image if [OPAC]LocalCoverImages prefs are set.
> Please detail how you get the before/after pic

Jonathan, do you have 'AmazonCoverImages' enabled?

also, the bug only exists in staff interface, and (afaik) 'LocalCoverImages' syspref is not related to this bug
Comment 6 Jonathan Druart 2016-04-25 15:58:06 UTC
(In reply to Mason James from comment #5)
> (In reply to Jonathan Druart from comment #4)
> > I don't understand, on both interface I do not get the "no image" amazon
> > image if [OPAC]LocalCoverImages prefs are set.
> > Please detail how you get the before/after pic
> 
> Jonathan, do you have 'AmazonCoverImages' enabled?

yes

> also, the bug only exists in staff interface, and (afaik) 'LocalCoverImages'
> syspref is not related to this bug

I have:
MariaDB [koha]> select variable, value from systempreferences where variable like "%coverimages%";
+-------------------------+-------+
| variable                | value |
+-------------------------+-------+
| AmazonCoverImages       | 1     |
| LocalCoverImages        | 1     |
| OPACAmazonCoverImages   | 1     |
| OPACLocalCoverImages    | 1     |
| SyndeticsCoverImages    | 0     |
| SyndeticsCoverImageSize | MC    |
+-------------------------+-------+

On master, I have set a local cover image for 1 record and not for another one.
Launch a search, I get the local cover image for the first record and the "No cover image available" for the other one.

Switching off LocalCoverImages, I get the amazon "No image available" image
Comment 7 Mason James 2016-04-25 23:32:15 UTC
> On master, I have set a local cover image for 1 record and not for another
> one.
> Launch a search, I get the local cover image for the first record and the
> "No cover image available" for the other one.
> 
> Switching off LocalCoverImages, I get the amazon "No image available" image

Jonathan, on staff, with patch and CSS added, LocalCoverImages off.. you get the amazon "No image available" image shown?
Comment 8 Jonathan Druart 2016-05-04 15:25:42 UTC
(In reply to Mason James from comment #7)
> > On master, I have set a local cover image for 1 record and not for another
> > one.
> > Launch a search, I get the local cover image for the first record and the
> > "No cover image available" for the other one.
> > 
> > Switching off LocalCoverImages, I get the amazon "No image available" image
> 
> Jonathan, on staff, with patch and CSS added, LocalCoverImages off.. you get
> the amazon "No image available" image shown?

I do not know, I have not tried, why should I?
I think I did not get the goal of this patch.
Could you please give me the use case and provide a more detailed test plan?
Comment 9 Nick Clemens 2019-07-01 11:48:16 UTC
Created attachment 91140 [details] [review]
Bug 13597: Make staff client amazon no image results match opac
Comment 10 Nick Clemens 2019-07-01 11:52:18 UTC
(In reply to Jonathan Druart from comment #8)
> (In reply to Mason James from comment #7)
> > > On master, I have set a local cover image for 1 record and not for another
> > > one.
> > > Launch a search, I get the local cover image for the first record and the
> > > "No cover image available" for the other one.
> > > 
> > > Switching off LocalCoverImages, I get the amazon "No image available" image
> > 
> > Jonathan, on staff, with patch and CSS added, LocalCoverImages off.. you get
> > the amazon "No image available" image shown?
> 
> I do not know, I have not tried, why should I?
> I think I did not get the goal of this patch.
> Could you please give me the use case and provide a more detailed test plan?

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
Comment 11 Nick Clemens 2019-07-01 11:53:59 UTC
*** Bug 5761 has been marked as a duplicate of this bug. ***
Comment 12 Maryse Simard 2019-07-05 19:25:45 UTC
Created attachment 91367 [details] [review]
Bug 13597: Make staff client amazon no image results match opac

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Comment 13 Katrin Fischer 2019-07-07 08:22:48 UTC
Created attachment 91398 [details] [review]
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>
Comment 14 Martin Renvoize 2019-07-15 11:21:12 UTC
Nice work!

Pushed to master for 19.11.00
Comment 15 Fridolin SOMERS 2019-07-30 07:43:17 UTC
Pushed to 19.05.x for 19.05.03