From 3377bc8456269717c6fb4229ea3b1f820d139865 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nazl=C4=B1=20=C3=87etin?= Date: Thu, 5 Mar 2020 15:02:37 +0000 Subject: [PATCH] Bug 13547: Item field 3 (Materials specified) would be useful to see on OPAC --- 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 2c45659d34..8773281584 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -1094,6 +1094,9 @@ modules: - columnname: item_callnumber - + columnname: item_materials + is_hidden: 1 + - columnname: item_enumchron - columnname: item_url 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 d3b449351d..83fec8d5a3 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1229,6 +1229,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 ) %] @@ -1331,6 +1333,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 e58cf8b65d..c8badda441 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.11.0