From ae5d351a7de75b008333cefb2e1f9e2a01026217 Mon Sep 17 00:00:00 2001 From: Lisette Scheer Date: Wed, 25 Jun 2025 15:11:00 +0000 Subject: [PATCH] Bug 34561: (QA follow-up) Rename to StaffReportsHome to match othe html customizations I noticed the rest of the html customizations don't have html in the option name, so I renamed for consistency. --- ...-StaffReportsHomeHTML-to-additional-contents.pl | 14 +++++++------- .../prog/en/includes/html-customization-help.inc | 2 +- .../prog/en/modules/reports/reports-home.tt | 12 ++++++------ .../prog/en/modules/tools/additional-contents.tt | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug-34561-move-StaffReportsHomeHTML-to-additional-contents.pl b/installer/data/mysql/atomicupdate/bug-34561-move-StaffReportsHomeHTML-to-additional-contents.pl index b7fac7ceb49..078ce540725 100755 --- a/installer/data/mysql/atomicupdate/bug-34561-move-StaffReportsHomeHTML-to-additional-contents.pl +++ b/installer/data/mysql/atomicupdate/bug-34561-move-StaffReportsHomeHTML-to-additional-contents.pl @@ -8,28 +8,28 @@ return { my ( $dbh, $out ) = @$args{qw(dbh out)}; # Get any existing value from the IntranetReportsHomeHTML system preference - my ($staffreportshomehtml) = $dbh->selectrow_array( + my ($staffreportshome) = $dbh->selectrow_array( q| SELECT value FROM systempreferences WHERE variable='IntranetReportsHomeHTML'; | ); - if ($staffreportshomehtml) { + if ($staffreportshome) { $dbh->do( - "INSERT INTO additional_contents ( category, code, location, branchcode, published_on ) VALUES ('html_customizations', 'StaffReportsHomeHTML', 'StaffReportsHomeHTML', NULL, CAST(NOW() AS date) )" + "INSERT INTO additional_contents ( category, code, location, branchcode, published_on ) VALUES ('html_customizations', 'StaffReportsHome', 'StaffReportsHome', NULL, CAST(NOW() AS date) )" ); my ($insert_id) = $dbh->selectrow_array( - "SELECT id FROM additional_contents WHERE category = 'html_customizations' AND code = 'StaffReportsHomeHTML' AND location = 'StaffReportsHomeHTML' LIMIT 1", + "SELECT id FROM additional_contents WHERE category = 'html_customizations' AND code = 'StaffReportsHome' AND location = 'StaffReportsHome' LIMIT 1", {} ); $dbh->do( - "INSERT INTO additional_contents_localizations ( additional_content_id, title, content, lang ) VALUES ( ?, 'StaffReportsHomeHTML default', ?, 'default' )", - undef, $insert_id, $staffreportshomehtml + "INSERT INTO additional_contents_localizations ( additional_content_id, title, content, lang ) VALUES ( ?, 'StaffReportsHome default', ?, 'default' )", + undef, $insert_id, $staffreportshome ); - say $out "Added 'StaffReportsHomeHTML' HTML customization"; + say $out "Added 'StaffReportsHome' HTML customization"; } # Remove old system preference diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html-customization-help.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html-customization-help.inc index 328ed5d17f7..1faec6c9fa1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html-customization-help.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html-customization-help.inc @@ -16,7 +16,7 @@
Include this content in its own section on the main page of the staff interface
-
Include this content in its own section on the reports home page
+
Include this content in its own section on the reports home page
Include this content in the footer of all pages in the OPAC.
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reports-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reports-home.tt index 538985fdb11..9e9aac28745 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reports-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reports-home.tt @@ -128,24 +128,24 @@ - [% SET StaffReportsHomeHTML = AdditionalContents.get( location => "StaffReportsHomeHTML", lang => lang, library => Branches.GetLoggedInBranchcode || default_branch ) %] + [% SET StaffReportsHome = AdditionalContents.get( location => "StaffReportsHome", lang => lang, library => Branches.GetLoggedInBranchcode || default_branch ) %] - [% IF ( StaffReportsHomeHTML.content && StaffReportsHomeHTML.content.count > 0 ) %] + [% IF ( StaffReportsHome.content && StaffReportsHome.content.count > 0 ) %]
-
- [% FOREACH n IN StaffReportsHomeHTML.content %] +
+ [% FOREACH n IN StaffReportsHome.content %]
[% n.content | $raw %]
[% END %]
- +
- [% END # /IF StaffReportsHomeHTML %] + [% END # /IF StaffReportsHome %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt index 428f0f4f9d7..f62690eb20a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt @@ -542,7 +542,7 @@ [% END %] [% END %] - [% SET staff_available_options = [ 'IntranetmainUserblock', 'StaffReportsHomeHTML', 'RoutingListNote', 'StaffAcquisitionsHome', 'StaffAuthoritiesHome', 'StaffCataloguingHome', 'StaffListsHome', 'StaffLoginInstructions', 'StaffPatronsHome', 'StaffPOSHome', 'StaffSerialsHome' ] %] + [% SET staff_available_options = [ 'IntranetmainUserblock', 'StaffReportsHome', 'RoutingListNote', 'StaffAcquisitionsHome', 'StaffAuthoritiesHome', 'StaffCataloguingHome', 'StaffListsHome', 'StaffLoginInstructions', 'StaffPatronsHome', 'StaffPOSHome', 'StaffSerialsHome' ] %] [% FOREACH l IN staff_available_options.sort %] [% IF l == location %] -- 2.39.5