Lines 57-64
my $dbh = C4::Context->dbh;
Link Here
|
57 |
my $authid = $query->param('authid'); |
57 |
my $authid = $query->param('authid'); |
58 |
my $index = $query->param('index'); |
58 |
my $index = $query->param('index'); |
59 |
my $tagid = $query->param('tagid'); |
59 |
my $tagid = $query->param('tagid'); |
|
|
60 |
my $source = $query->param('source'); |
60 |
my $relationship = $query->param('relationship'); |
61 |
my $relationship = $query->param('relationship'); |
61 |
|
62 |
|
|
|
63 |
my $marcflavour = C4::Context->preference("marcflavour"); |
64 |
|
62 |
# open template |
65 |
# open template |
63 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
66 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
64 |
{ |
67 |
{ |
Lines 89-95
if ($authid) {
Link Here
|
89 |
# Get all values for each distinct subfield and add to subfield loop |
92 |
# Get all values for each distinct subfield and add to subfield loop |
90 |
my %done_subfields; |
93 |
my %done_subfields; |
91 |
for ( $field->subfields ) { |
94 |
for ( $field->subfields ) { |
92 |
next if $_->[0] eq '9'; # $9 will be set with authid value |
95 |
next if $_->[0] eq '3'; # $3 will be set with authid value (in UNIMARC authorities) |
|
|
96 |
next if $_->[0] eq '9'; # $9 will be set with authid value (in MARC21/NORMARC authorities and also MARC21/NORMARC/UNIMARC biblios) |
93 |
my $letter = $_->[0]; |
97 |
my $letter = $_->[0]; |
94 |
$letter ||= '@'; |
98 |
$letter ||= '@'; |
95 |
next if defined $done_subfields{$letter}; |
99 |
next if defined $done_subfields{$letter}; |
Lines 98-104
if ($authid) {
Link Here
|
98 |
$done_subfields{$letter} = 1; |
102 |
$done_subfields{$letter} = 1; |
99 |
} |
103 |
} |
100 |
|
104 |
|
101 |
push( @subfield_loop, { marc_subfield => 'w', marc_values => $relationship } ) if ( $relationship ); |
105 |
# If a relationship code has been selected, add it to the appropriate |
|
|
106 |
# subfield of @subfield_loop, depending on the MARC flavour being used. |
107 |
if ( $relationship ) { |
108 |
my $relationship_subfield; |
109 |
if ( $marcflavour eq 'UNIMARC' ) { |
110 |
$relationship_subfield = '5'; |
111 |
} elsif ( $marcflavour eq 'MARC21' || $marcflavour eq 'NORMARC' ) { |
112 |
$relationship_subfield = 'w'; |
113 |
} |
114 |
push( @subfield_loop, { marc_subfield => $relationship_subfield, marc_values => $relationship } ) ; |
115 |
} |
102 |
|
116 |
|
103 |
my $controlled_ind = $auth->controlled_indicators({ record => $record, biblio_tag => $tag_number }); |
117 |
my $controlled_ind = $auth->controlled_indicators({ record => $record, biblio_tag => $tag_number }); |
104 |
$indicator1 = $controlled_ind->{ind1}; |
118 |
$indicator1 = $controlled_ind->{ind1}; |
Lines 112-120
if ($authid) {
Link Here
|
112 |
$template->param( "clear" => 1 ); |
126 |
$template->param( "clear" => 1 ); |
113 |
} |
127 |
} |
114 |
|
128 |
|
115 |
|
|
|
116 |
|
117 |
$template->param( |
129 |
$template->param( |
|
|
130 |
source => $source, |
131 |
marcflavour => $marcflavour, |
118 |
authid => $authid ? $authid : "", |
132 |
authid => $authid ? $authid : "", |
119 |
index => $index, |
133 |
index => $index, |
120 |
tagid => $tagid, |
134 |
tagid => $tagid, |