Bugzilla – Attachment 68481 Details for
Bug 17381
Add system preference SCOMainUserBlock
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17381: Add system preference SCOMainUserBlock
Bug-17381-Add-system-preference-SCOMainUserBlock.patch (text/plain), 4.59 KB, created by
Nick Clemens (kidclamp)
on 2017-10-24 15:47:10 UTC
(
hide
)
Description:
Bug 17381: Add system preference SCOMainUserBlock
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-10-24 15:47:10 UTC
Size:
4.59 KB
patch
obsolete
>From b9427b86249c64ac2051089dad98689f0f83b497 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Mon, 21 Aug 2017 15:27:20 +0200 >Subject: [PATCH] Bug 17381: Add system preference SCOMainUserBlock > >This patch adds a system preference SCOMainUserBlock to display custom HTML >on the self checkout page. > >To test: >- Set up self checkout (see section Self Checkout in Circulaton sysprefs ) >- Apply patch >- Update db >- Add some HTML system preference SCOMainUserBlock >- Go to sco page >- Verify that HTML displays on page (logged in and not logged in) > >New version based on Koha.Preference TT plugin as of comment #7 >Depends on Bug 12691 > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > .../data/mysql/atomicupdate/bug_17381_SCOMainUserBlock.perl | 9 +++++++++ > installer/data/mysql/sysprefs.sql | 1 + > .../prog/en/modules/admin/preferences/circulation.pref | 5 +++++ > koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 2 +- > 4 files changed, 16 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_17381_SCOMainUserBlock.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_17381_SCOMainUserBlock.perl b/installer/data/mysql/atomicupdate/bug_17381_SCOMainUserBlock.perl >new file mode 100644 >index 0000000..94a5d61 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_17381_SCOMainUserBlock.perl >@@ -0,0 +1,9 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ >+ $dbh->do("INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type` ) VALUES ('SCOMainUserBlock','','70|10','Add a block of HTML that will display on the self checkout screen','Textarea')" ); >+ >+ # Always end with this (adjust the bug info) >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 17381 - Add system preference SCOMainUserBlock)\n"; >+} >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 3636b14..44da904 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -467,6 +467,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('RoutingListAddReserves','1','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'), > ('RoutingListNote','To change this note edit <a href=\"/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=RoutingListNote#jumped\">RoutingListNote</a> system preference.','70|10','Define a note to be shown on all routing lists','Textarea'), > ('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'), >+('SCOMainUserBlock','','70|10','Add a block of HTML that will display on the self checkout screen','Textarea'), > ('SCOUserCSS','',NULL,'Add CSS to be included in the SCO module in an embedded <style> tag.','free'), > ('SCOUserJS','',NULL,'Define custom javascript for inclusion in the SCO module','free'), > ('SearchEngine','Zebra','Elasticsearch|Zebra','Search Engine','Choice'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >index e145c1f..b09fa34 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >@@ -759,6 +759,11 @@ Circulation: > type: textarea > class: code > - >+ - "Include the following HTML on the the web-based self checkout screen:" >+ - pref: SCOMainUserBlock >+ type: textarea >+ class: code >+ - > - "Include the following CSS on all pages in the web-based self checkout:" > - pref: SCOUserCSS > type: textarea >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >index 7357d89..2ab9367 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >@@ -320,7 +320,7 @@ > </div> <!-- / .sco_entry --> > [% END # / IF validuser %] > [% END # / UNLESS ( hide_main %] >- >+ [% IF ( Koha.Preference('SCOMainUserBlock' ) ) %]<div id="scomainuserblock">[% Koha.Preference('SCOMainUserBlock' ) %]</div>[% END %] > </div> <!-- / .span12 --> > </div> <!-- / .row-fluid --> > </div> <!-- / .container-fluid --> >-- >2.1.4
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 17381
:
62295
|
63611
|
66271
|
66322
| 68481