|
Lines 886-891
sub BuildSummary {
Link Here
|
| 886 |
my @seefrom; |
886 |
my @seefrom; |
| 887 |
my @seealso; |
887 |
my @seealso; |
| 888 |
my @otherscript; |
888 |
my @otherscript; |
|
|
889 |
my @equalterm; |
| 890 |
|
| 889 |
if (C4::Context->preference('marcflavour') eq 'UNIMARC') { |
891 |
if (C4::Context->preference('marcflavour') eq 'UNIMARC') { |
| 890 |
# construct UNIMARC summary, that is quite different from MARC21 one |
892 |
# construct UNIMARC summary, that is quite different from MARC21 one |
| 891 |
# accepted form |
893 |
# accepted form |
|
Lines 939-944
sub BuildSummary {
Link Here
|
| 939 |
use C4::Heading::MARC21; |
941 |
use C4::Heading::MARC21; |
| 940 |
my $handler = C4::Heading::MARC21->new(); |
942 |
my $handler = C4::Heading::MARC21->new(); |
| 941 |
my $subfields_to_report; |
943 |
my $subfields_to_report; |
|
|
944 |
my $subfields_to_subdivision=""; |
| 945 |
my $delimiter = " -- "; |
| 942 |
foreach my $field ($record->field('1..')) { |
946 |
foreach my $field ($record->field('1..')) { |
| 943 |
my $tag = $field->tag(); |
947 |
my $tag = $field->tag(); |
| 944 |
next if "152" eq $tag; |
948 |
next if "152" eq $tag; |
|
Lines 1015-1020
sub BuildSummary {
Link Here
|
| 1015 |
foreach my $field ($record->field('6..')) { |
1019 |
foreach my $field ($record->field('6..')) { |
| 1016 |
push @notes, { note => $field->as_string(), field => $field->tag() }; |
1020 |
push @notes, { note => $field->as_string(), field => $field->tag() }; |
| 1017 |
} |
1021 |
} |
|
|
1022 |
|
| 1023 |
foreach my $field ($record->field('7..')) |
| 1024 |
{ |
| 1025 |
my $tag = $field->tag(); |
| 1026 |
|
| 1027 |
if ($tag eq '700') { |
| 1028 |
$subfields_to_report = 'abcdefghjklmnopqrst'; |
| 1029 |
$subfields_to_subdivision='vxyz'; |
| 1030 |
$delimiter=" -- "; |
| 1031 |
} elsif ($tag eq '710') { |
| 1032 |
$subfields_to_report = 'abcdefghklmnoprst'; |
| 1033 |
$subfields_to_subdivision='vxyz'; |
| 1034 |
$delimiter=" -- "; |
| 1035 |
} elsif ($tag eq '711') { |
| 1036 |
$subfields_to_report = 'acdefghklnpqst'; |
| 1037 |
$subfields_to_subdivision='vxyz'; |
| 1038 |
$delimiter=" -- "; |
| 1039 |
} elsif ($tag eq '730') { |
| 1040 |
$subfields_to_report = 'adfghklmnoprst'; |
| 1041 |
$subfields_to_subdivision='vxyz'; |
| 1042 |
$delimiter=" -- "; |
| 1043 |
} elsif ($tag eq '748') { |
| 1044 |
$subfields_to_report = 'ab'; |
| 1045 |
$subfields_to_subdivision='vxyz'; |
| 1046 |
$delimiter=" -- "; |
| 1047 |
} elsif ($tag eq '750') { |
| 1048 |
$subfields_to_report = 'ab'; |
| 1049 |
$subfields_to_subdivision='vxyz'; |
| 1050 |
$delimiter=" -- "; |
| 1051 |
} elsif ($tag eq '751') { |
| 1052 |
$subfields_to_report = 'a'; |
| 1053 |
$subfields_to_subdivision='vxyz'; |
| 1054 |
$delimiter=" -- "; |
| 1055 |
} elsif ($tag eq '755') { |
| 1056 |
$subfields_to_report = 'abvxyz'; |
| 1057 |
$subfields_to_subdivision='vxyz'; |
| 1058 |
$delimiter=" -- "; |
| 1059 |
} elsif ($tag eq '780') { |
| 1060 |
$subfields_to_report = 'vxyz'; |
| 1061 |
$delimiter=" "; |
| 1062 |
} elsif ($tag eq '781') { |
| 1063 |
$subfields_to_report = 'vxyz'; |
| 1064 |
$delimiter=" "; |
| 1065 |
} elsif ($tag eq '782') { |
| 1066 |
$subfields_to_report = 'vxyz'; |
| 1067 |
$delimiter=" "; |
| 1068 |
} elsif ($tag eq '785') { |
| 1069 |
$subfields_to_report = 'vxyz'; |
| 1070 |
$delimiter=" "; |
| 1071 |
} |
| 1072 |
|
| 1073 |
my $heading = $field->as_string($subfields_to_report); |
| 1074 |
|
| 1075 |
my $subheading = $field->as_string($subfields_to_subdivision,$delimiter); |
| 1076 |
if(length $subheading > 0 ) |
| 1077 |
{ |
| 1078 |
$heading.=$delimiter.$subheading; |
| 1079 |
} |
| 1080 |
|
| 1081 |
if ($subfields_to_report) { |
| 1082 |
push @equalterm, { |
| 1083 |
heading => $heading, |
| 1084 |
hemain => ( $field->subfield( substr($subfields_to_report, 0, 1) ) // undef ), |
| 1085 |
field => $tag, |
| 1086 |
}; |
| 1087 |
} else { |
| 1088 |
push @equalterm, { |
| 1089 |
heading => $field->as_string(), |
| 1090 |
hemain => ( $field->subfield( 'a' ) // undef ), |
| 1091 |
field => $tag, |
| 1092 |
}; |
| 1093 |
} |
| 1094 |
} |
| 1095 |
|
| 1018 |
foreach my $field ($record->field('880')) { |
1096 |
foreach my $field ($record->field('880')) { |
| 1019 |
my $linkage = $field->subfield('6'); |
1097 |
my $linkage = $field->subfield('6'); |
| 1020 |
my $category = substr $linkage, 0, 1; |
1098 |
my $category = substr $linkage, 0, 1; |
|
Lines 1042-1047
sub BuildSummary {
Link Here
|
| 1042 |
$summary{seefrom} = \@seefrom; |
1120 |
$summary{seefrom} = \@seefrom; |
| 1043 |
$summary{seealso} = \@seealso; |
1121 |
$summary{seealso} = \@seealso; |
| 1044 |
$summary{otherscript} = \@otherscript; |
1122 |
$summary{otherscript} = \@otherscript; |
|
|
1123 |
$summary{equalterm} = \@equalterm; |
| 1045 |
return \%summary; |
1124 |
return \%summary; |
| 1046 |
} |
1125 |
} |
| 1047 |
|
1126 |
|