Bugzilla – Attachment 183135 Details for
Bug 34561
Move IntranetReportsHomeHTML to HTML customizations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34561: Move IntranetReportsHomeHTML to HTML customizations
Bug-34561-Move-IntranetReportsHomeHTML-to-HTML-cus.patch (text/plain), 7.82 KB, created by
Owen Leonard
on 2025-06-10 14:50:36 UTC
(
hide
)
Description:
Bug 34561: Move IntranetReportsHomeHTML to HTML customizations
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2025-06-10 14:50:36 UTC
Size:
7.82 KB
patch
obsolete
>From e381488fdab19465176762044f6911fac6b37deb Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 10 Jun 2025 14:41:39 +0000 >Subject: [PATCH] Bug 34561: Move IntranetReportsHomeHTML to HTML > customizations > >This patch moves the IntranetReportsHomeHTML system preference into >HTML customizations, making it possible to have language- and >library-specific content. > >To test you should have some content in the IntranetReportsHomeHTML >system preference before applying the patch. Apply the patch and run the >database update process. > >- In the staff client, go to Tools -> HTML customizations and verify > that the content from IntranetReportsHomeHTML is now stored there. >- The HTML customization entry form should offer > IntranetReportsHomeHTML as a choice under "Display location." >- Update and reinstall active translations (for instance fr-FR): > - perl misc/translator/translate update fr-FR > - perl misc/translator/translate install fr-FR >- Enable the translation if necessary under Administration -> System > preferences -> language. >- Edit the IntranetReportsHomeHTML HTML customization and add unique > content to the "fr-FR" tab. > >- Go to the reports home page. You should see the > content you added to the IntranetReportsHomeHTML HTML > customization. >- Switch to your updated translation and confirm that the content you > added for your translation shows up correctly. >- Go to Administration -> System preferences and search for > "IntranetReportsHomeHTML." It should return no results. > >Sponsored-by: Athens County Public Libraries >--- > installer/data/mysql/mandatory/sysprefs.sql | 1 - > .../en/includes/html-customization-help.inc | 2 ++ > .../admin/preferences/staff_interface.pref | 6 ----- > .../prog/en/modules/reports/reports-home.tt | 23 ++++++++++++++++--- > .../en/modules/tools/additional-contents.tt | 2 +- > 5 files changed, 23 insertions(+), 11 deletions(-) > >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 09b8afd6fd8..ae669913951 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -357,7 +357,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('IntranetNumbersPreferPhrase','0',NULL,'Control the use of phr operator in callnumber and standard number staff interface searches','YesNo'), > ('intranetreadinghistory','1','','If ON, Checkout history is enabled for all patrons','YesNo'), > ('IntranetReadingHistoryHolds', 1, '', 'If ON, Holds history is enabled for all patrons','YesNo'), >-('IntranetReportsHomeHTML', '', NULL, 'Show the following HTML in a div on the bottom of the reports home page', 'Free'), > ('IntranetSlipPrinterJS','','','Use this JavaScript for printing slips. Define at least function printThenClose(). For use e.g. with Firefox PlugIn jsPrintSetup, see http://jsprintsetup.mozdev.org/','Free'), > ('intranetstylesheet','','50','Enter a complete URL to use an alternate layout stylesheet in Intranet','free'), > ('IntranetUserCSS','',NULL,'Add CSS to be included in the intranet in an embedded <style> tag.','free'), >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 bc0bfabe7c3..fe641ecaa35 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,6 +16,8 @@ > > <div id="IntranetmainUserblock_notes" class="hint customization_note"> Include this content in its own section on the main page of the staff interface </div> > >+<div id="IntranetReportsHomeHTML_notes" class="hint customization_note"> Include this content in its own section on the reports home page</div> >+ > <div id="opaccredits_notes" class="hint customization_note"> Include this content in the footer of all pages in the OPAC. </div> > > <div id="OpacCustomSearch_notes" class="hint customization_note"> Replace the search box at the top of OPAC pages with this content. </div> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref >index 8da36fceb14..00b1b06912f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref >@@ -113,12 +113,6 @@ Staff interface: > type: textarea > syntax: text/html > class: code >- - >- - "Show the following HTML in its own div on the bottom of the home page of the reports module:" >- - pref: IntranetReportsHomeHTML >- type: textarea >- syntax: text/html >- class: code > - > - pref: StaffHighlightedWords > type: boolean >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 2d8517da1c0..2ddf5115a53 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 >@@ -1,5 +1,6 @@ > [% USE raw %] > [% USE Koha %] >+[% USE AdditionalContents %] > [% PROCESS 'i18n.inc' %] > [% INCLUDE 'doc-head-open.inc' %] > <title >@@ -126,10 +127,26 @@ > </div> > </div> > <!-- /.row --> >+ >+ [% SET IntranetReportsHomeHTML = AdditionalContents.get( location => "IntranetReportsHomeHTML", lang => lang, library => Branches.GetLoggedInBranchcode || default_branch ) %] >+ >+ [% IF ( IntranetReportsHomeHTML.content && IntranetReportsHomeHTML.content.count > 0 ) %] >+ <div class="row"> >+ <div class="col-sm-12"> >+ <div id="[% IntranetReportsHomeHTML.location | html %]" class="page-section"> >+ [% FOREACH n IN IntranetReportsHomeHTML.content %] >+ <div class="[% n.lang | html %]_item"> >+ <div class="[% n.lang | html %]_body">[% n.content | $raw %]</div> >+ </div> >+ [% END %] >+ </div> >+ <!-- /#IntranetReportsHomeHTML --> >+ </div> >+ <!-- /.col-sm-12 --> >+ </div> >+ <!-- /.row --> >+ [% END # /IF IntranetReportsHomeHTML %] > </div> > </div> >- <div class="row"> >- <div class="col-md-10 offset-md-1 col-lg-8 offset-lg-2" id="intranet-reports-home-html"> [% Koha.Preference('IntranetReportsHomeHTML') | $raw %] </div> >- </div> > </div> > [% INCLUDE 'intranet-bottom.inc' %] >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 330b5522acb..b75dedfb191 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 %] > </optgroup> >- [% SET staff_available_options = [ 'IntranetmainUserblock', 'RoutingListNote', 'StaffAcquisitionsHome', 'StaffAuthoritiesHome', 'StaffCataloguingHome', 'StaffListsHome', 'StaffLoginInstructions', 'StaffPatronsHome', 'StaffPOSHome', 'StaffSerialsHome' ] %] >+ [% SET staff_available_options = [ 'IntranetmainUserblock', 'IntranetReportsHomeHTML', 'RoutingListNote', 'StaffAcquisitionsHome', 'StaffAuthoritiesHome', 'StaffCataloguingHome', 'StaffListsHome', 'StaffLoginInstructions', 'StaffPatronsHome', 'StaffPOSHome', 'StaffSerialsHome' ] %] > <optgroup label="Staff interface"> > [% FOREACH l IN staff_available_options.sort %] > [% IF l == location %] >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34561
:
183135
|
183149
|
183485
|
183512
|
183513