Bug 6419: Add StaffPOSHome block to additional contents

This patch adds a new `StaffPOSHome` block to the HTML
Customisations options. This allows for the addition of a block of
content in a page-section at the bottom of the point of sale page.

NOTE: All the blocks have been placed at the bottom of the home pages
respectively for consistency. However, in this case it doesn't look as
clean as the content above is a form.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Martin Renvoize 2023-08-16 07:40:14 +01:00 committed by Tomas Cohen Arazi
parent 791f0ae193
commit ae842b62ff
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
5 changed files with 9 additions and 11 deletions

View file

@ -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 ('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 ('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";

View file

@ -320,7 +320,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'),
('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'),
('IntranetSerialsHomeHTML', '', NULL, 'Show the following HTML in a div on the bottom of the serials home page', 'Free'),

View file

@ -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 POS module:"
- pref: IntranetPOSHomeHTML
type: textarea
syntax: text/area
class: code
-
- "Show the following HTML in its own div on the bottom of the home page of the reports module:"
- pref: IntranetReportsHomeHTML

View file

@ -1,4 +1,5 @@
[% USE raw %]
[% USE AdditionalContents %]
[% USE Asset %]
[% USE Branches %]
[% USE Koha %]
@ -160,9 +161,13 @@
</form>
[% END %]
<div class="row" id="intranet-pos-home-html">
[% Koha.Preference('IntranetPOSHomeHTML') | $raw %]
[%- SET StaffPOSHome = AdditionalContents.get( location => "StaffPOSHome", lang => lang, library => logged_in_user.branchcode ) -%]
[%- FOREACH block IN StaffPOSHome.content -%]
<div class="page-section">
[%- block.content | $raw -%]
</div>
[%- END -%]
</div>
<div class="col-md-2 col-md-pull-10">

View file

@ -523,7 +523,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', 'StaffPatronsHome' ] %]
[% 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', 'StaffPOSHome' ] %]
[% FOREACH l IN available_options.sort %]
[% IF l == location %]
<option value="[% l | html %]" selected="selected">[% l | html %]</option>