@@ -, +, @@ --- ...19_Add_customizable_areas_to_module_start_pages.sql | 2 +- installer/data/mysql/mandatory/sysprefs.sql | 1 - .../en/modules/admin/preferences/staff_interface.pref | 6 ------ .../intranet-tmpl/prog/en/modules/members/member.tt | 10 +++++++--- .../prog/en/modules/tools/additional-contents.tt | 2 +- 5 files changed, 9 insertions(+), 12 deletions(-) --- a/installer/data/mysql/atomicupdate/bug_6419_Add_customizable_areas_to_module_start_pages.sql +++ a/installer/data/mysql/atomicupdate/bug_6419_Add_customizable_areas_to_module_start_pages.sql @@ -2,7 +2,7 @@ $DBversion = 'XXX'; # will be replaced by the RM if( CheckVersion( $DBversion ) ) { # you can use $dbh here like: $dbh->do(q{ -INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('IntranetPatronsHomeHTML', '', 'Show the following HTML in a div on the bottom of the patrons home page', NULL, 'Free'), ('IntranetPOSHomeHTML', '', 'Show the following HTML in a div on the bottom of the point of sale home page', NULL, 'Free'), ('IntranetSerialsHomeHTML', '', 'Show the following HTML in a div on the bottom of the serials home page', NULL, 'Free')}); +INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('IntranetPOSHomeHTML', '', 'Show the following HTML in a div on the bottom of the point of sale home page', NULL, 'Free'), ('IntranetSerialsHomeHTML', '', 'Show the following HTML in a div on the bottom of the serials home page', NULL, 'Free')}); SetVersion( $DBversion ); print "Upgrade to $DBversion done (Bug 6419 - Add customizable areas to intranet start pages)\n"; --- a/installer/data/mysql/mandatory/sysprefs.sql +++ a/installer/data/mysql/mandatory/sysprefs.sql @@ -318,7 +318,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('IntranetmainUserblock','','70|10','Add a block of HTML that will display on the intranet home page','Textarea'), ('IntranetNav','','70|10','Use HTML tabs to add navigational links to the top-hand navigational bar in the staff interface','Textarea'), ('IntranetNumbersPreferPhrase','0',NULL,'Control the use of phr operator in callnumber and standard number staff interface searches','YesNo'), -('IntranetPatronsHomeHTML', '', NULL, 'Show the following HTML in a div on the bottom of the patrons home page', 'Free'), ('IntranetPOSHomeHTML', '', NULL, 'Show the following HTML in a div on the bottom of the point of sale home page', 'Free'), ('intranetreadinghistory','1','','If ON, Checkout 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'), --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref +++ a/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 patrons module:" - - pref: IntranetPatronsHomeHTML - type: textarea - syntax: text/html - class: code - - "Show the following HTML in its own div on the bottom of the home page of the POS module:" - pref: IntranetPOSHomeHTML --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt @@ -1,4 +1,5 @@ [% USE raw %] +[% USE AdditionalContents %] [% USE Asset %] [% USE Koha %] [% USE TablesSettings %] @@ -117,9 +118,12 @@ [% END %] -
- [% Koha.Preference('IntranetPatronsHomeHTML') | $raw %] -
+ [%- SET StaffPatronsHome = AdditionalContents.get( location => "StaffPatronsHome", lang => lang, library => logged_in_user.branchcode ) -%] + [%- FOREACH block IN StaffPatronsHome.content -%] +
+ [%- block.content | $raw -%] +
+ [%- END -%] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt @@ -494,7 +494,7 @@ [% END %] [% END %] [% ELSE %] - [% SET available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', 'CatalogConcernHelp', 'CatalogConcernTemplate', 'CookieConsentBar', 'CookieConsentPopup', 'StaffAcquisitionsHome', 'StaffAuthoritiesHome', 'StaffCataloguingHome', 'StaffListsHome' ] %] + [% SET available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', 'CatalogConcernHelp', 'CatalogConcernTemplate', 'CookieConsentBar', 'CookieConsentPopup', 'StaffAcquisitionsHome', 'StaffAuthoritiesHome', 'StaffCataloguingHome', 'StaffListsHome', 'StaffPatronsHome' ] %] [% FOREACH l IN available_options.sort %] [% IF l == location %] --