From 8ff281cca587a612628014a45d0211b7295849f8 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 25 Aug 2020 19:30:00 +0000 Subject: [PATCH] Bug 26289: Add missing variable definition to templates This patch puts definition of the missing "searchid" variable into an include file to be used by various bibliographic detail pages. The variable is required by several JavaScript functions. To test, apply the patch and locate or create a record with no items. Open the labeled MARC view and choose Edit -> Delete record. Confirm the deletion. The deletion should complete correctly. Perform the same test with the detail view, ISBD view, MARC view, and items view. Signed-off-by: Amit Gupta Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart (cherry picked from commit a4e922ffe8a5ea760f2401aca44b1dd9be97c7ec) Signed-off-by: Lucas Gass --- .../intranet-tmpl/prog/en/includes/catalog-strings.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/catalog-strings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/catalog-strings.inc index 3e77d6a998..910cb2f054 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalog-strings.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/catalog-strings.inc @@ -19,6 +19,12 @@ var holdcount = [% holdcount | html %]; var countorders = [% countorders | html %]; var countdeletedorders = [% countdeletedorders | html %]; + [% SET orders = biblio.orders %] + [% SET current = Context.Scalar(orders, "filter_by_current") %] + [% SET cancelled = Context.Scalar(orders, "filter_by_cancelled") %] + var countorders = [% current.count || 0 | html %]; + var countdeletedorders = [% cancelled.count || 0 | html %]; + var searchid = '[% searchid | html %]'; /* provide Z3950 search points */ function GetZ3950Terms(){ -- 2.39.5