Bugzilla – Attachment 65519 Details for
Bug 19044
Add BDS integration
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Add BDS system preferences and enable them to be read by the templates
Add-BDS-system-preferences-and-enable-them-to-be-r.patch (text/plain), 5.18 KB, created by
David Roberts
on 2017-08-04 23:15:31 UTC
(
hide
)
Description:
Add BDS system preferences and enable them to be read by the templates
Filename:
MIME Type:
Creator:
David Roberts
Created:
2017-08-04 23:15:31 UTC
Size:
5.18 KB
patch
obsolete
>From 1d0b329d67de3c2829ee102a034c4c41f350b9fc Mon Sep 17 00:00:00 2001 >From: David Roberts <david.roberts@ptfs-europe.com> >Date: Sat, 29 Jul 2017 22:54:18 +0100 >Subject: [PATCH] Add BDS system preferences and enable them to be read by the > templates > >https://bugs.koha-community.org/show_bug.cgi?id=19044 >--- > C4/Auth.pm | 2 ++ > installer/data/mysql/atomicupdate/BDS.perl | 14 ++++++++++++++ > installer/data/mysql/sysprefs.sql | 3 +++ > .../en/modules/admin/preferences/enhanced_content.pref | 18 ++++++++++++++++++ > 4 files changed, 37 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/BDS.perl > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index d22e935..9d52ab9 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -421,6 +421,8 @@ sub get_template_and_user { > "BiblioDefaultView" . C4::Context->preference("BiblioDefaultView") => 1, > EnhancedMessagingPreferences => C4::Context->preference('EnhancedMessagingPreferences'), > GoogleJackets => C4::Context->preference("GoogleJackets"), >+ BDSOpacEnable => C4::Context->preference("BDSOpacEnable"), >+ BDSStaffEnable => C4::Context->preference("BDSStaffEnable"), > OpenLibraryCovers => C4::Context->preference("OpenLibraryCovers"), > KohaAdminEmailAddress => "" . C4::Context->preference("KohaAdminEmailAddress"), > LoginBranchcode => ( C4::Context->userenv ? C4::Context->userenv->{"branch"} : undef ), >diff --git a/installer/data/mysql/atomicupdate/BDS.perl b/installer/data/mysql/atomicupdate/BDS.perl >new file mode 100644 >index 0000000..99c8555 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/BDS.perl >@@ -0,0 +1,14 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ # you can use $dbh here like: >+ $dbh->do( "INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('BDSOpacEnable', '0', 'Enable or disable BDS enhanced content in the OPAC', NULL, 'YesNo'),('BDSStaffEnable', '0', 'Enable or disable BDS enhanced content in the Staff Interface', NULL, 'YesNo'),('DBMCode','','NULL','BDS Customer DBM Code','Free');" ); >+ >+ # or perform some test and warn >+ # if( !column_exists( 'biblio', 'biblionumber' ) ) { >+ # warn "There is something wrong"; >+ # } >+ >+ # Always end with this (adjust the bug info) >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug XXXXX - description)\n"; >+} >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 0bd8cac..da98e44 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -78,6 +78,9 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('BasketConfirmations','1','always ask for confirmation.|do not ask for confirmation.','When closing or reopening a basket,','Choice'), > ('BatchCheckouts','0','','Enable or disable batch checkouts','YesNo'), > ('BatchCheckoutsValidCategories','',NULL,'Patron categories allowed to checkout in a batch','Free'), >+('BDSOpacEnable','0','NULL','Enable or disable BDS enhanced content in the OPAC','YesNo'), >+('BDSStaffEnable','0','NULL','Enable or disable BDS enhanced content in the Staff Interface','YesNo'), >+('DBMCode','','NULL','BDS Customer DBM Code','Free'), > ('BiblioAddsAuthorities','0',NULL,'If ON, adding a new biblio will check for an existing authority record and create one on the fly if one doesn\'t exist','YesNo'), > ('BiblioDefaultView','normal','normal|marc|isbd','Choose the default detail view in the catalog; choose between normal, marc or isbd','Choice'), > ('BibtexExportAdditionalFields', '', NULL , 'Define additional BibTex tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.', 'textarea'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref >index f62882d..20f293e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref >@@ -79,6 +79,24 @@ Enhanced Content: > - pref: BakerTaylorPassword > class: password > - . >+ BDS: >+ - >+ - pref: BDSOpacEnable >+ choices: >+ yes: Show >+ no: "Don't show" >+ - BDS enhanced content in the OPAC. >+ - >+ - pref: BDSStaffEnable >+ choices: >+ yes: Show >+ no: "Don't show" >+ - BDS enhanced content in the Staff Interface >+ - >+ - Enter your unique BDS >+ - pref: DBMCode >+ - DBM code. >+ > Novelist Select: > - > - pref: NovelistSelectEnabled >-- >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 19044
: 65519 |
65520
|
65521