Bugzilla – Attachment 154451 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 StaffSerialsHome block to additional contents
Bug-6419-Add-StaffSerialsHome-block-to-additional-.patch (text/plain), 7.04 KB, created by
Martin Renvoize (ashimema)
on 2023-08-16 07:34:29 UTC
(
hide
)
Description:
Bug 6419: Add StaffSerialsHome block to additional contents
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-08-16 07:34:29 UTC
Size:
7.04 KB
patch
obsolete
>From b7be86c8c5515465d25ee4633de6ca544ae75935 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 16 Aug 2023 07:49:53 +0100 >Subject: [PATCH] Bug 6419: Add StaffSerialsHome block to additional contents > >This patch adds a new `StaffSerialsHome` 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: This patch also removes the now defunct database update introduced >in the first patch of the series. >--- > ...stomizable_areas_to_module_start_pages.sql | 9 --------- > installer/data/mysql/mandatory/sysprefs.sql | 1 - > .../admin/preferences/staff_interface.pref | 6 ------ > .../prog/en/modules/serials/serials-home.tt | 19 ++++++++++++------- > .../en/modules/tools/additional-contents.tt | 2 +- > 5 files changed, 13 insertions(+), 24 deletions(-) > delete 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 >deleted file mode 100644 >index daf737c514..0000000000 >--- a/installer/data/mysql/atomicupdate/bug_6419_Add_customizable_areas_to_module_start_pages.sql >+++ /dev/null >@@ -1,9 +0,0 @@ >-$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 ('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 5c5a836979..30197591a8 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -317,7 +317,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('IntranetNumbersPreferPhrase','0',NULL,'Control the use of phr operator in callnumber and standard number staff interface searches','YesNo'), > ('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'), >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 c0aaea7b4e..0e5bb27f4c 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 >@@ -119,12 +119,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 serials module:" >- - pref: IntranetSerialsHomeHTML >- type: textarea >- syntax: text/html >- class: code > - > - "Show the following HTML on the staff interface login page" > - pref: StaffLoginInstructions >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 65a4231185..5569b541d3 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 >@@ -1,7 +1,7 @@ > [% USE raw %] >+[% USE AdditionalContents %] > [% USE Asset %] > [% USE KohaDates %] >-[% USE Koha %] > [% USE Branches %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] >@@ -26,10 +26,19 @@ > <div class="col-sm-10 col-sm-push-2"> > <main> > >- [% INCLUDE 'serials-toolbar.inc' %] >+ [% INCLUDE 'serials-toolbar.inc' %] >+ >+ <h1>Serials</h1> > >- <h1>Serials</h1> > [% INCLUDE 'serials-advsearch.inc' %] >+ >+ [%- SET StaffSerialsHome = AdditionalContents.get( location => "StaffSerialsHome", lang => lang, library => logged_in_user.branchcode ) -%] >+ [%- FOREACH block IN StaffSerialsHome.content -%] >+ <div class="page-section"> >+ [%- block.content | $raw -%] >+ </div> >+ [%- END -%] >+ > </main> > </div> <!-- /.col-sm-10.col-sm-push-2 --> > >@@ -39,10 +48,6 @@ > </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 %] >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 768136b9f8..120bd05597 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', 'IntranetListsHome', 'StaffPatronsHome', 'StaffPOSHome' ] %] >+ [% SET available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', 'CatalogConcernHelp', 'CatalogConcernTemplate', 'StaffAcquisitionsHome', 'IntranetAuthoritiesHome', 'IntranetCataloguingHome', 'IntranetListsHome', 'IntranetPatronsHome', 'StaffPOSHome', 'StaffSerialsHome' ] %] > [% FOREACH l IN available_options.sort %] > [% IF l == location %] > <option value="[% l | html %]" selected="selected">[% l | html %]</option> >-- >2.41.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