From 660edd0524477641c074fd7b083ba977d26fe6f5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nazl=C4=B1=20=C3=87etin?= Date: Thu, 5 Mar 2020 15:02:37 +0000 Subject: [PATCH] Bug 13547: Add item field 3 (Materials specified) to the OPAC holdings table Test plan: 1- View a record with Materials specified (field 3) data in the opac 2- Apply patch 3- Log in to staff client 4- Home->Administration->Column Settings->OPAC->holdingst 5- Set item_materials visibility 6- Refresh OPAC page 7- Confirm that the materials specified column has been added after the Call number column. Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize --- admin/columns_settings.yml | 3 +++ koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 5 +++++ opac/opac-detail.pl | 3 ++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index 96c71e2a4d..323c431d6e 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -1211,6 +1211,9 @@ modules: columnname: item_ccode - columnname: item_callnumber + - + columnname: item_materials + is_hidden: 1 - columnname: item_enumchron - 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 7a8380b7be..f1758ac2ae 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1143,6 +1143,8 @@ [% IF ( Koha.Preference('OpacLocationOnDetail') == 'column' && itemdata_location ) %] Shelving location[% END %] Call number + [% IF ( itemdata_materials ) %] + Materials specified[% END %] [% IF ( itemdata_enumchron ) %] Vol info[% END %] [% IF ( itemdata_uri ) %] @@ -1245,6 +1247,9 @@ [% END %] [% END %] + [% IF ( itemdata_materials) %] + [% ITEM_RESULT.materials | html %] + [% END %] [% IF ( itemdata_enumchron ) %] [% IF ITEM_RESULT.enumchron && ITEM_RESULT.serialseq %] diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index f1100878bd..b3e8dbda63 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -698,7 +698,7 @@ if ( not $viewallitems and @items > $max_items_to_display ) { $itm->{'imageurl'} = getitemtypeimagelocation( 'opac', $itemtypes->{ $itm->{itype} }->{'imageurl'} ); $itm->{'description'} = $itemtypes->{ $itm->{itype} }->{translated_description}; } - foreach (qw(ccode enumchron copynumber itemnotes location_description uri)) { + foreach (qw(ccode materials enumchron copynumber itemnotes location_description uri)) { $itemfields{$_} = 1 if ($itm->{$_}); } @@ -780,6 +780,7 @@ if( C4::Context->preference('ArticleRequests') ) { norequests => $norequests, RequestOnOpac => C4::Context->preference("RequestOnOpac"), itemdata_ccode => $itemfields{ccode}, + itemdata_materials => $itemfields{materials}, itemdata_enumchron => $itemfields{enumchron}, itemdata_uri => $itemfields{uri}, itemdata_copynumber => $itemfields{copynumber}, -- 2.39.5