From 659ec8d13fefca2595645157c5ae79947e868ec8 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 22 Aug 2022 11:03:20 +0100 Subject: [PATCH] Bug 31028: Use additional_contents for help block This patch updates the modal to use the additional_contents system for the modals help block --- installer/data/mysql/atomicupdate/bug_31028.pl | 6 ++++++ installer/data/mysql/en/optional/sample_news.yml | 11 +++++++++++ .../prog/en/includes/modals/add_catalog_concern.inc | 8 +++++++- .../prog/en/modules/tools/additional-contents.tt | 2 +- .../bootstrap/en/includes/modals/catalog_concern.inc | 8 +++++++- 5 files changed, 32 insertions(+), 3 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_31028.pl b/installer/data/mysql/atomicupdate/bug_31028.pl index 6be890a4de..d26427eede 100644 --- a/installer/data/mysql/atomicupdate/bug_31028.pl +++ b/installer/data/mysql/atomicupdate/bug_31028.pl @@ -62,5 +62,11 @@ return { } ); + $dbh->do( + q{ + INSERT INTO additional_contents ( category, code, location, title, content, lang, published_on ) VALUES ('html_customizations', 'CatalogConcernHelp_1', 'CatalogConcernHelp', '', 'Please describe your concern clearly and the library will try to deal with it as quickly as possible', 'default', CAST(NOW() AS date) ) + } + ); + }, } diff --git a/installer/data/mysql/en/optional/sample_news.yml b/installer/data/mysql/en/optional/sample_news.yml index 7023d8c02a..543e9faf87 100644 --- a/installer/data/mysql/en/optional/sample_news.yml +++ b/installer/data/mysql/en/optional/sample_news.yml @@ -55,3 +55,14 @@ tables: published_on: "2007-10-29 05:34:45" expirationdate: "2099-01-10" number: 2 + + - title: "" + category: "html_customizations" + location: "CatalogConcernHelp" + code: "CatalogConcernHelp_1" + content: + - "Please describe your concern clearly and the library will try to deal with it as quickly as possible" + lang: "default" + published_on: "2007-10-29 05:25:58" + expirationdate: "2099-01-10" + number: 1 diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/modals/add_catalog_concern.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/modals/add_catalog_concern.inc index 10bf54c9bb..87174fe594 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/modals/add_catalog_concern.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/modals/add_catalog_concern.inc @@ -1,3 +1,5 @@ +[% USE AdditionalContents %] +[% SET CatalogConcernHelp = AdditionalContents.get( location => "CatalogConcernHelp", lang => lang, library => logged_in_user.branchcode ) %]