From 2292d21387c73770aa76d4ea9e1065aed5f6892f Mon Sep 17 00:00:00 2001
From: hdl
/g;
- } else {
- my $heading; # = $authref->{summary};
- my $altheading;
- my $seeheading;
- my $see;
- my @fields = $record->fields();
- if (C4::Context->preference('marcflavour') eq 'UNIMARC') {
- # construct UNIMARC summary, that is quite different from MARC21 one
- # accepted form
- foreach my $field ($record->field('2..')) {
- $heading.= $field->as_string();
- }
- # rejected form(s)
- foreach my $field ($record->field('4..')) {
- $summary.= " ".$field->as_string()."
";
- $summary.= " see: ".$heading."
";
- }
- # see :
- foreach my $field ($record->field('5..')) {
- $summary.= " ".$field->as_string()."
";
- $summary.= " see: ".$heading."
";
- }
- # // form
- foreach my $field ($record->field('7..')) {
- $seeheading.= " see also: ".$field->as_string()."
";
- $altheading.= " ".$field->as_string()."
";
- $altheading.= " see also: ".$heading."
";
- }
- $summary = "".$heading."
".$seeheading.$altheading.$summary;
+ } else {
+ my $heading;
+ my $authid;
+ my $altheading;
+ my $seealso;
+ my $broaderterms;
+ my $narrowerterms;
+ my $see;
+ my $seeheading;
+ my $notes;
+ my @fields = $record->fields();
+ if (C4::Context->preference('marcflavour') eq 'UNIMARC') {
+ # construct UNIMARC summary, that is quite different from MARC21 one
+ # accepted form
+ foreach my $field ($record->field('2..')) {
+ $heading.= $field->subfield('a');
+ $authid=$field->subfield('3');
+ }
+ # rejected form(s)
+ foreach my $field ($record->field('3..')) {
+ $notes.= ''.$field->subfield('a')."\n";
+ }
+ foreach my $field ($record->field('4..')) {
+ my $thesaurus = "thes. : ".$thesaurus{"$field->subfield('2')"}." : " if ($field->subfield('2'));
+ $see.= ''.$thesaurus.$field->subfield('a')." -- \n";
+ }
+ # see :
+ foreach my $field ($record->field('5..')) {
+
+ if (($field->subfield('5')) && ($field->subfield('a')) && ($field->subfield('5') eq 'g')) {
+ $broaderterms.= ' '.$field->subfield('a')." -- \n";
+ } elsif (($field->subfield('5')) && ($field->subfield('a')) && ($field->subfield('5') eq 'h')){
+ $narrowerterms.= ''.$field->subfield('a')." -- \n";
+ } elsif ($field->subfield('a')) {
+ $seealso.= ''.$field->subfield('a')." -- \n";
+ }
+ }
+ # // form
+ foreach my $field ($record->field('7..')) {
+ my $lang = substr($field->subfield('8'),3,3);
+ $seeheading.= ' En '.$language{$lang}.' : '.$field->subfield('a')."
\n";
+ }
+ $broaderterms =~s/-- \n$//;
+ $narrowerterms =~s/-- \n$//;
+ $seealso =~s/-- \n$//;
+ $see =~s/-- \n$//;
+ $summary = "".$heading."
".($notes?"$notes
":"");
+ $summary.= '