Bug 18354 - Adding item type attribute to cover image div
Summary: Adding item type attribute to cover image div
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Michael Cabus
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-30 18:10 UTC by Michael Cabus
Modified: 2018-12-03 20:04 UTC (History)
2 users (show)

See Also:
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 (1.65 KB, patch)
2017-05-23 15:56 UTC, Michael Cabus
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 18354 Adding item type attribute to cover image div (1.71 KB, patch)
2017-05-24 15:21 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 18354 Adding item type attribute to cover image div (1.79 KB, patch)
2017-08-25 10:30 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 18354: [QA Follow-up] Add a prefix for the itemtype class (1.55 KB, patch)
2017-08-25 10:30 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 ?