From 028c3de1232d8224b679bc5f78309ed164de6320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= Date: Tue, 27 Jun 2017 18:50:44 +0200 Subject: [PATCH] [SIGNED-OFF] Bug 16485: collection column in Item search is always empty This patch fills the column 'Collection' in item search from the item values. To test: - Go to item search - Reproduce issue from initial comment - Apply patch - Verify that the column 'Collection' is filled Still to do, but outside of my datatable skills: Filter by drop down in the column header does a substring search. Example: Filter for 'Fiction" returns both 'Fiction' and 'Non-fiction' items. Signed-off-by: Owen Leonard --- .../intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc | 3 ++- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt | 4 ++-- 2 files changed, 4 insertions(+), 3 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 f098b0d..30b7178 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 @@ -1,5 +1,6 @@ [%- USE Branches -%] [%- USE Koha -%] +[% USE AuthorisedValues %] [%- biblio = item.biblio -%] [%- biblioitem = item.biblioitem -%] [ @@ -8,7 +9,7 @@ [%~ END %]", "[% (biblioitem.publicationyear || biblio.copyrightdate) |html %]", "[% biblioitem.publishercode |html %]", - "[% biblioitem.collectiontitle |html %]", + "[% AuthorisedValues.GetByCode( 'CCODE', item.ccode ) %]", "[% FILTER escape_quotes ~%] [% item.barcode |html %] [%~ END %]", diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt index f4b2e23..019b1c5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt @@ -255,7 +255,7 @@ { 'sName': 'title' }, { 'sName': 'publicationyear' }, { 'sName': 'publishercode' }, - { 'sName': 'collectiontitle' }, + { 'sName': 'ccode' }, { 'sName': 'barcode' }, { 'sName': 'itemcallnumber' }, { 'sName': 'homebranch' }, @@ -273,7 +273,7 @@ { 'type': 'text' }, { 'type': 'text' }, { 'type': 'text' }, - { 'type': 'text' }, + { 'type': 'select', 'values': [% ccodes.json %] }, { 'type': 'text' }, { 'type': 'text' }, { 'type': 'select', 'values': [% branches.json %] }, -- 2.1.4