Bug 6419: Add custom HTML areas to intranet home pages

This patch adds customisable HTML text areas to acqui/acqui-home.pl,
authorities/authorities-home.pl, cataloguing/addbooks.pl,
virtualshelves/shelves.pl, members/members-home.pl, pos/pay.pl and
serials/serials-home.pl pages

To test:

1) Apply patch
2) Run updatedatabase.pl
3) Add some html to the new prefs IntranetAcquisitionsHomeHTML,
   IntranetAuthoritiesHomeHTML, IntranetCatalogingHomeHTML,
   IntranetListsHomeHTML, IntranetPatronsHomeHTML, IntranetPOSHomeHTML
   and IntranetSerialsHomeHTML
4) View the Acquisition, Authorities, Cataloging, Lists, Patrons,
   Point of Sale, and Serials homepages and confirm that your changes
   show. Note that this should display in exactly the same way as it
   does in the already extant IntranetCirculationHomeHTML and
   IntranetReportsHomeHTML system preferences.

Signed-off-by: Brandon J <brandon.jimenez@inLibro.com>
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:
David Roberts 2020-05-22 09:36:25 +00:00 committed by Tomas Cohen Arazi
parent bee2b3d33e
commit 5aac8d7a31
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
10 changed files with 91 additions and 7 deletions

View file

@ -0,0 +1,9 @@
$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 ('IntranetAcquisitionsHomeHTML', '', 'Show the following HTML in a div on the bottom of the acquisitions home page', NULL, 'Free'), ('IntranetAuthoritiesHomeHTML', '', 'Show the following HTML in a div on the bottom of the authorities home page', NULL, 'Free'), ('IntranetCatalogingHomeHTML', '', 'Show the following HTML in a div on the bottom of the cataloging home page', NULL, 'Free'), ('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')});
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 6419 - Add customizable areas to intranet start pages)\n";
}

View file

@ -307,6 +307,9 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('IndependentBranchesPatronModifications','0', NULL, 'Show only modification request for the logged in branch','YesNo'),
('IndependentBranchesTransfers','0', NULL, 'Allow non-superlibrarians to transfer items between libraries','YesNo'),
('IntranetAddMastheadLibraryPulldown','0', NULL, 'Add a library select pulldown menu on the staff header search','YesNo'),
('IntranetAcquisitionsHomeHTML', '', NULL, 'Show the following HTML in a div on the bottom of the acquisitions home page', 'Free'),
('IntranetAuthoritiesHomeHTML', '', NULL, 'Show the following HTML in a div on the bottom of the authorities home page', 'Free'),
('IntranetCatalogingHomeHTML', '', NULL, 'Show the following HTML in a div on the bottom of the cataloging home page', 'Free'),
('IntranetCatalogSearchPulldown','0', NULL, 'Show a search field pulldown for \"Search the catalog\" boxes','YesNo'),
('OnSiteCheckouts','0','','Enable/Disable the on-site checkouts feature','YesNo'),
('OnSiteCheckoutsForce','0','','Enable/Disable the on-site for all cases (Even if a user is debarred, etc.)','YesNo'),
@ -317,11 +320,15 @@ 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'),
('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'),
('IntranetSerialsHomeHTML', '', NULL, 'Show the following HTML in a div on the bottom of the serials 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'),

View file

@ -3,6 +3,7 @@
[% USE Price %]
[% USE Branches %]
[% USE TablesSettings %]
[% USE Koha %]
[% SET footerjs = 1 %]
[% PROCESS 'i18n.inc' %]
[% INCLUDE 'doc-head-open.inc' %]
@ -201,6 +202,10 @@
</div><!-- /.page-section -->
[% END %]
<div class="row" id="intranet-acqui-home-html">
[% Koha.Preference('IntranetAcquisitionsHomeHTML') | $raw %]
</div>
</main>
</div> <!-- /.col-sm-10.col-sm-push-2 -->
@ -209,6 +214,7 @@
[% INCLUDE 'acquisitions-menu.inc' %]
</aside>
</div>
</div> <!-- /.row -->
[% MACRO jsinclude BLOCK %]
@ -293,5 +299,4 @@
});
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]

View file

@ -107,18 +107,60 @@ Staff interface:
- pref: SlipCSS
class: url
- on Issue and Hold Slips. (This should be a complete URL, starting with <code>http://</code>.)
-
- "Show the following HTML in its own div on the bottom of the home page of the acquisitions module:"
- pref: IntranetAcquisitionsHomeHTML
type: textarea
syntax: text/html
class: code
-
- "Show the following HTML in its own div on the bottom of the home page of the authorities module:"
- pref: IntranetAuthoritiesHomeHTML
type: textarea
syntax: text/html
class: code
-
- "Show the following HTML in its own div on the bottom of the home page of the cataloguing module:"
- pref: IntranetCatalogingHomeHTML
type: textarea
syntax: text/html
class: code
-
- "Show the following HTML in its own div on the bottom of the home page of the circulation module:"
- pref: IntranetCirculationHomeHTML
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
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
type: textarea
syntax: text/html
class: code
-
- "Show the following HTML in its own div on the bottom of the home page of the serials module:"
- pref: IntranetSerialsHomeHTML
type: textarea
syntax: text/html
class: code
-
- "Show the following HTML on the staff interface login page"
- pref: StaffLoginInstructions

View file

@ -1,5 +1,6 @@
[% USE raw %]
[% PROCESS 'i18n.inc' %]
[% USE Koha %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% FILTER collapse %]
@ -25,15 +26,19 @@
<div class="main container-fluid">
<div class="row">
<div class="col-md-8 col-md-offset-2">
[% INCLUDE 'authorities-toolbar.inc' %]
[% INCLUDE 'authorities-toolbar.inc' %]
<h1>Authorities</h1>
<div id="merge_in_progress" class="page-section bg-info" style="display:none;"></div>
</div>
</div>
<div class="row" id="intranet-authorities-home-html">
[% Koha.Preference('IntranetAuthoritiesHomeHTML') | $raw %]
</div>
</div>
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'authorities_js.inc' %]

View file

@ -274,6 +274,10 @@
</div> <!-- /.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2 -->
</div> <!-- /.row -->
<div class="row" id="intranet-cataloging-home-html">
[% Koha.Preference('IntranetCatalogingHomeHTML') | $raw %]
</div>
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'columns_settings.inc' %]

View file

@ -117,6 +117,10 @@
</form>
[% END %]
<div class="row" id="intranet-members-home-html">
[% Koha.Preference('IntranetPatronsHomeHTML') | $raw %]
</div>
</main>
</div> <!-- /.col-sm-10.col-sm-push-2 -->
@ -385,5 +389,4 @@
[% PROCESS patron_search_js table_id => 'memberresultst', categories => categories, libraries => libraries, extended_attribute_types => attribute_type_codes, columns => columns,actions => ['edit', 'checkout'], redirect_if_one_result => 1, redirect_url => redirect_url, sticky_header => "searchheader", sticky_to => "searchresults", default_sort_column => 'name-address', display_search_description => 1, remember_selections => 1 %]
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]

View file

@ -159,6 +159,10 @@
</div>
</form>
[% END %]
<div class="row" id="intranet-pos-home-html">
[% Koha.Preference('IntranetPOSHomeHTML') | $raw %]
</div>
</div>
<div class="col-md-2 col-md-pull-10">
@ -477,5 +481,4 @@
});
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]

View file

@ -39,6 +39,10 @@
</aside>
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
</div> <!-- /.row -->
<div class="row" id="intranet-serials-home-html">
[% Koha.Preference('IntranetSerialsHomeHTML') | $raw %]
</div>
</div>
[% MACRO jsinclude BLOCK %]
@ -48,5 +52,4 @@
var subscriptionid = "[% subscriptionid | html %]";
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]

View file

@ -547,6 +547,10 @@
</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">
@ -993,5 +997,4 @@
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]