Bug 19534

Summary: Adding collection code attribute to cover image div
Product: Koha Reporter: Michael Cabus <michael>
Component: OPACAssignee: Michael Cabus <michael>
Status: CLOSED WONTFIX QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: jose-mario.monteiro-santos
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug [19534] - [Adding collection code attribute to cover image div] Adds collection code value to cover image class, so specific collection code icons can be assigned to search results

Description Michael Cabus 2017-10-26 18:29:54 UTC
To further facilitate add images associated with items, add collection code attribute ID to cover image div.

Requested by archive that wanted to have images associated with specific collections appear next to items in search results.
Comment 1 Michael Cabus 2017-12-28 14:33:28 UTC
Created attachment 70186 [details] [review]
Bug [19534] - [Adding collection code attribute to cover image div] Adds collection code value to cover image class, so specific collection code icons can be assigned to search results

Test plan

1.) Do a search on OPAC
2.) Inspect element to confirm collection code is not present
3.) Apply patch
4.) Do a search on OPAC to confirm collection code is present as a class
Comment 2 José-Mario Monteiro-Santos 2019-02-15 21:32:56 UTC
Patch doesn't apply

Applying: Bug [19534] - [Adding collection code attribute to cover image div] Adds collection code value to cover image class, so specific collection code icons can be assigned to search results
Using index info to reconstruct a base tree...
M	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt
CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt
error: Failed to merge in the changes.
Patch failed at 0001 Bug [19534] - [Adding collection code attribute to cover image div] Adds collection code value to cover image class, so specific collection code icons can be assigned to search results
Comment 3 Owen Leonard 2025-04-19 15:20:38 UTC
Collection codes are an attribute of items, not bibliographic records. Bibliographic records can have a biblio-level itemtype so it makes sense to add the data to an element which is displaying bibliographic record data.

We might add collection code to the markup around item-level images, but I don't know if there is any demand for that.