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