Lines 77-82
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
Link Here
|
77 |
|
77 |
|
78 |
# fill arrays |
78 |
# fill arrays |
79 |
my @subfield_loop; |
79 |
my @subfield_loop; |
|
|
80 |
my ($indicator1, $indicator2); |
80 |
if ($authid) { |
81 |
if ($authid) { |
81 |
my @fields = $record->field( $auth_type->{auth_tag_to_report} ); |
82 |
my @fields = $record->field( $auth_type->{auth_tag_to_report} ); |
82 |
my $repet = ($query->param('repet') || 1) - 1; |
83 |
my $repet = ($query->param('repet') || 1) - 1; |
Lines 99-104
if ($authid) {
Link Here
|
99 |
} |
100 |
} |
100 |
|
101 |
|
101 |
push( @subfield_loop, { marc_subfield => 'w', marc_values => $relationship } ) if ( $relationship ); |
102 |
push( @subfield_loop, { marc_subfield => 'w', marc_values => $relationship } ) if ( $relationship ); |
|
|
103 |
if (C4::Context->preference('marcflavour') eq 'UNIMARC') { |
104 |
$indicator1 = $field->indicator('1'); |
105 |
$indicator2 = $field->indicator('2'); |
106 |
} elsif (C4::Context->preference('marcflavour') eq 'MARC21') { |
107 |
my $tag_from = $auth_type->{auth_tag_to_report}; |
108 |
my $tag_to = $index; |
109 |
$tag_to =~ s/^tag_(\d*)_.*$/$1/; |
110 |
if ($tag_to =~ /^6/) { # subject heading |
111 |
my %thes_mapping = qw / a 0 |
112 |
b 1 |
113 |
c 2 |
114 |
d 3 |
115 |
k 5 |
116 |
n 4 |
117 |
r 7 |
118 |
s 7 |
119 |
v 6 |
120 |
z 7 |
121 |
| 4 /; |
122 |
my $thes_008_11 = ''; |
123 |
$thes_008_11 = substr($record->field('008')->data(), 11, 1) if $record->field('008')->data(); |
124 |
$indicator2 = defined $thes_mapping{$thes_008_11} ? $thes_mapping{$thes_008_11} : $thes_008_11; |
125 |
if ($indicator2 eq '7') { |
126 |
if ($thes_008_11 eq 'r') { |
127 |
$subfields{'2'} = ['aat']; |
128 |
} elsif ($thes_008_11 eq 's') { |
129 |
$subfields{'2'} = ['sears']; |
130 |
} |
131 |
} |
132 |
} |
133 |
if ($tag_from eq '130') { # unified title -- the special case |
134 |
if ($tag_to eq '830' || $tag_to eq '240') { |
135 |
$indicator2 = $field->indicator('2'); |
136 |
} else { |
137 |
$indicator1 = $field->indicator('2'); |
138 |
} |
139 |
} else { |
140 |
$indicator1 = $field->indicator('1'); |
141 |
} |
142 |
} |
102 |
} |
143 |
} |
103 |
else { |
144 |
else { |
104 |
# authid is empty => the user want to empty the entry. |
145 |
# authid is empty => the user want to empty the entry. |
Lines 113-118
$template->param(
Link Here
|
113 |
authid => $authid ? $authid : "", |
154 |
authid => $authid ? $authid : "", |
114 |
index => $index, |
155 |
index => $index, |
115 |
tagid => $tagid, |
156 |
tagid => $tagid, |
|
|
157 |
indicator1 => $indicator1, |
158 |
indicator2 => $indicator2, |
116 |
SUBFIELD_LOOP => \@subfield_loop, |
159 |
SUBFIELD_LOOP => \@subfield_loop, |
117 |
tag_number => $tag_number, |
160 |
tag_number => $tag_number, |
118 |
); |
161 |
); |