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

(-)a/cataloguing/value_builder/marc21_field_008.pl (-2 / +8 lines)
Lines 50-55 sub plugin_javascript { Link Here
50
    my $lang = C4::Context->preference('DefaultLanguageField008' );
50
    my $lang = C4::Context->preference('DefaultLanguageField008' );
51
    $lang = "eng" unless $lang;
51
    $lang = "eng" unless $lang;
52
    $lang = pack("A3", $lang);
52
    $lang = pack("A3", $lang);
53
    my $country = C4::Context->preference('DefaultCountryField008');
54
    $country = "xxu" unless $country;
55
    $country = pack("A3", $country);
53
56
54
    my ($dbh, $record, $tagslib, $field_number, $tabloop) = @_;
57
    my ($dbh, $record, $tagslib, $field_number, $tabloop) = @_;
55
    my $function_name = $field_number;
58
    my $function_name = $field_number;
Lines 61-67 function Focus$function_name(subfield_managed) { Link Here
61
	if ( document.getElementById(\"$field_number\").value ) {
64
	if ( document.getElementById(\"$field_number\").value ) {
62
	}
65
	}
63
	else {
66
	else {
64
        document.getElementById(\"$field_number\").value='$dateentered' + 'b        xxu||||| |||| 00| 0 $lang d';
67
        document.getElementById(\"$field_number\").value='$dateentered' + 'b        $country||||| |||| 00| 0 $lang d';
65
	}
68
	}
66
    return 1;
69
    return 1;
67
}
70
}
Lines 93-98 sub plugin { Link Here
93
    my $lang = C4::Context->preference('DefaultLanguageField008' );
96
    my $lang = C4::Context->preference('DefaultLanguageField008' );
94
    $lang = "eng" unless $lang;
97
    $lang = "eng" unless $lang;
95
    $lang = pack("A3", $lang);
98
    $lang = pack("A3", $lang);
99
    my $country = C4::Context->preference('DefaultCountryField008');
100
    $country = "xxu" unless $country;
101
    $country = pack("A3", $country);
96
102
97
    my ($input) = @_;
103
    my ($input) = @_;
98
    my $index   = $input->param('index');
104
    my $index   = $input->param('index');
Lines 158-164 sub plugin { Link Here
158
        }
164
        }
159
    );
165
    );
160
166
161
    $result = "$dateentered" . "b        xxu||||| |||| 00| 0 $lang d" unless $result;
167
    $result = "$dateentered" . "b        $country||||| |||| 00| 0 $lang d" unless $result;
162
    my $errorXml = '';
168
    my $errorXml = '';
163
    # Check if the xml, xsd exists and is validated
169
    # Check if the xml, xsd exists and is validated
164
    my $dir = C4::Context->config('intrahtdocs') . '/prog/' . $template->{lang} . '/data/';
170
    my $dir = C4::Context->config('intrahtdocs') . '/prog/' . $template->{lang} . '/data/';
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 95-100 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
95
('decreaseLoanHighHoldsDuration',NULL,'','Specifies a number of days that a loan is reduced to when used in conjunction with decreaseLoanHighHolds','Integer'),
95
('decreaseLoanHighHoldsDuration',NULL,'','Specifies a number of days that a loan is reduced to when used in conjunction with decreaseLoanHighHolds','Integer'),
96
('decreaseLoanHighHoldsValue',NULL,'','Specifies a threshold for the minimum number of holds needed to trigger a reduction in loan duration (used with decreaseLoanHighHolds)','Integer'),
96
('decreaseLoanHighHoldsValue',NULL,'','Specifies a threshold for the minimum number of holds needed to trigger a reduction in loan duration (used with decreaseLoanHighHolds)','Integer'),
97
('DefaultClassificationSource','ddc',NULL,'Default classification scheme used by the collection. E.g., Dewey, LCC, etc.','ClassSources'),
97
('DefaultClassificationSource','ddc',NULL,'Default classification scheme used by the collection. E.g., Dewey, LCC, etc.','ClassSources'),
98
('DefaultCountryField008','','','Fill in the default country code for field 008 Range 15-17 - Place of publication, production, or execution. See <a href=\"http://www.loc.gov/marc/countries/countries_code.html\">MARC Code List for Countries</a>','Free'),
98
('DefaultLanguageField008','','','Fill in the default language for field 008 Range 35-37 of MARC21 records (e.g. eng, nor, ger, see <a href=\"http://www.loc.gov/marc/languages/language_code.html\">MARC Code List for Languages</a>)','Free'),
99
('DefaultLanguageField008','','','Fill in the default language for field 008 Range 35-37 of MARC21 records (e.g. eng, nor, ger, see <a href=\"http://www.loc.gov/marc/languages/language_code.html\">MARC Code List for Languages</a>)','Free'),
99
('DefaultLongOverdueChargeValue', NULL, NULL, "Charge a lost item to the borrower's account when the LOST value of the item changes to n.", 'integer'),
100
('DefaultLongOverdueChargeValue', NULL, NULL, "Charge a lost item to the borrower's account when the LOST value of the item changes to n.", 'integer'),
100
('DefaultLongOverdueDays', NULL, NULL, "Set the LOST value of an item when the item has been overdue for more than n days.", 'integer'),
101
('DefaultLongOverdueDays', NULL, NULL, "Set the LOST value of an item when the item has been overdue for more than n days.", 'integer'),
(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 9902-9907 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
9902
    SetVersion ($DBversion);
9902
    SetVersion ($DBversion);
9903
}
9903
}
9904
9904
9905
$DBversion = "3.19.00.XXX";
9906
if ( CheckVersion($DBversion) ) {
9907
    $dbh->do("INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('DefaultCountryField008','','','Fill in the default country code for field 008 Range 15-17 - Place of publication, production, or execution. See <a href=\"http://www.loc.gov/marc/countries/countries_code.html\">MARC Code List for Countries</a>','Free')");
9908
    print "Upgrade to $DBversion done (Bug 13912: System preference for default place of publication (country code) for field 008, range 15-17)\n";
9909
    SetVersion($DBversion);
9910
}
9911
9905
=head1 FUNCTIONS
9912
=head1 FUNCTIONS
9906
9913
9907
=head2 TableExists($table)
9914
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref (-1 / +4 lines)
Lines 44-49 Cataloging: Link Here
44
            - pref: DefaultLanguageField008
44
            - pref: DefaultLanguageField008
45
            - " Empty defaults to eng."
45
            - " Empty defaults to eng."
46
        -
46
        -
47
            - Fill in the default country code for field 008 Range 15-17 - Place of publication, production, or execution. See <a href"http://www.loc.gov/marc/countries/countries_code.html\">MARC Code List for Countries</a>
48
            - pref: DefaultCountryField008
49
            - " Empty defaults to xxu for United States."
50
        -
47
            - Interpret and store MARC records in the
51
            - Interpret and store MARC records in the
48
            - pref: marcflavour
52
            - pref: marcflavour
49
              choices:
53
              choices:
50
- 

Return to bug 13912