From 98db83b814a3427d765f0f7d803d15324052f621 Mon Sep 17 00:00:00 2001 From: Hinemoea Viault Date: Tue, 16 Jul 2024 15:25:08 -0400 Subject: [PATCH] Bug 37314: Change style on OPAC for Itemtype to facilitate reading of the record with JS If item-level_itypes preference is set to bibliographic, the ItemType field is not in the table in the OPAC record details page. To reproduce : 1. Set item-level_itypes preference to "bibliographic record" 1. Go to Administration > System preferences 2. Search "itype" 3. Change value of itypes preference to "bibliographic record" 4. Click on "Save all Cataloging preferences" 2. Create new record 1. Go to Cataloging > New record 2. Complete the required fields (000, 003, 005, 008, 040$c, 245$a, 942$c) 3. Save (DON'T ADD ITEM) 4. Click on "Normal" 3. Look style in the OPAC 1. Click on "OPAC view Open in new window" And now you can see that the ItemType field is not in the table. 4. Apply patch 5. Look style in the OPAC 1. Click on "OPAC view Open in new window" Now, you can read itemtype easier with the table --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index bc12436d3b..a3a49111e1 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1987,6 +1987,10 @@ }()); [% END # /IF ( OPACShelfBrowser ) %] + [% IF ( !item_level_itypes || Koha.Preference('BiblioItemtypeInfo') ) %] + $(".results_summary.itemtype").detach().appendTo("#table"); + [% END %] + $(".edit_comment").on("click", function(e){ e.preventDefault(); Dopop( this.href ); -- 2.34.1