Bugzilla – Attachment 155812 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 StaffListsHome block to additional contents
Bug-6419-Add-StaffListsHome-block-to-additional-co.patch (text/plain), 7.67 KB, created by
Owen Leonard
on 2023-09-18 12:48:24 UTC
(
hide
)
Description:
Bug 6419: Add StaffListsHome block to additional contents
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2023-09-18 12:48:24 UTC
Size:
7.67 KB
patch
obsolete
>From 366ca3d461a8fdd1fcd35fea81d209b783cced3d Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 15 Aug 2023 16:36:27 +0100 >Subject: [PATCH] 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> >--- > ...9_Add_customizable_areas_to_module_start_pages.sql | 2 +- > installer/data/mysql/mandatory/sysprefs.sql | 1 - > .../en/modules/admin/preferences/staff_interface.pref | 6 ------ > .../prog/en/modules/tools/additional-contents.tt | 2 +- > .../prog/en/modules/virtualshelves/shelves.tt | 11 +++++++---- > 5 files changed, 9 insertions(+), 13 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 259b6506e4..71ce17f175 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 ('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"; >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 76e19d7b3b..94f8aadbef 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`, ` > ('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'), >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 9a238122d3..3b0707248f 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 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 >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 8dd79e7cb8..19cbf2f154 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', '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> >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 f00b3fe1bb..80b3ea4afe 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >@@ -1,4 +1,5 @@ > [% USE raw %] >+[% USE AdditionalContents %] > [% USE Asset %] > [% USE Koha %] > [% USE KohaDates %] >@@ -534,6 +535,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"> >@@ -544,10 +551,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"> >-- >2.30.2
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