Bug 18236 - MARC21: Add classes to material type icons on intranet result lists and detail pages
Summary: MARC21: Add classes to material type icons on intranet result lists and detai...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: jwayway
QA Contact: Testopia
URL:
Keywords: Academy
Depends on:
Blocks:
 
Reported: 2017-03-09 10:07 UTC by Katrin Fischer
Modified: 2019-10-14 19:57 UTC (History)
4 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-18236: Add classes to material type Test plan: 1. Open a list of results 2. Use fn+f12 to inspect element 3. Without patch it should show that the image class is 'materialtype' 4. With patch the class should have changed -Books = mt_icon_bo (6.09 KB, patch)
2018-01-16 20:47 UTC, jwayway
Details | Diff | Splinter Review
Bug-18236: Add classes to material type (6.08 KB, patch)
2018-01-16 20:53 UTC, jwayway
Details | Diff | Splinter Review
Bug-18236: Add classes to material type (7.60 KB, patch)
2018-01-17 23:24 UTC, jwayway
Details | Diff | Splinter Review
Bug-18236: Add classes to material type (6.13 KB, patch)
2018-06-18 19:26 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug-18236: Add classes to material type (7.65 KB, patch)
2018-06-18 19:26 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 18236: MARC21 - Add classes to material type on intranet detail and results pages (7.80 KB, patch)
2018-08-01 15:25 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2017-03-09 10:07:00 UTC
Some libraries would prefer to show different material type icons in the result lists and detail pages in OPAC in staff. In order to make this possible with CSS, it would be nice if every icon had its own specific class so it's easy to target them.

Something like: mt_icon_book, mt_icon_film, mt_icon_...
Comment 1 jwayway 2018-01-16 20:47:03 UTC Comment hidden (obsolete)
Comment 2 jwayway 2018-01-16 20:53:38 UTC Comment hidden (obsolete)
Comment 3 jwayway 2018-01-16 20:55:34 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2018-01-17 12:39:19 UTC
This looks great, but can I ask for more? It would be helpful if the icons kept the "materialtype" class along with the new class:

<img src="/intranet-tmpl/prog/img/famfamfam/silk/book.png" alt="book" title="book" class="materialtype mt_icon_book"/>

That would let us define common styles for all material type icons in addition to specific ones for specific types.

Also: Could you include changes to MARC21slim2intranetDetail.xsl too?

Thanks!
Comment 5 jwayway 2018-01-17 23:24:00 UTC Comment hidden (obsolete)
Comment 6 Claire Gravely 2018-03-12 09:39:29 UTC
Patch does not apply.
Comment 7 Owen Leonard 2018-06-18 19:26:55 UTC Comment hidden (obsolete)
Comment 8 Owen Leonard 2018-06-18 19:26:58 UTC Comment hidden (obsolete)
Comment 9 Katrin Fischer 2018-08-01 15:25:43 UTC
Created attachment 77375 [details] [review]
Bug 18236: MARC21 - Add classes to material type on intranet detail and results pages

Test plan:
1. Open a list of results
2. Use fn+f12 to inspect element
3. Without patch it should show that the image class is 'materialtype'
4. With patch there will be an additional class
-Books = mt_icon_BK
-Kit = mt_icon_MX
-Article = mt_icon_AR
-Continuous resource = mt_icon_CR
-Mixed material = mt_icon_MX
-Computer files = mt_icon_CF
-Map = mt_icon_MP
-Music = mt_icon_MU
-Sound = mt_icon_MU
-Score = mt_icon_PR
-Visual material = mt_icon_VM

OR
1. Try using the classes in css to change the style

-When viewing the details of a record, the material type img should also have the
same changes
-Check that the material type classes in the results page is the same as
the details page

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
I've squashed the patches to make chanes easier readable.
Comment 10 Katrin Fischer 2018-08-01 15:27:44 UTC
It would be great if someone could include those changes in the OPAC as well, I've filed bug 21138.
Comment 11 Nick Clemens 2018-08-14 12:53:54 UTC
Awesome work all!

Pushed to master for 18.11
Comment 12 Martin Renvoize 2018-08-16 10:45:42 UTC
Enhancement, will not be backported to 18.05.x series.