Browse Source

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 <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20.05.x
Nazlı Çetin 3 years ago
committed by Martin Renvoize
parent
commit
660edd0524
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 3
      admin/columns_settings.yml
  2. 5
      koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
  3. 3
      opac/opac-detail.pl

3
admin/columns_settings.yml

@ -1211,6 +1211,9 @@ modules:
columnname: item_ccode
-
columnname: item_callnumber
-
columnname: item_materials
is_hidden: 1
-
columnname: item_enumchron
-

5
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt

@ -1143,6 +1143,8 @@
[% IF ( Koha.Preference('OpacLocationOnDetail') == 'column' && itemdata_location ) %]
<th id="item_shelving_location" data-colname="item_shelving_location" class="shelving_location">Shelving location</th>[% END %]
<th id="item_callnumber" data-colname="item_callnumber" class="call_no">Call number</th>
[% IF ( itemdata_materials ) %]
<th id="item_materials" data-colname="item_materials" class="materials">Materials specified</th>[% END %]
[% IF ( itemdata_enumchron ) %]
<th id="item_enumchron" data-colname="item_enumchron" class="vol_info">Vol info</th>[% END %]
[% IF ( itemdata_uri ) %]
@ -1245,6 +1247,9 @@
[% END %]
[% END %]
</td>
[% IF ( itemdata_materials) %]
<td class="materials">[% ITEM_RESULT.materials | html %]</td>
[% END %]
[% IF ( itemdata_enumchron ) %]
<td class="vol_info">
[% IF ITEM_RESULT.enumchron && ITEM_RESULT.serialseq %]

3
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},

Loading…
Cancel
Save