@@ -, +, @@ --- installer/data/mysql/sysprefs.sql | 2 + installer/data/mysql/updatedatabase.pl | 8 + .../admin/preferences/enhanced_content.pref | 12 ++ koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 23 +++ opac/opac-detail.pl | 185 ++++++++++++++++++++ 5 files changed, 230 insertions(+), 0 deletions(-) --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -375,3 +375,5 @@ INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ( INSERT INTO systempreferences (variable,value,explanation,type) VALUES('EnableBorrowerFiles','0','If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UpdateTotalIssuesOnCirc','0','Whether to update the totalissues field in the biblio on each circ.',NULL,'YesNo'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('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'); +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('HTML5MediaEnabled','0','Show a HTML5 media player in a tab on opac-detail.pl for media files catalogued in field 856.','','YesNo'); +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('HTML5MediaExtensions','webm|ogg|ogv|oga|vtt','Media file extensions','','free'); --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -5473,6 +5473,14 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = 'XXX'; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('HTML5MediaEnabled','0','Show a HTML5 media player in a tab on opac-detail.pl for media files catalogued in field 856.','','YesNo');"); + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('HTML5MediaExtensions','webm|ogg|ogv|oga|vtt','Media file extensions','','free');"); + print "Upgrade to $DBversion done (Add HTML5MediaEnabled and HTML5MediaExtensions sysprefs)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref @@ -336,3 +336,15 @@ Enhanced Content: yes: Allow no: "Don't allow" - multiple images to be attached to each bibliographic record. + HTML5 Media: + - + - pref: HTML5MediaEnabled + choices: + yes: Show + no: "Don't show" + - a HTML5 media player in a tab on opac-detail.pl for media files catalogued in field 856. + - + - Media file extensions + - pref: HTML5MediaExtensions + class: multi + - (separated with |). --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt +++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt @@ -12,6 +12,7 @@ [% IF ( OpacStarRatings != 'disable' ) %] [% END %] +