Bug 6419: Add StaffListsHome block to additional contents

This patch adds a new `StaffListsHome` 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 lists home
page.

NOTE: This one may highlight an issue with Panels directly followed by
page-sections.

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-15 16:36:27 +01:00 committed by Tomas Cohen Arazi
parent b98e395055
commit cf50fc9167
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
5 changed files with 9 additions and 13 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 ('IntranetListsHomeHTML', '', 'Show the following HTML in a div on the bottom of the lists home page', NULL, 'Free'), ('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 ('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')});
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 6419 - Add customizable areas to intranet start pages)\n";

View file

@ -317,7 +317,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('IntranetCoce','0', NULL, 'If on, enables cover retrieval from the configured Coce server in the staff interface', 'YesNo'),
('intranetcolorstylesheet','','50','Define the color stylesheet to use in the staff interface','free'),
('IntranetFavicon','','','Enter a complete URL to an image to replace the default Koha favicon on the staff interface','free'),
('IntranetListsHomeHTML', '', NULL, 'Show the following HTML in a div on the bottom of the lists home page', 'Free'),
('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'),

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 lists module:"
- pref: IntranetListsHomeHTML
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

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' ] %]
[% SET available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', 'CatalogConcernHelp', 'CatalogConcernTemplate', 'CookieConsentBar', 'CookieConsentPopup', 'StaffAcquisitionsHome', 'StaffAuthoritiesHome', 'StaffCataloguingHome', 'StaffListsHome' ] %]
[% FOREACH l IN available_options.sort %]
[% IF l == location %]
<option value="[% l | html %]" selected="selected">[% l | html %]</option>

View file

@ -1,4 +1,5 @@
[% USE raw %]
[% USE AdditionalContents %]
[% USE Asset %]
[% USE Koha %]
[% USE KohaDates %]
@ -537,6 +538,12 @@
[% END # /WRAPPER tab_panels %]
[% END # /WRAPPER tabs %]
[%- SET StaffListsHome = AdditionalContents.get( location => "StaffListsHome", lang => lang, library => logged_in_user.branchcode ) -%]
[%- FOREACH block IN StaffListsHome.content -%]
<div class="page-section">
[%- block.content | $raw -%]
</div>
[%- END -%]
[% END # /IF op == 'list' %]
<form id="hold_form" method="get" action="/cgi-bin/koha/reserve/request.pl">
@ -547,10 +554,6 @@
</div> <!-- /.col-sm-10.col-sm-push-2 -->
</div> <!-- /.row -->
<div class="row" id="intranet-lists-home-html">
[% Koha.Preference('IntranetListsHomeHTML') | $raw %]
</div>
[% IF ( can_add_biblios ) %]
<!-- Modal -->
<div class="modal" id="addToList" tabindex="-1" role="dialog" aria-labelledby="addToListLabel">