View | Details | Raw Unified | Return to bug 29137
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_29137.pl (+15 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "29137",
5
    description => "Add system preference CreateAVFromCataloguing",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
10
        $dbh->do( q{
11
            INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type)
12
            VALUES ('CreateAVFromCataloguing', '1', '', 'Ability to create authorized values from the cataloguing module', 'YesNo')
13
        });
14
    },
15
}
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 145-150 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
145
('CollapseFieldsPatronAddForm','',NULL,'Collapse these fields by default when adding a new patron. These fields can still be expanded.','Multiple'),
145
('CollapseFieldsPatronAddForm','',NULL,'Collapse these fields by default when adding a new patron. These fields can still be expanded.','Multiple'),
146
('ConfirmFutureHolds','0','','Number of days for confirming future holds','Integer'),
146
('ConfirmFutureHolds','0','','Number of days for confirming future holds','Integer'),
147
('ConsiderOnSiteCheckoutsAsNormalCheckouts','1',NULL,'Consider on-site checkouts as normal checkouts','YesNo'),
147
('ConsiderOnSiteCheckoutsAsNormalCheckouts','1',NULL,'Consider on-site checkouts as normal checkouts','YesNo'),
148
('CreateAVFromCataloguing', '1', '', 'Ability to create authorized values from the cataloguing module', 'YesNo'),
148
('CronjobLog','0',NULL,'If ON, log information from cron jobs.','YesNo'),
149
('CronjobLog','0',NULL,'If ON, log information from cron jobs.','YesNo'),
149
('CumulativeRestrictionPeriods',0,NULL,'Cumulate the restriction periods instead of keeping the highest','YesNo'),
150
('CumulativeRestrictionPeriods',0,NULL,'Cumulate the restriction periods instead of keeping the highest','YesNo'),
150
('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'),
151
('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 (+8 lines)
Lines 35-40 Cataloging: Link Here
35
                  controlnumber: "control number"
35
                  controlnumber: "control number"
36
                  biblionumber: "bibliographic record number"
36
                  biblionumber: "bibliographic record number"
37
            - "in the file name."
37
            - "in the file name."
38
        -
39
            - pref: CreateAVFromCataloguing
40
              default: 1
41
              choices:
42
                  1: "Allow"
43
                  0: "Don't allow"
44
            - authorized values to be created within the cataloguing module. Librarien will need the manage_auth_values subpermission.
45
38
    Spine labels:
46
    Spine labels:
39
        -
47
        -
40
            - When using the quick spine label printer,
48
            - When using the quick spine label printer,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt (-1 / +5 lines)
Lines 6-12 Link Here
6
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
7
[% Asset.js("lib/hc-sticky.js") | $raw %]
7
[% Asset.js("lib/hc-sticky.js") | $raw %]
8
<script>
8
<script>
9
    var CAN_user_parameters_manage_auth_values = "[% CAN_user_parameters_manage_auth_values | html %]";
9
    [% IF Koha.Preference('CreateAVFromCataloguing') && CAN_user_parameters_manage_auth_values %]
10
        var auth_values_creation = 1;
11
    [% ELSE %]
12
        var auth_values_creation = 0;
13
    [% END %]
10
</script>
14
</script>
11
[% INCLUDE 'select2.inc' %]
15
[% INCLUDE 'select2.inc' %]
12
[% Asset.js("js/cataloging.js") | $raw %]
16
[% Asset.js("js/cataloging.js") | $raw %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt (-1 / +5 lines)
Lines 7-13 Link Here
7
[% Asset.js("lib/hc-sticky.js") | $raw %]
7
[% Asset.js("lib/hc-sticky.js") | $raw %]
8
[% INCLUDE 'select2.inc' %]
8
[% INCLUDE 'select2.inc' %]
9
<script>
9
<script>
10
    var CAN_user_parameters_manage_auth_values = "[% CAN_user_parameters_manage_auth_values | html %]";
10
    [% IF Koha.Preference('CreateAVFromCataloguing') && CAN_user_parameters_manage_auth_values %]
11
        var auth_values_creation = 1;
12
    [% ELSE %]
13
        var auth_values_creation = 0;
14
    [% END %]
11
    $.fn.select2.defaults.set("width", "100%" );
15
    $.fn.select2.defaults.set("width", "100%" );
12
</script>
16
</script>
13
[% Asset.js("js/cataloging.js") | $raw %]
17
[% Asset.js("js/cataloging.js") | $raw %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt (-1 / +5 lines)
Lines 9-15 Link Here
9
[% Asset.css("css/addbiblio.css") | $raw %]
9
[% Asset.css("css/addbiblio.css") | $raw %]
10
[% INCLUDE 'datatables.inc' %]
10
[% INCLUDE 'datatables.inc' %]
11
<script>
11
<script>
12
    var CAN_user_parameters_manage_auth_values = "[% CAN_user_parameters_manage_auth_values | html %]";
12
    [% IF Koha.Preference('CreateAVFromCataloguing') && CAN_user_parameters_manage_auth_values %]
13
        var auth_values_creation = 1;
14
    [% ELSE %]
15
        var auth_values_creation = 0;
16
    [% END %]
13
</script>
17
</script>
14
[% INCLUDE 'select2.inc' %]
18
[% INCLUDE 'select2.inc' %]
15
[% Asset.js("js/cataloging.js") | $raw %]
19
[% Asset.js("js/cataloging.js") | $raw %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/cataloging.js (-2 / +1 lines)
Lines 90-96 var Select2Utils = { Link Here
90
90
91
    initSelect2: function(selects) {
91
    initSelect2: function(selects) {
92
        if ($.fn.select2) {
92
        if ($.fn.select2) {
93
            if ( window.CAN_user_parameters_manage_auth_values === undefined || ! CAN_user_parameters_manage_auth_values ) {
93
            if ( window.auth_values_creation === undefined || ! auth_values_creation ) {
94
                $(selects).select2().on("select2:clear", function () {
94
                $(selects).select2().on("select2:clear", function () {
95
                    $(this).on("select2:opening.cancelOpen", function (evt) {
95
                    $(this).on("select2:opening.cancelOpen", function (evt) {
96
                        evt.preventDefault();
96
                        evt.preventDefault();
97
- 

Return to bug 29137