Bug 22581: Add new system preferences

This patch adds 2 new system preferences:
1. OPACShowMusicalInscripts - to toggle musical inscripts to appear in opac's detail page
2. OPACPlayMusicalInscripts - to toggle musical inscripts to be transformed and payed in midi. Depends on OPACShowMusicalInscripts to be enabled.

To test:
1. apply this patch
2. perl installer/data/mysql/updatedatabase.pl
3. search for this new preferences in admin module
SUCCESS => they appear in OPAC section.
4. sign off

Sponsored-by: Biblioteca Provincial Fr. Mamerto Esquiú (Provincia Franciscana de la Asunción)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Agustin Moyano 2019-10-28 18:15:22 -03:00 committed by Martin Renvoize
parent 6ea1afa89a
commit 292262367e
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F
3 changed files with 28 additions and 0 deletions

View file

@ -0,0 +1,12 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
# you can use $dbh here like:
$dbh->do( qq{
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` )
VALUES ('OPACShowMusicalInscripts','0','','Display musical inscripts on the OPAC record details page when available.','YesNo'),
('OPACPlayMusicalInscripts','0','','If displayed musical inscripts, play midi conversion on the OPAC record details page.','YesNo')
} );
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 22581 - add new OPACShowMusicalInscripts and OPACPlayMusicalInscripts system preferences)\n";
}

View file

@ -431,6 +431,8 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('OPACShelfBrowser','1','','Enable/disable Shelf Browser on item details page. WARNING: this feature is very resource consuming on collections with large numbers of items.','YesNo'),
('OPACShowCheckoutName','0','','Displays in the OPAC the name of patron who has checked out the material. WARNING: Most sites should leave this off. It is intended for corporate or special sites which need to track who has the item.','YesNo'),
('OPACShowHoldQueueDetails','none','none|priority|holds|holds_priority','Show holds details in OPAC','Choice'),
('OPACShowMusicalInscripts','0','','Display musical inscripts on the OPAC record details page when available.','YesNo'),
('OPACPlayMusicalInscripts','0','','If displayed musical inscripts, play midi conversion on the OPAC record details page.','YesNo'),
('OpacShowRecentComments','0',NULL,'If ON a link to recent comments will appear in the OPAC masthead','YesNo'),
('OPACShowUnusedAuthorities','1','','Show authorities that are not being used in the OPAC.','YesNo'),
('OpacStarRatings','all','disable|all|details',NULL,'Choice'),

View file

@ -161,6 +161,20 @@ OPAC:
column: "on a separate column"
- "for items on the OPAC record details page."
- "<br />Note: If 'on a separate column' is selected, you still need to enable the item_shelving_location display on the <a href='/cgi-bin/koha/admin/columns_settings.pl'>configure columns</a> administration page"
-
- pref: OPACShowMusicalInscripts
default: 0
choices:
yes: Show
no: "Don't show"
- musical inscripts on the OPAC record details page.
-
- pref: OPACPlayMusicalInscripts
default: 0,'','If displayed musical inscripts, play midi conversion for items on the OPAC record details page.'
choices:
yes: Play
no: "Don't play"
- MIDI representation of musical inscripts on the OPAC record details page.
-
- pref: OpacKohaUrl
default: 0