From 0fce4ba81d49d8cd4939e339c3d5b5860d117203 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 14 Apr 2022 13:18:30 +0000 Subject: [PATCH] Bug 30543: Decouple DumpSearchQueryTemplate from other tempalte dump preferences To test: 1 - Enable DumpSearchQueryTemplate 2 - Confirm you can find the search query in the HTML as a comment 3 - Enable other template dump preference 4 - Confirm they work as before 5 - Confirm new description of preference makes sense Signed-off-by: Andrew Fuerste-Henry Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../intranet-tmpl/prog/en/includes/doc-head-open.inc | 9 ++++++++- .../prog/en/modules/admin/preferences/logs.pref | 2 +- .../opac-tmpl/bootstrap/en/includes/doc-head-open.inc | 9 ++++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc index 2c493a8881..a524bc683a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc @@ -3,10 +3,17 @@ [% USE Koha %] [% USE raw %] +[% USE Dumper( Indent=1, SortKeys=1 ) %] + +[% IF Koha.Preference('DumpSearchQueryTemplate') %] + +[% END %] + [% IF Koha.Preference('DumpTemplateVarsIntranet') %] [% TRY %] [% USE Stash %] - [% USE Dumper( Indent=1, SortKeys=1 ) %] ', '- ->') %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref index ba4dcbed7e..ccb11bc5a8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref @@ -133,4 +133,4 @@ Logging: choices: 1: Do 0: "Don't" - - dump search query as a template parameter, requires DumpTemplateVars[interface] to be visible. + - dump search query to a comment in the HTML source for the OPAC and staff interface. diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-open.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-open.inc index 03d7cf1707..ee6282c828 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-open.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-open.inc @@ -3,10 +3,17 @@ [% USE raw %] [% USE Koha %] +[% USE Dumper( Indent=1, SortKeys=1 ) %] + +[% IF Koha.Preference('DumpSearchQueryTemplate') %] + +[% END %] + [% IF Koha.Preference('DumpTemplateVarsOpac') %] [% TRY %] [% USE Stash %] - [% USE Dumper ( Indent=1, SortKeys=1 ) %] ', '- ->') %] -- 2.39.5