From d7715c799d3b4eac06b32d486c573a6b099994a7 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 17 Nov 2020 07:22:02 -0500 Subject: [PATCH] Bug 20256: (QA follow-up) Implement for item search Signed-off-by: Martin Renvoize --- catalogue/itemsearch.pl | 7 ++++--- .../prog/en/includes/catalogue/itemsearch_item.json.inc | 2 +- .../prog/en/modules/catalogue/itemsearch_json.tt | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/catalogue/itemsearch.pl b/catalogue/itemsearch.pl index 78900429f2f..a54da38cf4e 100755 --- a/catalogue/itemsearch.pl +++ b/catalogue/itemsearch.pl @@ -234,10 +234,11 @@ if ( defined $format ) { } $template->param( - filter => $filter, + filter => $filter, search_params => $search_params, - results => $results, - total_rows => $total_rows, + results => $results, + total_rows => $total_rows, + user => Koha::Patrons->find( $borrowernumber ), ); if ($format eq 'csv') { 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 1933950c07e..89d940869f6 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 @@ -29,6 +29,6 @@ "[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn ) || "" | html %]", "[% (item.issues || 0) | html %]", "[% FILTER escape_quotes ~%] - +
[%~ END %]" ] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch_json.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch_json.tt index 3c7b17d61be..3d46ae4708e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch_json.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch_json.tt @@ -4,7 +4,7 @@ "iTotalDisplayRecords": [% total_rows | html %], "aaData": [ [%- FOREACH item IN results -%] - [%- INCLUDE 'catalogue/itemsearch_item.json.inc' item = item -%] + [%- INCLUDE 'catalogue/itemsearch_item.json.inc' item = item, user = user -%] [%- UNLESS loop.last %],[% END -%] [%- END -%] ] -- 2.30.2