Bug 9991 - De-duplicate "no cover image available" (currently in lieu of prioritizing cover image sources)
Summary: De-duplicate "no cover image available" (currently in lieu of prioritizing co...
Status: RESOLVED DUPLICATE of bug 26933
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-04 23:32 UTC by David Cook
Modified: 2022-08-22 03:15 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2013-04-04 23:32:42 UTC
Currently, when you have the system preferences for multiple cover image sources turned on, it's possible to have multiple "No Cover Image Available" graphics appearing in the OPAC for any 1 record.

I think it would make more sense to just have 1 "No Cover Image Available" if there are actually no cover images available. Plus, if there is at least 1 cover image available, there should be 0 "No Cover Image Available" graphics appearing for that record.


One idea (purely JScript-based):

1) Add a class to each cover art span (or possibly use the existing thumbnail class for the img)
2) Then use a JScript function to loop through each record's a.p1 element (which seems to be unique...although we could always add a cover art class to it as well). 
3) If span.cover_art (or img.thumbnail) exists, remove all span.no-image elements within that a.p1 element. 
4) If span.cover_art (or img.thumbnail) does not exist AND count(span.no-image) > 1, remove every span.no-image after the first instance within that a.p1 element. 

I don't think we could do it solely with Perl or TT, because the existence of cover art is going to vary depending on several other JScript functions which run independently of each other.
Comment 1 David Cook 2022-08-22 03:15:05 UTC

*** This bug has been marked as a duplicate of bug 26933 ***