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> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
c2b9b3f831
commit
8bb8decf01
|
|
@ -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";
|
||||
}
|
||||
|
|
@ -468,6 +468,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'),
|
||||
|
|
|
|||
|
|
@ -758,6 +758,11 @@ Circulation:
|
|||
- pref: SCOUserJS
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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 -->
|
||||
|
|
|
|||
Loading…
Reference in New Issue