Browse Source

Bug 18984: Remove NORMARC support

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
21.11.x
Jonathan Druart 1 year ago
parent
commit
08c03af2ae
  1. 18
      C4/Biblio.pm
  2. 8
      C4/Charset.pm
  3. 2
      C4/HTML5Media.pm
  4. 1
      C4/Heading.pm
  5. 7
      C4/Installer.pm
  6. 5
      C4/Items.pm
  7. 25
      C4/Record.pm
  8. 2
      C4/Search.pm
  9. 2
      C4/XSLT.pm
  10. 2
      Koha/Biblio.pm
  11. 4
      Koha/SearchEngine/Elasticsearch.pm
  12. 2
      Koha/pdfformat/layout2pages.pm
  13. 2
      Koha/pdfformat/layout2pagesde.pm
  14. 2
      Koha/pdfformat/layout3pages.pm
  15. 2
      Koha/pdfformat/layout3pagesfr.pm
  16. 6
      Makefile.PL
  17. 2
      cataloguing/additem.pl
  18. 2
      cataloguing/linkitem.pl
  19. 137
      cataloguing/value_builder/normarc_field_007.pl
  20. 169
      cataloguing/value_builder/normarc_field_008.pl
  21. 87
      cataloguing/value_builder/normarc_leader.pl
  22. 4
      debian/docs/koha-create.xml
  23. 2
      debian/scripts/koha-create
  24. 1
      debian/scripts/koha-translate
  25. 2
      debian/templates/koha-sites.conf
  26. 22
      debian/templates/normarc-retrieval-info-auth-dom.xml
  27. 23
      debian/templates/normarc-retrieval-info-bib-dom.xml
  28. 2
      etc/zebradb/etc/normarc.mar
  29. 12
      gulpfile.js
  30. 2
      installer/data/mysql/kohastructure.sql
  31. 1011
      installer/data/mysql/nb-NO/marcflavour/normarc/Obligatorisk/normarc.sql
  32. 1
      installer/data/mysql/nb-NO/marcflavour/normarc/Obligatorisk/normarc.txt
  33. 127
      installer/data/mysql/nb-NO/marcflavour/normarc/Valgfritt/normarc_fastadd_framework.sql
  34. 1
      installer/data/mysql/nb-NO/marcflavour/normarc/Valgfritt/normarc_fastadd_framework.txt
  35. 3
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref
  36. 4
      koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
  37. 2826
      koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/normarc_field_007.tt
  38. 4520
      koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/normarc_field_008.tt
  39. 223
      koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/normarc_leader.tt
  40. 203
      koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2OAIDC.xsl
  41. 656
      koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl
  42. 852
      koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetResults.xsl
  43. 262
      koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslimUtils.xsl
  44. 758
      koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl
  45. 1020
      koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACResults.xsl
  46. 260
      koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslimUtils.xsl
  47. 4
      misc/search_tools/export_elasticsearch_mappings.pl
  48. 4
      misc/translator/LangInstaller.pm
  49. 2
      opac/opac-detail.pl
  50. 13
      opac/unapi
  51. 8
      t/Biblio/TransformHtmlToXml.t
  52. 7
      t/db_dependent/Acquisition.t
  53. 9
      t/db_dependent/Biblio.t
  54. 1
      t/db_dependent/www/batch.t
  55. 1
      t/db_dependent/www/search_utf8.t

18
C4/Biblio.pm

@ -1265,7 +1265,7 @@ sub GetMarcPrice {
my @listtags;
my $subfield;
if ( $marcflavour eq "MARC21" || $marcflavour eq "NORMARC" ) {
if ( $marcflavour eq "MARC21" ) {
@listtags = ('345', '020');
$subfield="c";
} elsif ( $marcflavour eq "UNIMARC" ) {
@ -1461,9 +1461,9 @@ sub GetMarcControlnumber {
return;
}
my $controlnumber = "";
# Control number or Record identifier are the same field in MARC21, UNIMARC and NORMARC
# Control number or Record identifier are the same field in MARC21 and UNIMARC
# Keep $marcflavour for possible later use
if ($marcflavour eq "MARC21" || $marcflavour eq "UNIMARC" || $marcflavour eq "NORMARC") {
if ($marcflavour eq "MARC21" || $marcflavour eq "UNIMARC" ) {
my $controlnumberField = $record->field('001');
if ($controlnumberField) {
$controlnumber = $controlnumberField->data();
@ -1525,7 +1525,7 @@ sub GetMarcISSN {
if ( $marcflavour eq "UNIMARC" ) {
$scope = '011';
}
else { # assume MARC21 or NORMARC
else { # assume MARC21
$scope = '022';
}
my @marcissns;
@ -1556,7 +1556,7 @@ sub GetMarcSubjects {
$mintag = "600";
$maxtag = "611";
$fields_filter = '6..';
} else { # marc21/normarc
} else { # marc21
$mintag = "600";
$maxtag = "699";
$fields_filter = '6..';
@ -1650,7 +1650,7 @@ sub GetMarcAuthors {
$mintag = "700";
$maxtag = "712";
$fields_filter = '7..';
} else { # marc21/normarc
} else { # marc21
$mintag = "700";
$maxtag = "720";
$fields_filter = '7..';
@ -1805,7 +1805,7 @@ sub GetMarcSeries {
$mintag = "225";
$maxtag = "225";
$fields_filter = '2..';
} else { # marc21/normarc
} else { # marc21
$mintag = "440";
$maxtag = "490";
$fields_filter = '4..';
@ -2001,7 +2001,7 @@ sub PrepHostMarcField {
my $item = Koha::Items->find($hostitemnumber);
my $hostmarcfield;
if ( $marcflavour eq "MARC21" || $marcflavour eq "NORMARC" ) {
if ( $marcflavour eq "MARC21" ) {
#main entry
my $mainentry;
@ -3019,7 +3019,7 @@ sub prepare_host_field {
my %sfd;
my $field;
my $host_field;
if ( $marcflavour eq 'MARC21' || $marcflavour eq 'NORMARC' ) {
if ( $marcflavour eq 'MARC21' ) {
if ( $field = $host->field('100') || $host->field('110') || $host->field('11') ) {
my $s = $field->as_string('ab');
if ($s) {

8
C4/Charset.pm

@ -256,20 +256,20 @@ sub MarcToUTF8Record {
# If we do not know the source encoding, try some guesses
# as follows:
# 1. Record is UTF-8 already.
# 2. If MARC flavor is MARC21 or NORMARC, then
# 2. If MARC flavor is MARC21, then
# a. record is MARC-8
# b. record is ISO-8859-1
# 3. If MARC flavor is UNIMARC, then
if (not defined $source_encoding) {
if ($marc_blob_is_utf8) {
# note that for MARC21/NORMARC we are not bothering to check
# note that for MARC21 we are not bothering to check
# if the Leader/09 is set to 'a' or not -- because
# of problems with various ILSs (including Koha in the
# past, alas), this just is not trustworthy.
SetMarcUnicodeFlag($marc_record, $marc_flavour);
return $marc_record, 'UTF-8', [];
} else {
if ($marc_flavour eq 'MARC21' || $marc_flavour eq 'NORMARC') {
if ($marc_flavour eq 'MARC21') {
return _default_marc21_charconv_to_utf8($marc_record, $marc_flavour);
} elsif ($marc_flavour =~/UNIMARC/) {
return _default_unimarc_charconv_to_utf8($marc_record, $marc_flavour);
@ -324,7 +324,7 @@ sub SetMarcUnicodeFlag {
my $marc_flavour = shift; # || C4::Context->preference("marcflavour");
$marc_record->encoding('UTF-8');
if ($marc_flavour eq 'MARC21' || $marc_flavour eq 'NORMARC') {
if ($marc_flavour eq 'MARC21') {
my $leader = $marc_record->leader();
substr($leader, 9, 1) = 'a';
$marc_record->leader($leader);

2
C4/HTML5Media.pm

@ -61,7 +61,7 @@ sub gethtml5media {
$HTML5Media{protocol} = 'http';
}
elsif ( $HTML5Media_field->indicator(1) eq '7' ) {
if ($marcflavour eq 'MARC21' || $marcflavour eq 'NORMARC') {
if ($marcflavour eq 'MARC21') {
$HTML5Media{protocol} = $HTML5Media_field->subfield('2');
}
elsif ($marcflavour eq 'UNIMARC') {

1
C4/Heading.pm

@ -245,7 +245,6 @@ depending on the selected MARC flavour.
sub _marc_format_handler {
my $marcflavour = uc shift;
$marcflavour = 'MARC21' if ( $marcflavour eq 'NORMARC' );
my $pname = "C4::Heading::$marcflavour";
load $pname;
return $pname->new();

7
C4/Installer.pm

@ -424,10 +424,10 @@ sub load_sql_in_order {
Set the 'marcflavour' system preference. The incoming
C<$marcflavour> references to a subdirectory of
installer/data/$dbms/$lang/marcflavour, and is
normalized to MARC21, UNIMARC or NORMARC.
normalized to MARC21 or UNIMARC.
FIXME: this method assumes that the MARC flavour will be either
MARC21, UNIMARC or NORMARC.
MARC21 or UNIMARC.
=cut
@ -439,10 +439,9 @@ sub set_marcflavour_syspref {
# marc_cleaned finds the marcflavour, without the variant.
my $marc_cleaned = 'MARC21';
$marc_cleaned = 'UNIMARC' if $marcflavour =~ /unimarc/i;
$marc_cleaned = 'NORMARC' if $marcflavour =~ /normarc/i;
my $request =
$self->{'dbh'}->prepare(
"INSERT IGNORE INTO `systempreferences` (variable,value,explanation,options,type) VALUES('marcflavour','$marc_cleaned','Define global MARC flavor (MARC21, UNIMARC or NORMARC) used for character encoding','MARC21|UNIMARC|NORMARC','Choice');"
"INSERT IGNORE INTO `systempreferences` (variable,value,explanation,options,type) VALUES('marcflavour','$marc_cleaned','Define global MARC flavor (MARC21 or UNIMARC) used for character encoding','MARC21|UNIMARC','Choice');"
);
$request->execute;
}

5
C4/Items.pm

@ -894,8 +894,7 @@ sub GetHostItemsInfo {
}
my @fields;
if( C4::Context->preference('marcflavour') eq 'MARC21' ||
C4::Context->preference('marcflavour') eq 'NORMARC') {
if( C4::Context->preference('marcflavour') eq 'MARC21' ) {
@fields = $record->field('773');
} elsif( C4::Context->preference('marcflavour') eq 'UNIMARC') {
@fields = $record->field('461');
@ -940,7 +939,7 @@ sub get_hostitemnumbers_of {
my ( @returnhostitemnumbers, $tag, $biblio_s, $item_s );
my $marcflavor = C4::Context->preference('marcflavour');
if ( $marcflavor eq 'MARC21' || $marcflavor eq 'NORMARC' ) {
if ( $marcflavor eq 'MARC21' ) {
$tag = '773';
$biblio_s = '0';
$item_s = '9';

25
C4/Record.pm

@ -231,7 +231,7 @@ EXAMPLE
Convert MARC or MARCXML to Dublin Core metadata (XSLT Transformation),
optionally can get an XML directly from biblio_metadata
without item information. This method take into consideration the syspref
'marcflavour' (UNIMARC, MARC21 and NORMARC).
'marcflavour' (UNIMARC or MARC21).
Return an XML file with the format defined in C<$format>
C<$marc> - an ISO-2709 scalar or MARC::Record object
@ -265,23 +265,12 @@ sub marc2dcxml {
$marcxml = $xml;
}
# only proceed if MARC21 or UNIMARC; else clause is executed if marcflavour set it to NORMARC
# generate MARC::Record object to see if not a marcxml record
unless ( C4::Context->preference('marcflavour') eq 'NORMARC' ) {
eval { $record = MARC::Record->new_from_xml(
$marcxml,
'UTF-8',
C4::Context->preference('marcflavour')
);
};
} else {
eval { $record = MARC::Record->new_from_xml(
$marcxml,
'UTF-8',
'MARC21'
);
};
}
eval { $record = MARC::Record->new_from_xml(
$marcxml,
'UTF-8',
C4::Context->preference('marcflavour')
);
};
# conversion to MARC::Record object failed
if ( $@ ) {

2
C4/Search.pm

@ -1741,7 +1741,7 @@ sub searchResults {
# adding linked items that belong to host records
if ( C4::Context->preference('EasyAnalyticalRecords') ) {
my $analyticsfield = '773';
if ($marcflavor eq 'MARC21' || $marcflavor eq 'NORMARC') {
if ($marcflavor eq 'MARC21') {
$analyticsfield = '773';
} elsif ($marcflavor eq 'UNIMARC') {
$analyticsfield = '461';

2
C4/XSLT.pm

@ -79,7 +79,7 @@ sub transformMARCXML4XSLT {
my @new_subfields = ();
for my $subfield ( $field->subfields() ) {
my ( $letter, $value ) = @$subfield;
# Replace the field value with the authorised value *except* for MARC21/NORMARC field 942$n (suppression in opac)
# Replace the field value with the authorised value *except* for MARC21 field 942$n (suppression in opac)
if ( !( $tag eq '942' && $subfield->[0] eq 'n' ) || $marcflavour eq 'UNIMARC' ) {
$value = GetAuthorisedValueDesc( $tag, $letter, $value, '', $tagslib, undef, $opac )
if $av->{ $tag }->{ $letter };

2
Koha/Biblio.pm

@ -385,7 +385,7 @@ sub host_items {
my $marcflavour = C4::Context->preference("marcflavour");
my $analyticfield = '773';
if ( $marcflavour eq 'MARC21' || $marcflavour eq 'NORMARC' ) {
if ( $marcflavour eq 'MARC21' ) {
$analyticfield = '773';
}
elsif ( $marcflavour eq 'UNIMARC' ) {

4
Koha/SearchEngine/Elasticsearch.pm

@ -241,7 +241,7 @@ sub get_elasticsearch_mappings {
=head2 raw_elasticsearch_mappings
Return elasticsearch mapping as it is in database.
marc_type: marc21|unimarc|normarc
marc_type: marc21|unimarc
$raw_mappings = raw_elasticsearch_mappings( $marc_type )
@ -1145,7 +1145,7 @@ to be included in that sort.
=item C<$marc_type>
A string that indicates the MARC type that this mapping is for, e.g. 'marc21',
'unimarc', 'normarc'.
'unimarc'.
=item C<$marc_field>

2
Koha/pdfformat/layout2pages.pm

@ -80,7 +80,7 @@ sub printorders {
( $line->{publishercode} ? ' published by '. $line->{publishercode} : '') .
( $line->{publicationyear} ? ', '. $line->{publicationyear} : '');
}
else { # MARC21, NORMARC
else { # MARC21
$titleinfo = $line->{title} . " " . $line->{author} .
( $line->{isbn} ? " ISBN: " . $line->{isbn} : '' ) .
( $line->{en} ? " EN: " . $line->{en} : '' ) .

2
Koha/pdfformat/layout2pagesde.pm

@ -79,7 +79,7 @@ sub printorders {
( $line->{publishercode} ? ' Verlag: '. $line->{publishercode} : '') .
( $line->{publicationyear} ? ', '. $line->{publicationyear} : '');
}
else { # MARC21, NORMARC
else { # MARC21
$titleinfo = $line->{title} . " " . $line->{author} .
( $line->{isbn} ? " ISBN: " . $line->{isbn} : '' ) .
( $line->{en} ? " EN: " . $line->{en} : '' ) .

2
Koha/pdfformat/layout3pages.pm

@ -103,7 +103,7 @@ sub printorders {
( $line->{publishercode} ? ' published by '. $line->{publishercode} : '') .
( $line->{publicationyear} ? ', '. $line->{publicationyear} : '');
}
else { # MARC21, NORMARC
else { # MARC21
$titleinfo = $line->{title} . " " . $line->{author} .
( $line->{isbn} ? " ISBN: " . $line->{isbn} : '' ) .
( $line->{en} ? " EN: " . $line->{en} : '' ) .

2
Koha/pdfformat/layout3pagesfr.pm

@ -104,7 +104,7 @@ sub printorders {
( $line->{publishercode} ? ' publié par '. $line->{publishercode} : '') .
( $line->{publicationyear} ? ', '. $line->{publicationyear} : '');
}
else { # MARC21, NORMARC
else { # MARC21
$titleinfo = $line->{title} . " " . $line->{author} .
( $line->{isbn} ? " ISBN : " . $line->{isbn} : '' ) .
( $line->{en} ? " EN : " . $line->{en} : '' ) .

6
Makefile.PL

@ -83,7 +83,7 @@ Makefile.PL - Koha packager and installer
--db_name Database name (e.g. koha)
--db_user Database user (e.g. kohaadmin)
--db_pass Database password (e.g. katikoan)
--zebra_marc_format Zebra MARC format (marc21, normarc, unimarc)
--zebra_marc_format Zebra MARC format (marc21, unimarc)
--zebra_language Zebra language (e.g. en)
--zebra_tokenizer Zebra tokenizer (chr, icu)
--zebra_user Zebra user (e.g. kohauser)
@ -565,7 +565,7 @@ my %valid_config_values = (
'DB_TYPE' => { 'mysql' => 1, 'Pg' => 1 },
'DB_USE_TLS' => {'yes', 'no'},
'INSTALL_SRU' => { 'yes' => 1, 'no' => 1 },
'ZEBRA_MARC_FORMAT' => { 'marc21' => 1, 'normarc' => 1, 'unimarc' => 1 }, # FIXME should generate from contents of distributation
'ZEBRA_MARC_FORMAT' => { 'marc21' => 1, 'unimarc' => 1 }, # FIXME should generate from contents of distributation
'ZEBRA_LANGUAGE' => { 'cs' => 1, 'el' => 1, 'en' => 1, 'es' => 1, 'fr' => 1, 'nb' => 1, 'ru' => 1, 'uk' => 1 }, # FIXME should generate from contents of distribution
'ZEBRA_TOKENIZER' => { chr => 1, icu => 1 },
'RUN_DATABASE_TESTS' => { 'yes' => 1, 'no' => 1 },
@ -1151,7 +1151,7 @@ You must specify the primary MARC format of the
records to be indexed by Zebra.
Koha provides Zebra configuration files for MARC21,
NORMARC and UNIMARC.
and UNIMARC.
MARC format for Zebra indexing);
$msg .= _add_valid_values_disp('ZEBRA_MARC_FORMAT', $valid_values);

2
cataloguing/additem.pl

@ -742,7 +742,7 @@ if ($op eq "additem") {
} elsif ($op eq "delinkitem"){
my $analyticfield = '773';
if ($marcflavour eq 'MARC21' || $marcflavour eq 'NORMARC'){
if ($marcflavour eq 'MARC21'){
$analyticfield = '773';
} elsif ($marcflavour eq 'UNIMARC') {
$analyticfield = '461';

2
cataloguing/linkitem.pl

@ -45,7 +45,7 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user(
my $biblio = GetMarcBiblio({ biblionumber => $biblionumber });
my $marcflavour = C4::Context->preference("marcflavour");
$marcflavour ||="MARC21";
if ($marcflavour eq 'MARC21' || $marcflavour eq 'NORMARC') {
if ($marcflavour eq 'MARC21') {
$template->param(bibliotitle => $biblio->subfield('245','a'));
} elsif ($marcflavour eq 'UNIMARC') {
$template->param(bibliotitle => $biblio->subfield('200','a'));

137
cataloguing/value_builder/normarc_field_007.pl

@ -1,137 +0,0 @@
#!/usr/bin/perl
# Copyright 2009 Magnus Enger Libriotech
#
# This file is part of Koha.
#
# Koha is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# Koha is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <http://www.gnu.org/licenses>.
use Modern::Perl;
use C4::Auth qw( get_template_and_user );
use CGI qw ( -utf8 );
use C4::Context;
use C4::Search;
use C4::Output qw( output_html_with_http_headers );
sub plugin_javascript {
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
my $function_name= $field_number;
my $res="
<script>
function Clic$function_name(i) {
defaultvalue=document.getElementById(\"$field_number\").value;
newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=normarc_field_007.pl&index=$field_number&result=\"+defaultvalue,\"unimarc field 100\",'width=1000,height=600,toolbar=false,scrollbars=yes');
}
</script>
";
return ($function_name,$res);
}
sub plugin {
my ($input) = @_;
my $index= $input->param('index');
my $result= $input->param('result');
my $dbh = C4::Context->dbh;
my ($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => "cataloguing/value_builder/normarc_field_007.tt",
query => $input,
type => "intranet",
flagsrequired => {editcatalogue => 1},
});
$result = "ta" unless $result;
my $f0 = substr($result,0,1);
my $f1 = substr($result,1,4);
#added new parameters to allow for all material types
my $f2 = substr($result,2,1);
my $f3 = substr($result,3,1);
my $f4 = substr($result,4,1);
my $f5 = substr($result,5,1);
my $f6 = substr($result,6,1);
my $f7 = substr($result,7,1);
my $f8 = substr($result,8,1);
my $f9 = substr($result,9,1);
my $f10 = substr($result,10,1);
my $f11 = substr($result,11,1);
my $f12 = substr($result,12,1);
my $f13 = substr($result,13,1);
my $f14 = substr($result,14,1);
my $f15 = substr($result,15,1);
my $f16 = substr($result,16,1);
my $f17 = substr($result,17,1);
my $f18 = substr($result,18,1);
my $f19 = substr($result,19,1);
my $f20 = substr($result,20,1);
my $f21 = substr($result,21,1);
my $f22 = substr($result,22,1);
#FIXME: There is probably a more-elegant way to do this!
#FIXME: Two of the material types treat position 06, 07, and 08 as a single
#three-char field. This script works fine for creating values and sending them
#back to the MARC, but if there is already a value in the 007, it won't send
#it properly to the value builder for those two instances. Not sure how to solve.
$template->param( index => $index,
f0 => $f0,
"f0$f0" => $f0,
f1 => $f1,
"f1$f1" => $f1,
f2 => $f2,
"f2$f2" => $f2,
f3 => $f3,
"f3$f3" => $f3,
f4 => $f4,
"f4$f4" => $f4,
f5 => $f5,
"f5$f5" => $f5,
f6 => $f6,
"f6$f6" => $f6,
f7 => $f7,
"f7$f7" => $f7,
f8 => $f8,
"f8$f8" => $f8,
f9 => $f9,
"f9$f9" => $f9,
f10 => $f10,
"f10$f10" => $f10,
f11 => $f11,
"f11$f11" => $f11,
f12 => $f12,
"f12$f12" => $f12,
f13 => $f13,
"f13$f13" => $f13,
f14 => $f14,
"f14$f14" => $f14,
f15 => $f15,
"f15$f15" => $f15,
f16 => $f16,
"f16$f16" => $f16,
f17 => $f17,
"f17$f17" => $f17,
f18 => $f18,
"f18$f18" => $f18,
f19 => $f19,
"f19$f19" => $f19,
f20 => $f20,
"f20$f20" => $f20,
f21 => $f21,
"f21$f21" => $f21,
f22 => $f22,
"f22$f22" => $f22,
);
output_html_with_http_headers $input, $cookie, $template->output;
}

169
cataloguing/value_builder/normarc_field_008.pl

@ -1,169 +0,0 @@
#!/usr/bin/perl
# Copyright 2009 Magnus Enger Libriotech
#
# This file is part of Koha.
#
# Koha is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# Koha is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <http://www.gnu.org/licenses>.
use Modern::Perl;
use C4::Auth qw( get_template_and_user );
use CGI qw ( -utf8 );
use C4::Context;
use C4::Search;
use C4::Output qw( output_html_with_http_headers );
# find today's date
my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
$year += 1900;
$mon += 1;
my $dateentered = substr($year, 2, 2) . sprintf("%0.2d", $mon) . sprintf("%0.2d", $mday);
sub plugin_javascript {
my $lang = C4::Context->preference('DefaultLanguageField008' );
$lang = "eng" unless $lang;
$lang = pack("A3", $lang);
my ($dbh, $record, $tagslib, $field_number, $tabloop) = @_;
my $function_name = $field_number;
my $res = "
<script>
function Focus$function_name(subfield_managed) {
if ( document.getElementById(\"$field_number\").value ) {
}
else {
document.getElementById(\"$field_number\").value='$dateentered' + 't no ||||| |||| 00| 0 $lang d';
}
return 1;
}
function Clic$function_name(i) {
defaultvalue=document.getElementById(\"$field_number\").value;
defaultvalue=defaultvalue.replace(/ /g, \"+\");
newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=normarc_field_008.pl&index=$field_number&result=\"+defaultvalue,\"unimarc field 100\",'width=1000,height=600,toolbar=false,scrollbars=yes');
}
</script>
";
return ($function_name, $res);
}
sub plugin {
my $lang = C4::Context->preference('DefaultLanguageField008' );
$lang = "eng" unless $lang;
$lang = pack("A3", $lang);
my ($input) = @_;
my $index = $input->param('index');
my $result = $input->param('result');
my $dbh = C4::Context->dbh;
my ($template, $loggedinuser, $cookie) = get_template_and_user(
{ template_name => "cataloguing/value_builder/normarc_field_008.tt",
query => $input,
type => "intranet",
flagsrequired => { editcatalogue => 1 },
}
);
# $result = " t xxu 00 0 eng d" unless $result;
$result = "$dateentered" . "t no ||||| |||| 00| 0 $lang d" unless $result;
my $f1 = substr($result, 0, 6);
my $f6 = substr($result, 6, 1);
my $f710 = substr($result, 7, 4);
my $f1114 = substr($result, 11, 4);
my $f1517 = substr($result, 15, 3);
my $f18 = substr($result, 18, 1);
my $f19 = substr($result, 19, 1);
my $f20 = substr($result, 20, 1);
my $f21 = substr($result, 21, 1);
my $f22 = substr($result, 22, 1);
my $f23 = substr($result, 23, 1);
my $f24 = substr($result, 24, 1);
my $f25 = substr($result, 25, 1);
my $f26 = substr($result, 26, 1);
my $f27 = substr($result, 27, 1);
my $f28 = substr($result, 28, 1);
my $f29 = substr($result, 29, 1);
my $f30 = substr($result, 30, 1);
my $f31 = substr($result, 31, 1);
my $f32 = substr($result, 32, 1);
my $f33 = substr($result, 33, 1);
my $f34 = substr($result, 34, 1);
my $f3537 = substr($result, 35, 3);
my $f38 = substr($result, 38, 1);
my $f39 = substr($result, 39, 1);
# bug 2563
$f710 = "" if ($f710 =~ /^\s*$/);
$f1114 = "" if ($f1114 =~ /^\s*$/);
if ((!$f1) || ($f1 =~ m/ /)) {
$f1 = $dateentered;
}
$template->param(
index => $index,
f1 => $f1,
f6 => $f6,
"f6$f6" => $f6,
f710 => $f710,
f1114 => $f1114,
f1517 => $f1517,
f18 => $f18,
"f18$f18" => $f18,
f19 => $f19,
"f19$f19" => $f19,
f20 => $f20,
"f20$f20" => $f20,
f21 => $f21,
"f21$f21" => $f21,
f22 => $f22,
"f22$f22" => $f22,
f23 => $f23,
"f23$f23" => $f23,
f24 => $f24,
"f24$f24" => $f24,
f25 => $f25,
"f25$f25" => $f25,
f26 => $f26,
"f26$f26" => $f26,
f27 => $f27,
"f27$f27" => $f27,
f28 => $f28,
"f28$f28" => $f28,
f29 => $f29,
"f29$f29" => $f29,
f30 => $f30,
"f30$f30" => $f30,
f31 => $f31,
"f31$f31" => $f31,
f32 => $f32,
"f32$f32" => $f32,
f33 => $f33,
"f33$f33" => $f33,
f34 => $f34,
"f34$f34" => $f34,
f3537 => $f3537,
f38 => $f38,
"f38$f38" => $f38,
f39 => $f39,
"f39$f39" => $f39,
);
output_html_with_http_headers $input, $cookie, $template->output;
}

87
cataloguing/value_builder/normarc_leader.pl

@ -1,87 +0,0 @@
#!/usr/bin/perl
# Copyright 2000-2002 Katipo Communications
#
# This file is part of Koha.
#
# Koha is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# Koha is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <http://www.gnu.org/licenses>.
use Modern::Perl;
use C4::Auth qw( get_template_and_user );
use CGI qw ( -utf8 );
use C4::Context;
use C4::Search;
use C4::Output qw( output_html_with_http_headers );
sub plugin_javascript {
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
my $function_name= $field_number;
my $res="
<script>
function Focus$function_name(subfield_managed) {
if(!document.getElementById(\"$field_number\").value){
document.getElementById(\"$field_number\").value = ' nam a22 1 4500';
}
return 1;
}
function Clic$function_name(i) {
defaultvalue=document.getElementById(\"$field_number\").value;
newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=normarc_leader.pl&index=$field_number&result=\"+defaultvalue,\"unimarc field 100\",'width=1000,height=600,toolbar=false,scrollbars=yes');
}
</script>
";
return ($function_name,$res);
}
sub plugin {
my ($input) = @_;
my $index= $input->param('index');
my $result= $input->param('result');
my $dbh = C4::Context->dbh;
my ($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => "cataloguing/value_builder/normarc_leader.tt",
query => $input,
type => "intranet",
flagsrequired => {editcatalogue => 1},
});
$result = " nam a22 1 4500" unless $result;
my $f5 = substr($result,5,1);
my $f6 = substr($result,6,1);
my $f7 = substr($result,7,1);
my $f8 = substr($result,8,1);
my $f17 = substr($result,17,1);
my $f18 = substr($result,18,1);
my $f19 = substr($result,19,1);
my $f2023 = substr($result,20,4);
$template->param(index => $index,
"f5$f5" => 1,
"f6$f6" => 1,
"f7$f7" => 1,
"f8$f8" => 1,
"f17$f17" => 1,
"f18$f18" => 1,
"f19$f19" => 1,
"f2023" => $f2023,
);
output_html_with_http_headers $input, $cookie, $template->output;
}

4
debian/docs/koha-create.xml

@ -25,7 +25,7 @@
<cmdsynopsis>
<command>koha-create</command>
<arg choice="req"><option>--create-db</option>|<option>--request-db</option>|<option>--populate-db</option>|<option>--use-db</option></arg>
<arg><option>--marcflavor</option> marc21|normarc|unimarc</arg>
<arg><option>--marcflavor</option> marc21|unimarc</arg>
<arg><option>--zebralang</option> el|en|es|fr|nb|ru|uk</arg>
<arg><option>--memcached-servers</option> server:port</arg>
<arg><option>--memcached-prefix</option> namespace_prefix</arg>
@ -401,7 +401,7 @@
<varlistentry>
<term><option>ZEBRA_MARC_FORMAT</option></term>
<listitem>
<para>Specifies format of MARC records to be indexed by Zebra. Possible values are 'marc21', 'normarc' and 'unimarc'.</para>
<para>Specifies format of MARC records to be indexed by Zebra. Possible values are 'marc21' and 'unimarc'.</para>
</listitem>
</varlistentry>

2
debian/scripts/koha-create

@ -50,7 +50,7 @@ DB usage mode:
Options:
--marcflavor flavor Set the MARC flavor. Valid values are marc21 (default),
normarc and unimarc.
and unimarc.
--zebralang lang Choose the primary language for Zebra indexing. Valid
values are cs, el, en (default), es, fr, nb, ru and uk.
--elasticsearch-server s Enforce the use of the specified Elasticsearch server(s)

1
debian/scripts/koha-translate

@ -172,7 +172,6 @@ check_lang_po_files()
lang=$1
po_files="$PO_DIR/$lang-marc-MARC21.po
$PO_DIR/$lang-marc-NORMARC.po
$PO_DIR/$lang-marc-UNIMARC.po
$PO_DIR/$lang-opac-bootstrap.po
$PO_DIR/$lang-pref.po

2
debian/templates/koha-sites.conf

@ -23,7 +23,7 @@ DEFAULTSQL=""
## Zebra global configuration variables
#
# ZEBRA_MARC_FORMAT: 'marc21' | 'normarc' | 'unimarc'
# ZEBRA_MARC_FORMAT: 'marc21' | 'unimarc'
# Specifies the MARC records format for indexing
# default: 'marc21'
ZEBRA_MARC_FORMAT="marc21"

22
debian/templates/normarc-retrieval-info-auth-dom.xml

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<retrievalinfo xmlns="http://indexdata.com/yaz">
<retrieval syntax="normarc" name="F">
<backend syntax="xml" name="marc">
<marc inputformat="xml" outputformat="marc"
inputcharset="utf-8"
outputcharset="utf-8"/>
</backend>
</retrieval>
<retrieval syntax="normarc" name="B">
<backend syntax="xml" name="marc">
<marc inputformat="xml" outputformat="marc"
inputcharset="utf-8"
outputcharset="utf-8"/>
</backend>
</retrieval>
<retrieval syntax="xml" name="index"/> <!-- allow viewing index entries -->
<retrieval syntax="xml" name="marc"
identifier="info:srw/schema/1/marcxml-v1.1"/>
<retrieval syntax="xml" name="marcxml"
identifier="info:srw/schema/1/marcxml-v1.1"/>
</retrievalinfo>

23
debian/templates/normarc-retrieval-info-bib-dom.xml

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<retrievalinfo xmlns="http://indexdata.com/yaz">
<retrieval syntax="normarc" name="F">
<backend syntax="xml" name="marc">
<marc inputformat="xml" outputformat="marc"
inputcharset="utf-8"
outputcharset="utf-8"/>
</backend>
</retrieval>
<retrieval syntax="normarc" name="B">
<backend syntax="xml" name="marc">
<marc inputformat="xml" outputformat="marc"
inputcharset="utf-8"
outputcharset="utf-8"/>
</backend>
</retrieval>
<retrieval syntax="xml"/>
<retrieval syntax="xml" name="index"/> <!-- allow viewing index entries -->
<retrieval syntax="xml" name="marc"
identifier="info:srw/schema/1/marcxml-v1.1"/>
<retrieval syntax="xml" name="marcxml"
identifier="info:srw/schema/1/marcxml-v1.1"/>
</retrievalinfo>

2
etc/zebradb/etc/normarc.mar

@ -1,2 +0,0 @@
name normarc
reference normarc

12
gulpfile.js

@ -91,11 +91,6 @@ const poTasks = {
create: po_create_marc_marc21,
update: po_update_marc_marc21,
},
'marc-NORMARC': {
extract: po_extract_marc_normarc,
create: po_create_marc_normarc,
update: po_update_marc_normarc,
},
'marc-UNIMARC': {
extract: po_extract_marc_unimarc,
create: po_create_marc_unimarc,
@ -147,7 +142,6 @@ function po_extract_marc (type) {
}
function po_extract_marc_marc21 () { return po_extract_marc('MARC21') }
function po_extract_marc_normarc () { return po_extract_marc('NORMARC') }
function po_extract_marc_unimarc () { return po_extract_marc('UNIMARC') }
function po_extract_staff () {
@ -157,10 +151,8 @@ function po_extract_staff () {
'koha-tmpl/intranet-tmpl/prog/en/xslt/*.xsl',
'koha-tmpl/intranet-tmpl/prog/en/columns.def',
'!koha-tmpl/intranet-tmpl/prog/en/**/*MARC21*',
'!koha-tmpl/intranet-tmpl/prog/en/**/*NORMARC*',
'!koha-tmpl/intranet-tmpl/prog/en/**/*UNIMARC*',
'!koha-tmpl/intranet-tmpl/prog/en/**/*marc21*',
'!koha-tmpl/intranet-tmpl/prog/en/**/*normarc*',
'!koha-tmpl/intranet-tmpl/prog/en/**/*unimarc*',
];
@ -175,10 +167,8 @@ function po_extract_opac () {
'koha-tmpl/opac-tmpl/bootstrap/en/**/*.inc',
'koha-tmpl/opac-tmpl/bootstrap/en/xslt/*.xsl',
'!koha-tmpl/opac-tmpl/bootstrap/en/**/*MARC21*',
'!koha-tmpl/opac-tmpl/bootstrap/en/**/*NORMARC*',
'!koha-tmpl/opac-tmpl/bootstrap/en/**/*UNIMARC*',
'!koha-tmpl/opac-tmpl/bootstrap/en/**/*marc21*',
'!koha-tmpl/opac-tmpl/bootstrap/en/**/*normarc*',
'!koha-tmpl/opac-tmpl/bootstrap/en/**/*unimarc*',
];
@ -272,7 +262,6 @@ function po_create_type (type) {
}
function po_create_marc_marc21 () { return po_create_type('marc-MARC21') }
function po_create_marc_normarc () { return po_create_type('marc-NORMARC') }
function po_create_marc_unimarc () { return po_create_type('marc-UNIMARC') }
function po_create_staff () { return po_create_type('staff-prog') }
function po_create_opac () { return po_create_type('opac-bootstrap') }
@ -294,7 +283,6 @@ function po_update_type (type) {
}
function po_update_marc_marc21 () { return po_update_type('marc-MARC21') }
function po_update_marc_normarc () { return po_update_type('marc-NORMARC') }
function po_update_marc_unimarc () { return po_update_type('marc-UNIMARC') }
function po_update_staff () { return po_update_type('staff-prog') }
function po_update_opac () { return po_update_type('opac-bootstrap') }

2
installer/data/mysql/kohastructure.sql

@ -4498,7 +4498,7 @@ DROP TABLE IF EXISTS `search_marc_map`;
CREATE TABLE `search_marc_map` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`index_name` enum('biblios','authorities') COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'what storage index this map is for',
`marc_type` enum('marc21','unimarc','normarc') COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'what MARC type this map is for',
`marc_type` enum('marc21','unimarc') COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'what MARC type this map is for',
`marc_field` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'the MARC specifier for this field',
PRIMARY KEY (`id`),
UNIQUE KEY `index_name` (`index_name`,`marc_field`(191),`marc_type`),

1011
installer/data/mysql/nb-NO/marcflavour/normarc/Obligatorisk/normarc.sql

File diff suppressed because it is too large

1
installer/data/mysql/nb-NO/marcflavour/normarc/Obligatorisk/normarc.txt

@ -1 +0,0 @@
Komplett rammeverk for NORMARC.

127
installer/data/mysql/nb-NO/marcflavour/normarc/Valgfritt/normarc_fastadd_framework.sql

@ -1,127 +0,0 @@
-- This file is part of Koha.
--
-- Copyright 2011 Magnus Enger Libriotech
--
-- Koha is free software; you can redistribute it and/or modify it
-- under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- Koha is distributed in the hope that it will be useful, but
-- WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with Koha; if not, see <http://www.gnu.org/licenses>.
INSERT IGNORE INTO biblio_framework VALUES ( 'FA','Hurtigkatalogisering' );
DELETE FROM marc_tag_structure WHERE frameworkcode='FA';
INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('000','Postens hode','Postens hode','0','1','','FA');
INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('001','Identifikasjonsnummer','Identifikasjonsnummer','0','0','','FA');
INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('008','Informasjonskoder','Informasjonskoder','0','0','','FA');
INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('015','Andre bibliografiske kontrollnummer (R)','Andre bibliografiske kontrollnummer (R)','1','0','','FA');
INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('020','Internasjonalt standard boknummer (ISBN)','Internasjonalt standard boknummer (ISBN)','1','0','','FA');
INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('024','Andre standardnumre','Andre standardnumre','0','0','','FA');
INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('025','Europeisk artikkelnummer (EAN)','Europeisk artikkelnummer (EAN)','0','0','','FA');
INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('100','Hovedordningsord personnavn','Hovedordningsord personnavn','0','0','','FA');
INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('245','Tittel og ansvarsopplysninger','Tittel og ansvarsopplysninger','0','0','','FA');
INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('250','Utgave','Utgave','0','0','','FA');
INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('260','Utgivelse, distribusjon osv','Utgivelse, distribusjon osv','0','0','','FA');
INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('300','Fysisk beskrivelse','Fysisk beskrivelse','0','0','','FA');
INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('500','Generell note (R)','Generell note (R)','1','0','','FA');
INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('942','Andre opplysninger (Koha)','Andre opplysninger (Koha)','0','0','','FA');
INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('952','Eksemplarinformasjon (Koha)','Eksemplarinformasjon (Koha)','1','0','','FA');
INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('999','Kontrollnummer (Koha)','Kontrollnummer (Koha)','1','0','','FA');
DELETE FROM marc_subfield_structure WHERE frameworkcode='FA';
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('000','@','Postens hode','Postens hode','0','1','','0','','','normarc_leader.pl','0','-1','FA','','','','24');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('001','@','Identifikasjonsnummer','Identifikasjonsnummer','0','0','','0','','','','0','-1','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('008','@','Informasjonskoder','Informasjonskoder','0','0','','0','','','normarc_field_008.pl','0','-1','FA','','','','40');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('015','a','Nummer','Nummer','0','0','0','0','','','','0','-1','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('015','b','Kilde','Kilde','0','0','0','0','','','','0','-1','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('020','a','ISBN','ISBN','0','0','biblioitems.isbn','0','','','','0','-1','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('020','b','Innbindingsinformasjon','Innbindingsinformasjon','0','0','0','0','','','','0','-1','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('020','c','Leveringsbetingelser','Leveringsbetingelser','0','0','0','0','','','','0','-1','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('020','g','Andre tilf','Andre tilf','0','0','0','0','','','','0','-1','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('020','z','Feil ISBN','Feil ISBN','0','0','0','0','','','','0','-1','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('024','a','Standardnummer','Standardnummer','0','0','0','0','','','','0','-1','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('024','c','Leveringsbetingelser','Leveringsbetingelser','0','0','0','0','','','','0','-1','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('024','g','Andre tilføyelser','Andre tilføyelser','0','0','0','0','','','','0','-1','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('024','z','Feil standardnummer','Feil standardnummer','0','0','0','0','','','','0','-1','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('025','a','Nummer','Nummer','0','0','0','0','','','','0','-1','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('100','8','Andre karakteristika forbundet med navn','Andre karakteristika forbundet med navn','0','0','0','1','','','','0','0','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('100','a','Navn','Navn','0','0','biblio.author','1','','','','0','0','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('100','b','Nummer','Nummer','0','0','0','1','','','','0','0','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('100','c','Andre tilføyelser','Andre tilføyelser','0','0','0','1','','','','0','0','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('100','d','Årstall forbundet med navn','Årstall forbundet med navn','0','0','0','1','','','','0','0','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('100','e','Betegnelse for funksjon','Betegnelse for funksjon','0','0','0','1','','','','0','0','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('100','j','Nasjonalitet','Nasjonalitet','0','0','0','1','','','','0','0','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('100','q','Mer fullstendig navneform','Mer fullstendig navneform','0','0','0','1','','','','0','0','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('100','w','Sorteringsdelfelt for delfelt $a','Sorteringsdelfelt for delfelt $a','0','0','0','1','','','','0','0','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('245','a','Tittel','Tittel','0','0','biblio.title','2','','','','0','0','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('245','b','Annen tittelinformasjon','Annen tittelinformasjon','0','0','biblio.subtitle','2','','','','0','0','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('245','c','Ansvarsangivelse','Ansvarsangivelse','0','0','0','2','','','','0','0','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('245','h','Generell materialbetegnelse','Generell materialbetegnelse','0','0','0','2','','','','0','0','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('250','a','Utgave, opplag etc','Utgave, opplag etc','0','0','biblioitems.editionstatement','2','','','','0','-1','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('250','b','Ansvarshavende','Ansvarshavende','0','0','0','2','','','','0','-1','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('260','a','Sted (R)','Sted (R)','1','0','biblioitems.place','2','','','','0','-1','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('260','b','Navn p','Navn p','0','0','biblioitems.publishercode','2','','','','0','-1','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('260','c','År','År','0','0','biblio.copyrightdate','2','','','','0','-1','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('260','e','Trykkested eller produksjonssted','Trykkested eller produksjonssted','0','0','0','2','','','','0','-1','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('260','f','Trykkeriets eller produsentens navn','Trykkeriets eller produsentens navn','0','0','0','2','','','','0','-1','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('260','g','Trykkeår eller produksjonsår','Trykkeår eller produksjonsår','0','0','0','2','','','','0','-1','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('300','a','Omfang','Omfang','0','0','biblioitems.pages','3','','','','0','0','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('300','b','Illustrasjonsmateriale og andre fysiske detaljer','Illustrasjonsmateriale og andre fysiske detaljer','0','0','biblioitems.illus','3','','','','0','0','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('300','c','Format','Format','0','0','biblioitems.size','3','','','','0','0','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('300','e','Bilag','Bilag','0','0','0','3','','','','0','0','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('500','a','Notens tekst','Notens tekst','0','0','biblio.notes','5','','','','0','0','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('942','0','Antall utlån','Antall utlån','0','0','biblioitems.totalissues','9','','','','0','-5','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('942','2','Kilde for klassifikasjon','Kilde for klassifikasjon','0','0','biblioitems.cn_source','9','','','','0','-1','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('942','6','Koha normalisert klassifikasjon for sortering','Koha normalisert klassifikasjon for sortering','0','0','biblioitems.cn_sort','-1','','','','0','7','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('942','c','Koha [standard] dokumenttype','Koha dokumenttype','0','1','biblioitems.itemtype','9','itemtypes','','','0','-1','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('942','e','Utgave','Utgave','0','0','','9','','','','0','-1','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('942','h','Klassifikasjon del','Klassifikasjon del','0','0','biblioitems.cn_class','9','','','','0','-1','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) VALUES ('942','i','Eksemplar del','Eksemplar del','1','0','biblioitems.cn_item','9','','','','0','-1','FA','','','','9999');
INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac