|
Lines 875-880
sub BuildSummary {
Link Here
|
| 875 |
my @seefrom; |
875 |
my @seefrom; |
| 876 |
my @seealso; |
876 |
my @seealso; |
| 877 |
my @otherscript; |
877 |
my @otherscript; |
|
|
878 |
my @equalterm; |
| 879 |
|
| 878 |
if (C4::Context->preference('marcflavour') eq 'UNIMARC') { |
880 |
if (C4::Context->preference('marcflavour') eq 'UNIMARC') { |
| 879 |
# construct UNIMARC summary, that is quite different from MARC21 one |
881 |
# construct UNIMARC summary, that is quite different from MARC21 one |
| 880 |
# accepted form |
882 |
# accepted form |
|
Lines 928-933
sub BuildSummary {
Link Here
|
| 928 |
use C4::Heading::MARC21; |
930 |
use C4::Heading::MARC21; |
| 929 |
my $handler = C4::Heading::MARC21->new(); |
931 |
my $handler = C4::Heading::MARC21->new(); |
| 930 |
my $subfields_to_report; |
932 |
my $subfields_to_report; |
|
|
933 |
my $subfields_to_subdivision=""; |
| 934 |
my $delimiter = " -- "; |
| 931 |
foreach my $field ($record->field('1..')) { |
935 |
foreach my $field ($record->field('1..')) { |
| 932 |
my $tag = $field->tag(); |
936 |
my $tag = $field->tag(); |
| 933 |
next if "152" eq $tag; |
937 |
next if "152" eq $tag; |
|
Lines 1004-1009
sub BuildSummary {
Link Here
|
| 1004 |
foreach my $field ($record->field('6..')) { |
1008 |
foreach my $field ($record->field('6..')) { |
| 1005 |
push @notes, { note => $field->as_string(), field => $field->tag() }; |
1009 |
push @notes, { note => $field->as_string(), field => $field->tag() }; |
| 1006 |
} |
1010 |
} |
|
|
1011 |
|
| 1012 |
foreach my $field ($record->field('7..')) |
| 1013 |
{ |
| 1014 |
my $tag = $field->tag(); |
| 1015 |
|
| 1016 |
if ($tag eq '700') { |
| 1017 |
$subfields_to_report = 'abcdefghjklmnopqrst'; |
| 1018 |
$subfields_to_subdivision='vxyz'; |
| 1019 |
$delimiter=" -- "; |
| 1020 |
} elsif ($tag eq '710') { |
| 1021 |
$subfields_to_report = 'abcdefghklmnoprst'; |
| 1022 |
$subfields_to_subdivision='vxyz'; |
| 1023 |
$delimiter=" -- "; |
| 1024 |
} elsif ($tag eq '711') { |
| 1025 |
$subfields_to_report = 'acdefghklnpqst'; |
| 1026 |
$subfields_to_subdivision='vxyz'; |
| 1027 |
$delimiter=" -- "; |
| 1028 |
} elsif ($tag eq '730') { |
| 1029 |
$subfields_to_report = 'adfghklmnoprst'; |
| 1030 |
$subfields_to_subdivision='vxyz'; |
| 1031 |
$delimiter=" -- "; |
| 1032 |
} elsif ($tag eq '748') { |
| 1033 |
$subfields_to_report = 'ab'; |
| 1034 |
$subfields_to_subdivision='vxyz'; |
| 1035 |
$delimiter=" -- "; |
| 1036 |
} elsif ($tag eq '750') { |
| 1037 |
$subfields_to_report = 'ab'; |
| 1038 |
$subfields_to_subdivision='vxyz'; |
| 1039 |
$delimiter=" -- "; |
| 1040 |
} elsif ($tag eq '751') { |
| 1041 |
$subfields_to_report = 'a'; |
| 1042 |
$subfields_to_subdivision='vxyz'; |
| 1043 |
$delimiter=" -- "; |
| 1044 |
} elsif ($tag eq '755') { |
| 1045 |
$subfields_to_report = 'abvxyz'; |
| 1046 |
$subfields_to_subdivision='vxyz'; |
| 1047 |
$delimiter=" -- "; |
| 1048 |
} elsif ($tag eq '780') { |
| 1049 |
$subfields_to_report = 'vxyz'; |
| 1050 |
$delimiter=" "; |
| 1051 |
} elsif ($tag eq '781') { |
| 1052 |
$subfields_to_report = 'vxyz'; |
| 1053 |
$delimiter=" "; |
| 1054 |
} elsif ($tag eq '782') { |
| 1055 |
$subfields_to_report = 'vxyz'; |
| 1056 |
$delimiter=" "; |
| 1057 |
} elsif ($tag eq '785') { |
| 1058 |
$subfields_to_report = 'vxyz'; |
| 1059 |
$delimiter=" "; |
| 1060 |
} |
| 1061 |
|
| 1062 |
my $heading = $field->as_string($subfields_to_report); |
| 1063 |
|
| 1064 |
my $subheading = $field->as_string($subfields_to_subdivision,$delimiter); |
| 1065 |
if(length $subheading > 0 ) |
| 1066 |
{ |
| 1067 |
$heading.=$delimiter.$subheading; |
| 1068 |
} |
| 1069 |
|
| 1070 |
if ($subfields_to_report) { |
| 1071 |
push @equalterm, { |
| 1072 |
heading => $heading, |
| 1073 |
hemain => ( $field->subfield( substr($subfields_to_report, 0, 1) ) // undef ), |
| 1074 |
field => $tag, |
| 1075 |
}; |
| 1076 |
} else { |
| 1077 |
push @equalterm, { |
| 1078 |
heading => $field->as_string(), |
| 1079 |
hemain => ( $field->subfield( 'a' ) // undef ), |
| 1080 |
field => $tag, |
| 1081 |
}; |
| 1082 |
} |
| 1083 |
} |
| 1084 |
|
| 1007 |
foreach my $field ($record->field('880')) { |
1085 |
foreach my $field ($record->field('880')) { |
| 1008 |
my $linkage = $field->subfield('6'); |
1086 |
my $linkage = $field->subfield('6'); |
| 1009 |
my $category = substr $linkage, 0, 1; |
1087 |
my $category = substr $linkage, 0, 1; |
|
Lines 1031-1036
sub BuildSummary {
Link Here
|
| 1031 |
$summary{seefrom} = \@seefrom; |
1109 |
$summary{seefrom} = \@seefrom; |
| 1032 |
$summary{seealso} = \@seealso; |
1110 |
$summary{seealso} = \@seealso; |
| 1033 |
$summary{otherscript} = \@otherscript; |
1111 |
$summary{otherscript} = \@otherscript; |
|
|
1112 |
$summary{equalterm} = \@equalterm; |
| 1034 |
return \%summary; |
1113 |
return \%summary; |
| 1035 |
} |
1114 |
} |
| 1036 |
|
1115 |
|