Bug 18354

Summary: Adding item type attribute to cover image div
Product: Koha Reporter: Michael Cabus <michael>
Component: OPACAssignee: Michael Cabus <michael>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: enhancement    
Priority: P5 - low CC: fridolin.somers, m.de.rooy
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 18354 Adding item type attribute to cover image div this adds item type so we can do things with javascript To Test 1.) Do a search on OPAC 2.) Inspect element to confirm item type is not present 3.) Apply patch 4.) Do a search on OPAC to confirm item
[SIGNED-OFF] Bug 18354 Adding item type attribute to cover image div
Bug 18354 Adding item type attribute to cover image div
Bug 18354: [QA Follow-up] Add a prefix for the itemtype class

Description Michael Cabus 2017-03-30 18:10:09 UTC
A library wants to add default cover images based on item type. Adding item type attribute to cover images div so I can specify default images for each, using javascript. Modifying opac-results.tt
Comment 1 Michael Cabus 2017-05-23 15:56:15 UTC
Created attachment 63661 [details] [review]
Bug 18354 Adding item type attribute to cover image div this adds item type so we can do things with javascript To Test 1.) Do a search on OPAC 2.) Inspect element to confirm item type is not present 3.) Apply patch 4.) Do a search on OPAC to confirm item
Comment 2 Owen Leonard 2017-05-24 15:21:11 UTC
Created attachment 63705 [details] [review]
[SIGNED-OFF] Bug 18354 Adding item type attribute to cover image div

This adds item type so we can do things with javascript.

To Test:

1.) Do a search on OPAC
2.) Inspect element to confirm item type is not present
3.) Apply patch
4.) Do a search on OPAC to confirm item type is present as a class

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Marcel de Rooy 2017-08-25 10:30:23 UTC
Created attachment 66470 [details] [review]
Bug 18354 Adding item type attribute to cover image div

This adds item type so we can do things with javascript.

To Test:

1.) Do a search on OPAC
2.) Inspect element to confirm item type is not present
3.) Apply patch
4.) Do a search on OPAC to confirm item type is present as a class

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Marcel de Rooy 2017-08-25 10:30:29 UTC
Created attachment 66471 [details] [review]
Bug 18354: [QA Follow-up] Add a prefix for the itemtype class

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Marcel de Rooy 2017-08-25 10:31:12 UTC
Michael,

This has been waiting much too long in our QA queue.
But pasting itemtype as-is into the class might have side-effects we cannot oversee. That string can be just about everything.
Wouldn't it be better to prefix it with something as itemtype_ ?
In view of time elapsed, I add that as a follow-up and move it to PQA. Feel free to respond if you have a better idea.

Marcel
Comment 6 Michael Cabus 2017-08-25 13:08:03 UTC
Hi
 That would be a great idea and still retain the intended purpose.

Thanks so much

Michael Cabus
Comment 7 Jonathan Druart 2017-08-25 14:01:07 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 8 Fridolin Somers 2017-09-29 12:28:32 UTC
If SEARCH_RESULT.itemtype can be undefined, is class "itemtype_" valid ?