@@ -, +, @@ - verify that you are still allowed to change (add/remove) options for the OpacExportOptions pref. - At the OPAC, verify the selected options appear correctly (check the 3 pages opac-ISBDdetail.pl, opac-MARCdetail.pl and opac-detail.pl). --- .../unimarc_standard_system_preferences.sql | 2 +- installer/data/mysql/sysprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 14 ++++++++++++++ .../prog/en/modules/admin/preferences/opac.pref | 13 +++++++++---- .../bootstrap/en/includes/opac-detail-sidebar.inc | 3 ++- opac/opac-ISBDdetail.pl | 5 ----- opac/opac-MARCdetail.pl | 5 ----- opac/opac-detail.pl | 5 ----- 8 files changed, 27 insertions(+), 22 deletions(-) --- a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_system_preferences.sql +++ a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_system_preferences.sql @@ -24,4 +24,4 @@ UPDATE systempreferences SET value = 'Ma bibliothèque' WHERE variable = 'Librar UPDATE systempreferences SET value = 'fr-FR' WHERE variable = 'opaclanguages'; UPDATE systempreferences SET value = 1 WHERE variable = 'opaclanguagesdisplay'; UPDATE systempreferences SET value = 'Bienvenue dans Koha...\r\n
' WHERE variable = 'OpacMainUserBlock'; -UPDATE systempreferences SET value = 'bibtex|dc|marcxml|marc8|utf8|marcstd|ris' WHERE variable = 'OpacExportOptions'; +UPDATE systempreferences SET value = 'bibtex,dc,marcxml,marc8,utf8,marcstd,ris' WHERE variable = 'OpacExportOptions'; --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -252,7 +252,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('OPACdefaultSortOrder','dsc','asc|dsc|za|az','Specify the default sort order','Choice'), ('OPACdidyoumean',NULL,NULL,'Did you mean? configuration for the OPAC. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free'), ('OPACDisplay856uAsImage','OFF','OFF|Details|Results|Both','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','Choice'), -('OpacExportOptions','bibtex|dc|marcxml|marc8|utf8|marcstd|mods|ris','','Define export options available on OPAC detail page.','free'), +('OpacExportOptions','bibtex,dc,marcxml,marc8,utf8,marcstd,mods,ris','','Define export options available on OPAC detail page.','multiple'), ('OPACFallback', 'prog', 'bootstrap|prog', 'Define the fallback theme for the OPAC interface.', 'Themes'), ('OpacFavicon','','','Enter a complete URL to an image to replace the default Koha favicon on the OPAC','free'), ('OPACFineNoRenewals','100','','Fine limit above which user cannot renew books via OPAC','Integer'), --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -9628,6 +9628,20 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.19.00.XXX"; +if ( CheckVersion($DBversion) ) { + my $pref_value = C4::Context->preference('OpacExportOptions'); + $pref_value =~ s/\|/,/g; # multiple is separated by , + $dbh->do(q{ + UPDATE systempreferences + SET value = ?, + type = 'multiple' + WHERE variable = 'OpacExportOptions' + }, {}, $pref_value ); + print "Upgrade to $DBversion done (Bug XXXXX: OpacExportOptions is now multiple)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -275,10 +275,15 @@ OPAC: - - 'List export options that should be available from OPAC detail page separated by |:' - pref: OpacExportOptions - class: multi - - '
Note: Available options are: BIBTEX (bibtex), Dublin Core (dc),' - - 'MARCXML (marcxml), MARC-8 encoded MARC (marc8), Unicode/UTF-8 encoded MARC (utf8),' - - 'Unicode/UTF-8 encoded MARC without local use -9xx, x9x, xx9- fields and subfields (marcstd), MODS (mods), RIS (ris)' + multiple: + bibtex: BibTeX + dc: Dublin Core + marcxml: MARCXML + marc8: MARC-8 encoded MARC + utf8: Unicode/UTF-8 encoded MARC + marcstd: Unicode/UTF-8 encoded MARC without local use -9xx, x9x, xx9- fields and subfields + mods: MODS + ris: RIS - - pref: OpacSeparateHoldings choices: --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc +++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc @@ -34,7 +34,8 @@ [% END %] - [% IF ( export_options.size ) %] + [% SET export_options = Koha.Preference('OpacExportOptions').split(',') %] + [% IF export_options.size %]