From 74752502b309ddec4311a4311a3481bf54061187 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc=20V=C3=A9ron?= Date: Tue, 27 Jun 2017 18:50:44 +0200 Subject: [PATCH] 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 Signed-off-by: Laurence Rault Signed-off-by: Julian Maurice Signed-off-by: Jonathan Druart (cherry picked from commit 6c1504cfdb301cb0f9f3a14b5db31a63f5c3b0a5) Signed-off-by: Fridolin Somers --- .../prog/en/includes/catalogue/itemsearch_item.json.inc | 3 ++- .../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 4085b94999..cd442e0fd5 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 77366cd14f..06861b50ad 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt @@ -254,7 +254,7 @@ { 'sName': 'title' }, { 'sName': 'publicationyear' }, { 'sName': 'publishercode' }, - { 'sName': 'collectiontitle' }, + { 'sName': 'ccode' }, { 'sName': 'barcode' }, { 'sName': 'itemcallnumber' }, { 'sName': 'homebranch' }, @@ -272,7 +272,7 @@ { 'type': 'text' }, { 'type': 'text' }, { 'type': 'text' }, - { 'type': 'text' }, + { 'type': 'select', 'values': [% ccodes.json %] }, { 'type': 'text' }, { 'type': 'text' }, { 'type': 'select', 'values': [% branches.json %] }, -- 2.39.5