Bugzilla – Attachment 154525 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 StaffPOSHome block to additional contents
Bug-6419-Add-StaffPOSHome-block-to-additional-cont.patch (text/plain), 6.80 KB, created by
Caroline Cyr La Rose
on 2023-08-17 10:31:27 UTC
(
hide
)
Description:
Bug 6419: Add StaffPOSHome block to additional contents
Filename:
MIME Type:
Creator:
Caroline Cyr La Rose
Created:
2023-08-17 10:31:27 UTC
Size:
6.80 KB
patch
obsolete
>From 8cd276eb879d715c09633581c080dd7ff64efbb7 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 16 Aug 2023 07:40:14 +0100 >Subject: [PATCH] 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> >--- > ...6419_Add_customizable_areas_to_module_start_pages.sql | 2 +- > installer/data/mysql/mandatory/sysprefs.sql | 1 - > .../en/modules/admin/preferences/staff_interface.pref | 6 ------ > koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt | 9 +++++++-- > .../prog/en/modules/tools/additional-contents.tt | 2 +- > 5 files changed, 9 insertions(+), 11 deletions(-) > >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 >index 9f4db9fedcb..daf737c514a 100644 >--- 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 >@@ -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"; >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index b1efdbf3d19..5c5a8369796 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -315,7 +315,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'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref >index a9337bcbe5d..c0aaea7b4ef 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref >+++ b/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 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 >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 09927b56b84..ee100757b14 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >@@ -1,4 +1,5 @@ > [% USE raw %] >+[% USE AdditionalContents %] > [% USE Asset %] > [% USE Branches %] > [% USE Koha %] >@@ -156,9 +157,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"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >index d8e8fbeb50a..768136b9f8f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >+++ b/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', 'StaffAcquisitionsHome', 'IntranetAuthoritiesHome', 'IntranetCataloguingHome', 'StaffListsHome', 'StaffPatronsHome' ] %] >+ [% SET available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', 'CatalogConcernHelp', 'CatalogConcernTemplate', 'StaffAcquisitionsHome', 'IntranetAuthoritiesHome', 'IntranetCataloguingHome', 'IntranetListsHome', 'StaffPatronsHome', 'StaffPOSHome' ] %] > [% FOREACH l IN available_options.sort %] > [% IF l == location %] > <option value="[% l | html %]" selected="selected">[% l | html %]</option> >-- >2.34.1
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