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.
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
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
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.