From 02f7b83406904f5e54b41c1b34f6cbe7c2e5a23b Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 28 Dec 2007 22:27:41 -0600 Subject: [PATCH] MARC21 authorities: fixed 008 value builder Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- .../marc21_field_008_authorities.pl | 97 +- .../marc21_field_008_authorities.tmpl | 1309 +++++++++-------- 2 files changed, 764 insertions(+), 642 deletions(-) diff --git a/cataloguing/value_builder/marc21_field_008_authorities.pl b/cataloguing/value_builder/marc21_field_008_authorities.pl index 8c26accc50..1aae045808 100755 --- a/cataloguing/value_builder/marc21_field_008_authorities.pl +++ b/cataloguing/value_builder/marc21_field_008_authorities.pl @@ -1,4 +1,3 @@ - #!/usr/bin/perl @@ -51,7 +50,9 @@ sub plugin_javascript { // @@ -79,31 +80,32 @@ sub plugin { my $dbh = C4::Context->dbh; my ($template, $loggedinuser, $cookie) - = get_template_and_user({template_name => "cataloguing/value_builder/marc21_field_008.tmpl", + = get_template_and_user({template_name => "cataloguing/value_builder/marc21_field_008_authorities.tmpl", query => $input, type => "intranet", authnotrequired => 0, flagsrequired => {editcatalogue => 1}, debug => 1, }); -# $result = " t xxu 00 0 eng d" unless $result; - $result = "$dateentered"."t xxu||||| |||| 00| 0 eng d" unless $result; + $result = "$dateentered".'|| aca||aabn | a|a 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 $f1821 = substr($result,18,4); - my $f22 = substr($result,22,1); - my $f23 = substr($result,23,1); - my $f2427 = substr($result,24,4); + 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 $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,2); 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); @@ -115,33 +117,42 @@ if ((!$f1) ||($f1 =~ m/ /)){ f1 => $f1, f6 => $f6, "f6$f6" => $f6, - f710 => $f710, - f1114 => $f1114, - f1517 => $f1517, - f1821 => $f1821, - f22 => $f22, - "f22$f22" => $f22, - f23 => $f23, - "f23$f23" => $f23, - f2427 => $f2427, - "f24$f2427" => $f2427, - f28 => $f28, - "f28$f28" => $f28, - f29 => $f29, - "f29$f29" => $f29, - f30 => $f30, - "f230$f30" => $f30, - f31 => $f31, - "f31$f31" => $f31, - f33 => $f33, - "f33$f33" => $f33, - f34 => $f34, - "f34$f34" => $f34, - f3537 => $f3537, - f38 => $f38, - "f38$f38" => $f38, - f39 => $f39, - "f39$f39" => $f39, + 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, + f28 => $f28, + "f28$f28" => $f28, + f29 => $f29, + "f29$f29" => $f29, + f31 => $f31, + "f31$f31" => $f31, + f32 => $f32, + "f32$f32" => $f32, + f33 => $f33, + "f33$f33" => $f33, + f38 => $f38, + "f38$f38" => $f38, + f39 => $f39, + "f39$f39" => $f39, ); output_html_with_http_headers $input, $cookie, $template->output; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008_authorities.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008_authorities.tmpl index b8bd53cb55..2753436ef2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008_authorities.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008_authorities.tmpl @@ -7,601 +7,707 @@ - - + + + " type="hidden" /> - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1-5 Date entered on file(auto-filled)00-05- Date entered on file
06- Type of date / Publication Status06- Direct or indirect geographic subdivision - -
7-10 Date1 / Begininning date of publication - "/> -
11-14 Date2 / ending date of publication - "/>
15-17 Place of publication, production, or execution - "/> -
18-21 Illustrations (auto-filled from 300)"/>
22- Target Audience - -
23- Form of an item - -
24-27 Nature of contents (Derived value) - "/>
28- Government Publication - -
29- Conference publication - -
30- Festschrift - -
31- Index - -
32 Undefined
33- Literary form - -
34- Biography - -
35-37 Language see MARC Code List for Languages - "/> -
38- Modified Record - - -
39- Cataloging source - -
07- Romanization scheme + +
08- Language of catalog + +
09- Kind of record + +
10- Descriptive cataloging rules + +
11- Subject heading system/thesaurus + +
12- Type of series + +
13- Numbered or unnumbered series + +
14- Heading use--main or added entry + +
15- Heading use--subject added entry + +
16- Heading use--series added entry + +
17- Type of subject subdivision + +
18-27 Undefined character positions
28- Type of government agency + +
29- Reference evaluation + +
30 Undefined character position
31- Record update in process + +
32- Undifferentiated personal name + +
33- Level of establishment + +
34-37 Undefined character positions
38- Modified record + +
39- Cataloging source + +
@@ -611,22 +717,27 @@ function report() { var field = doc.getElementById(""); field.value = - ''+ + document.f_pop.f1.value+ document.f_pop.f6.value+ - document.f_pop.f710.value+ - document.f_pop.f1114.value+ - document.f_pop.f1517.value+ - document.f_pop.f1821.value+ - document.f_pop.f22.value+ - document.f_pop.f23.value+ - document.f_pop.f2427.value+ + document.f_pop.f7.value+ + document.f_pop.f8.value+ + document.f_pop.f9.value+ + document.f_pop.f10.value+ + document.f_pop.f11.value+ + document.f_pop.f12.value+ + document.f_pop.f13.value+ + document.f_pop.f14.value+ + document.f_pop.f15.value+ + document.f_pop.f16.value+ + document.f_pop.f17.value+ + ' '+ document.f_pop.f28.value+ document.f_pop.f29.value+ - document.f_pop.f30.value+ - document.f_pop.f31.value+ ' '+ + ' '+ + document.f_pop.f31.value+ + document.f_pop.f32.value+ document.f_pop.f33.value+ - document.f_pop.f34.value+ - document.f_pop.f3537.value+ + ' '+ document.f_pop.f38.value+ document.f_pop.f39.value; self.close(); -- 2.39.2