From 7b2c90687d8d471ebeddb60cc3f069c8b2ad44d8 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 19 Apr 2017 16:16:21 -0300 Subject: [PATCH] Bug 18433: Use the TT plugin for itemsearch_item.json.inc TODO: includes/catalogue/itemsearch_item.csv.inc modules/catalogue/itemsearch.tt --- .../prog/en/includes/catalogue/itemsearch_item.json.inc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc index 20f6d42..5571e14 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc @@ -3,8 +3,6 @@ [%- USE AuthorisedValues -%] [%- biblio = item.biblio -%] [%- biblioitem = item.biblioitem -%] -[%- notforloan_avcategory = AuthorisedValues.GetCategoryByKohaField('items.notforloan') -%] -[%- location_avcategory = AuthorisedValues.GetCategoryByKohaField('items.location') -%] [ "[% FILTER escape_quotes = replace('"', '\"') ~%] @@ -21,9 +19,9 @@ "[% item.itemcallnumber |html %]", "[% Branches.GetName(item.homebranch) |html %]", "[% Branches.GetName(item.holdingbranch) |html %]", - "[% IF location_avcategory %][% AuthorisedValues.GetByCode(location_avcategory, item.location) | html %][% ELSE %][% item.location |html %][% END %]", + "[% AuthorisedValues.GetDescriptionByKohaField( frameworkcode => biblio.frameworkcode, kohafield => 'items.location', authorised_value => item.location) | html %]", "[% item.stocknumber |html %]", - "[% IF notforloan_avcategory %][% AuthorisedValues.GetByCode(notforloan_avcategory, item.notforloan) | html %][% ELSE %][% item.notforloan |html %][% END %]", + "[% AuthorisedValues.GetDescriptionByKohaField( frameworkcode => biblio.frameworkcode, kohafield => 'items.notforloan', authorised_value => item.notforloan) | html %]", "[% (item.issues || 0) |html %]", "[% FILTER escape_quotes ~%] Edit -- 2.9.3