Lines 936-941
sub BuildSummary {
Link Here
|
936 |
my @seefrom; |
936 |
my @seefrom; |
937 |
my @seealso; |
937 |
my @seealso; |
938 |
my @otherscript; |
938 |
my @otherscript; |
|
|
939 |
my @equalterm; |
940 |
|
939 |
if (C4::Context->preference('marcflavour') eq 'UNIMARC') { |
941 |
if (C4::Context->preference('marcflavour') eq 'UNIMARC') { |
940 |
# construct UNIMARC summary, that is quite different from MARC21 one |
942 |
# construct UNIMARC summary, that is quite different from MARC21 one |
941 |
# accepted form |
943 |
# accepted form |
Lines 989-994
sub BuildSummary {
Link Here
|
989 |
use C4::Heading::MARC21; |
991 |
use C4::Heading::MARC21; |
990 |
my $handler = C4::Heading::MARC21->new(); |
992 |
my $handler = C4::Heading::MARC21->new(); |
991 |
my $subfields_to_report; |
993 |
my $subfields_to_report; |
|
|
994 |
my $subfields_to_subdivision=""; |
995 |
my $delimiter = " -- "; |
992 |
foreach my $field ($record->field('1..')) { |
996 |
foreach my $field ($record->field('1..')) { |
993 |
my $tag = $field->tag(); |
997 |
my $tag = $field->tag(); |
994 |
next if "152" eq $tag; |
998 |
next if "152" eq $tag; |
Lines 1065-1070
sub BuildSummary {
Link Here
|
1065 |
foreach my $field ($record->field('6..')) { |
1069 |
foreach my $field ($record->field('6..')) { |
1066 |
push @notes, { note => $field->as_string(), field => $field->tag() }; |
1070 |
push @notes, { note => $field->as_string(), field => $field->tag() }; |
1067 |
} |
1071 |
} |
|
|
1072 |
|
1073 |
foreach my $field ($record->field('7..')) |
1074 |
{ |
1075 |
my $tag = $field->tag(); |
1076 |
|
1077 |
if ($tag eq '700') { |
1078 |
$subfields_to_report = 'abcdefghjklmnopqrst'; |
1079 |
$subfields_to_subdivision='vxyz'; |
1080 |
$delimiter=" -- "; |
1081 |
} elsif ($tag eq '710') { |
1082 |
$subfields_to_report = 'abcdefghklmnoprst'; |
1083 |
$subfields_to_subdivision='vxyz'; |
1084 |
$delimiter=" -- "; |
1085 |
} elsif ($tag eq '711') { |
1086 |
$subfields_to_report = 'acdefghklnpqst'; |
1087 |
$subfields_to_subdivision='vxyz'; |
1088 |
$delimiter=" -- "; |
1089 |
} elsif ($tag eq '730') { |
1090 |
$subfields_to_report = 'adfghklmnoprst'; |
1091 |
$subfields_to_subdivision='vxyz'; |
1092 |
$delimiter=" -- "; |
1093 |
} elsif ($tag eq '748') { |
1094 |
$subfields_to_report = 'ab'; |
1095 |
$subfields_to_subdivision='vxyz'; |
1096 |
$delimiter=" -- "; |
1097 |
} elsif ($tag eq '750') { |
1098 |
$subfields_to_report = 'ab'; |
1099 |
$subfields_to_subdivision='vxyz'; |
1100 |
$delimiter=" -- "; |
1101 |
} elsif ($tag eq '751') { |
1102 |
$subfields_to_report = 'a'; |
1103 |
$subfields_to_subdivision='vxyz'; |
1104 |
$delimiter=" -- "; |
1105 |
} elsif ($tag eq '755') { |
1106 |
$subfields_to_report = 'abvxyz'; |
1107 |
$subfields_to_subdivision='vxyz'; |
1108 |
$delimiter=" -- "; |
1109 |
} elsif ($tag eq '780') { |
1110 |
$subfields_to_report = 'vxyz'; |
1111 |
$delimiter=" "; |
1112 |
} elsif ($tag eq '781') { |
1113 |
$subfields_to_report = 'vxyz'; |
1114 |
$delimiter=" "; |
1115 |
} elsif ($tag eq '782') { |
1116 |
$subfields_to_report = 'vxyz'; |
1117 |
$delimiter=" "; |
1118 |
} elsif ($tag eq '785') { |
1119 |
$subfields_to_report = 'vxyz'; |
1120 |
$delimiter=" "; |
1121 |
} |
1122 |
|
1123 |
my $heading = $field->as_string($subfields_to_report); |
1124 |
|
1125 |
my $subheading = $field->as_string($subfields_to_subdivision,$delimiter); |
1126 |
if(length $subheading > 0 ) |
1127 |
{ |
1128 |
$heading.=$delimiter.$subheading; |
1129 |
} |
1130 |
|
1131 |
if ($subfields_to_report) { |
1132 |
push @equalterm, { |
1133 |
heading => $heading, |
1134 |
hemain => ( $field->subfield( substr($subfields_to_report, 0, 1) ) // undef ), |
1135 |
field => $tag, |
1136 |
}; |
1137 |
} else { |
1138 |
push @equalterm, { |
1139 |
heading => $field->as_string(), |
1140 |
hemain => ( $field->subfield( 'a' ) // undef ), |
1141 |
field => $tag, |
1142 |
}; |
1143 |
} |
1144 |
} |
1145 |
|
1068 |
foreach my $field ($record->field('880')) { |
1146 |
foreach my $field ($record->field('880')) { |
1069 |
my $linkage = $field->subfield('6'); |
1147 |
my $linkage = $field->subfield('6'); |
1070 |
my $category = substr $linkage, 0, 1; |
1148 |
my $category = substr $linkage, 0, 1; |
Lines 1092-1097
sub BuildSummary {
Link Here
|
1092 |
$summary{seefrom} = \@seefrom; |
1170 |
$summary{seefrom} = \@seefrom; |
1093 |
$summary{seealso} = \@seealso; |
1171 |
$summary{seealso} = \@seealso; |
1094 |
$summary{otherscript} = \@otherscript; |
1172 |
$summary{otherscript} = \@otherscript; |
|
|
1173 |
$summary{equalterm} = \@equalterm; |
1095 |
return \%summary; |
1174 |
return \%summary; |
1096 |
} |
1175 |
} |
1097 |
|
1176 |
|