@@ -, +, @@
cataloguing module
---
installer/data/mysql/atomicupdate/bug_29137.pl | 15 +++++++++++++++
installer/data/mysql/mandatory/sysprefs.sql | 1 +
.../en/modules/admin/preferences/cataloguing.pref | 8 ++++++++
.../prog/en/modules/authorities/authorities.tt | 6 +++++-
.../prog/en/modules/cataloguing/addbiblio.tt | 6 +++++-
.../prog/en/modules/cataloguing/additem.tt | 6 +++++-
koha-tmpl/intranet-tmpl/prog/js/cataloging.js | 2 +-
7 files changed, 40 insertions(+), 4 deletions(-)
create mode 100755 installer/data/mysql/atomicupdate/bug_29137.pl
--- a/installer/data/mysql/atomicupdate/bug_29137.pl
+++ a/installer/data/mysql/atomicupdate/bug_29137.pl
@@ -0,0 +1,15 @@
+use Modern::Perl;
+
+return {
+ bug_number => "29137",
+ description => "Add system preference CreateAVFromCataloguing",
+ up => sub {
+ my ($args) = @_;
+ my ($dbh, $out) = @$args{qw(dbh out)};
+
+ $dbh->do( q{
+ INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type)
+ VALUES ('CreateAVFromCataloguing', '1', '', 'Ability to create authorized values from the cataloguing module', 'YesNo')
+ });
+ },
+}
--- a/installer/data/mysql/mandatory/sysprefs.sql
+++ a/installer/data/mysql/mandatory/sysprefs.sql
@@ -145,6 +145,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('CollapseFieldsPatronAddForm','',NULL,'Collapse these fields by default when adding a new patron. These fields can still be expanded.','Multiple'),
('ConfirmFutureHolds','0','','Number of days for confirming future holds','Integer'),
('ConsiderOnSiteCheckoutsAsNormalCheckouts','1',NULL,'Consider on-site checkouts as normal checkouts','YesNo'),
+('CreateAVFromCataloguing', '1', '', 'Ability to create authorized values from the cataloguing module', 'YesNo'),
('CronjobLog','0',NULL,'If ON, log information from cron jobs.','YesNo'),
('CumulativeRestrictionPeriods',0,NULL,'Cumulate the restriction periods instead of keeping the highest','YesNo'),
('CurrencyFormat','US','US|FR|CH','Determines the display format of currencies. eg: \'36000\' is displayed as \'360 000,00\' in \'FR\' or \'360,000.00\' in \'US\'.','Choice'),
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref
@@ -35,6 +35,14 @@ Cataloging:
controlnumber: "control number"
biblionumber: "bibliographic record number"
- "in the file name."
+ -
+ - pref: CreateAVFromCataloguing
+ default: 1
+ choices:
+ 1: "Allow"
+ 0: "Don't allow"
+ - authorized values to be created within the cataloguing module. Librarien will need the manage_auth_values subpermission.
+
Spine labels:
-
- When using the quick spine label printer,
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt
@@ -6,7 +6,11 @@
[% INCLUDE 'doc-head-close.inc' %]
[% Asset.js("lib/hc-sticky.js") | $raw %]
[% INCLUDE 'select2.inc' %]
[% Asset.js("js/cataloging.js") | $raw %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
@@ -7,7 +7,11 @@
[% Asset.js("lib/hc-sticky.js") | $raw %]
[% INCLUDE 'select2.inc' %]
[% Asset.js("js/cataloging.js") | $raw %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt
@@ -9,7 +9,11 @@
[% Asset.css("css/addbiblio.css") | $raw %]
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'select2.inc' %]
[% Asset.js("js/cataloging.js") | $raw %]
--- a/koha-tmpl/intranet-tmpl/prog/js/cataloging.js
+++ a/koha-tmpl/intranet-tmpl/prog/js/cataloging.js
@@ -90,7 +90,7 @@ var Select2Utils = {
initSelect2: function(selects) {
if ($.fn.select2) {
- if ( window.CAN_user_parameters_manage_auth_values === undefined || ! CAN_user_parameters_manage_auth_values ) {
+ if ( window.auth_values_creation === undefined || ! auth_values_creation ) {
$(selects).select2().on("select2:clear", function () {
$(this).on("select2:opening.cancelOpen", function (evt) {
evt.preventDefault();
--