Bugzilla – Attachment 105255 Details for
Bug 6419
Add customizable areas to intranet home pages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6419: Add custom HTML areas to intranet home pages
Bug-6419-Add-custom-HTML-areas-to-intranet-home-pa.patch (text/plain), 13.46 KB, created by
David Roberts
on 2020-05-22 09:39:10 UTC
(
hide
)
Description:
Bug 6419: Add custom HTML areas to intranet home pages
Filename:
MIME Type:
Creator:
David Roberts
Created:
2020-05-22 09:39:10 UTC
Size:
13.46 KB
patch
obsolete
>From a1db41c2270b9af062e62ee195094b7fbd8aeb4d Mon Sep 17 00:00:00 2001 >From: David Roberts <david@koha-ptfs.co.uk> >Date: Fri, 22 May 2020 09:36:25 +0000 >Subject: [PATCH] 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. >--- > ...dd_customizable_areas_to_module_start_pages.sql | 9 +++++ > installer/data/mysql/sysprefs.sql | 7 ++++ > .../prog/en/modules/acqui/acqui-home.tt | 4 +++ > .../en/modules/admin/preferences/staff_client.pref | 42 ++++++++++++++++++++++ > .../en/modules/authorities/authorities-home.tt | 5 +++ > .../prog/en/modules/cataloguing/addbooks.tt | 4 +++ > .../prog/en/modules/members/member.tt | 4 +++ > koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt | 4 +++ > .../prog/en/modules/serials/serials-home.tt | 4 +++ > .../prog/en/modules/virtualshelves/shelves.tt | 4 +++ > 10 files changed, 87 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_6419_Add_customizable_areas_to_module_start_pages.sql > >diff --git a/installer/data/mysql/atomicupdate/bug_6419_Add_customizable_areas_to_module_start_pages.sql b/installer/data/mysql/atomicupdate/bug_6419_Add_customizable_areas_to_module_start_pages.sql >new file mode 100644 >index 00000000000..6c6e411a7ef >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_6419_Add_customizable_areas_to_module_start_pages.sql >@@ -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"; >+} >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 4ad73ef827e..04e14e984d5 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -246,6 +246,9 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('IndependentBranches','0',NULL,'If ON, increases security between libraries','YesNo'), > ('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'), >+('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'), > ('RecordedBooksClientSecret','','30','Client key for RecordedBooks integration','YesNo'), > ('RecordedBooksDomain','','','RecordedBooks domain','Free'), >@@ -259,11 +262,15 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('IntranetCoce','0', NULL, 'If on, enables cover retrieval from the configured Coce server in the staff client', 'YesNo'), > ('intranetcolorstylesheet','','50','Define the color stylesheet to use in the Staff Client','free'), > ('IntranetFavicon','','','Enter a complete URL to an image to replace the default Koha favicon on the Staff client','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 Client','Textarea'), > ('IntranetNumbersPreferPhrase','0',NULL,'Control the use of phr operator in callnumber and standard number staff client 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, Reading 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'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >index 83dc7e30d10..8c136d6b6e8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >@@ -2,6 +2,7 @@ > [% USE Asset %] > [% USE Price %] > [% USE Branches %] >+[% USE Koha %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Acquisitions</title> >@@ -264,5 +265,8 @@ > }); > </script> > [% END %] >+ <div class="yui-g" id="intranet-acqui-home-html"> >+ [% Koha.Preference('IntranetAcquisitionsHomeHTML') %] >+ </div> > > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref >index f24655be497..219d3976242 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref >@@ -103,18 +103,60 @@ Staff Client: > 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 client login page" > - pref: StaffLoginInstructions > type: textarea >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities-home.tt >index 3a9867d5dfc..e6ad851f501 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities-home.tt >@@ -1,3 +1,4 @@ >+[% USE Koha %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Authorities</title> >@@ -25,4 +26,8 @@ > [% INCLUDE 'authorities_js.inc' %] > [% END %] > >+ <div class="yui-g" id="intranet-authorities-home-html"> >+ [% Koha.Preference('IntranetAuthoritiesHomeHTML') %] >+ </div> >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >index 57fa62ba358..7f54455783d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >@@ -298,4 +298,8 @@ > </script> > [% END %] > >+ <div class="yui-g" id="intranet-cataloging-home-html"> >+ [% Koha.Preference('IntranetCatalogingHomeHTML') %] >+ </div> >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >index 209932b7a6f..70f9ee69684 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >@@ -513,4 +513,8 @@ > </script> > [% END %] > >+ <div class="yui-g" id="intranet-members-home-html"> >+ [% Koha.Preference('IntranetPatronsHomeHTML') %] >+ </div> >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >index 021e4ea6114..16bd474d233 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >@@ -391,4 +391,8 @@ > </script> > [% END %] > >+ <div class="yui-g" id="intranet-pos-home-html"> >+ [% Koha.Preference('IntranetPOSHomeHTML') %] >+ </div> >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tt >index ff401ed4cb6..80f136c2199 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tt >@@ -41,4 +41,8 @@ > </script> > [% END %] > >+ <div class="yui-g" id="intranet-serials-home-html"> >+ [% Koha.Preference('IntranetSerialsHomeHTML') %] >+ </div> >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >index 5beada88710..dfbca073bd4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >@@ -763,4 +763,8 @@ > </script> > [% END %] > >+ <div class="yui-g" id="intranet-lists-home-html"> >+ [% Koha.Preference('IntranetListsHomeHTML') %] >+ </div> >+ > [% INCLUDE 'intranet-bottom.inc' %] >-- >2.11.0
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 6419
:
105255
|
108633
|
137787
|
137822
|
139501
|
154433
|
154434
|
154435
|
154436
|
154437
|
154441
|
154442
|
154443
|
154444
|
154445
|
154446
|
154447
|
154448
|
154449
|
154450
|
154451
|
154452
|
154519
|
154520
|
154521
|
154522
|
154523
|
154524
|
154525
|
154526
|
154527
|
155808
|
155809
|
155810
|
155811
|
155812
|
155813
|
155814
|
155815
|
155816
|
155839
|
155840
|
155841
|
155842
|
155843
|
155844
|
155845
|
155846
|
155847