From 003a82ae18f2e3d535eff367b59f471b0a12da4a 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] 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. --- .../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 4085b94..cd442e0 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 3a70dad..8dadc01 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt @@ -313,7 +313,7 @@ { 'sName': 'title' }, { 'sName': 'publicationyear' }, { 'sName': 'publishercode' }, - { 'sName': 'collectiontitle' }, + { 'sName': 'ccode' }, { 'sName': 'barcode' }, { 'sName': 'itemcallnumber' }, { 'sName': 'homebranch' }, @@ -331,7 +331,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