|
Lines 172-184
my ($template, $loggedinuser, $cookie)
Link Here
|
| 172 |
|
172 |
|
| 173 |
my $authid = $query->param('authid'); |
173 |
my $authid = $query->param('authid'); |
| 174 |
|
174 |
|
| 175 |
|
|
|
| 176 |
|
| 177 |
# Using default authtypecode, so all fields are seen |
175 |
# Using default authtypecode, so all fields are seen |
| 178 |
my $authtypecode = ''; |
176 |
my $authtypecode = ''; |
| 179 |
$tagslib = &GetTagsLabels(1,$authtypecode); |
177 |
$tagslib = &GetTagsLabels(1,$authtypecode); |
| 180 |
|
178 |
|
| 181 |
my $record; |
179 |
# Build list of authtypes for showing them |
|
|
180 |
my $authtypes = getauthtypes; |
| 181 |
my @authtypesloop; |
| 182 |
|
| 183 |
foreach my $thisauthtype (sort { $authtypes->{$b} cmp $authtypes->{$a} } keys %$authtypes) { |
| 184 |
my %row =(value => $thisauthtype, |
| 185 |
selected => $thisauthtype eq $authtypecode, |
| 186 |
authtypetext => $authtypes->{$thisauthtype}{'authtypetext'}, |
| 187 |
); |
| 188 |
push @authtypesloop, \%row; |
| 189 |
} |
| 190 |
|
| 191 |
my $record=GetAuthority($authid); |
| 192 |
|
| 193 |
if (not defined $record) { |
| 194 |
# authid invalid |
| 195 |
$template->param ( errauthid => $authid, |
| 196 |
unknownauthid => 1, |
| 197 |
authtypesloop => \@authtypesloop ); |
| 198 |
output_html_with_http_headers $query, $cookie, $template->output; |
| 199 |
exit; |
| 200 |
} |
| 201 |
|
| 182 |
if (C4::Context->preference("AuthDisplayHierarchy")){ |
202 |
if (C4::Context->preference("AuthDisplayHierarchy")){ |
| 183 |
my $trees=BuildUnimarcHierarchies($authid); |
203 |
my $trees=BuildUnimarcHierarchies($authid); |
| 184 |
my @trees = split /;/,$trees ; |
204 |
my @trees = split /;/,$trees ; |
|
Lines 201-209
if (C4::Context->preference("AuthDisplayHierarchy")){
Link Here
|
| 201 |
'displayhierarchy' =>C4::Context->preference("AuthDisplayHierarchy"), |
221 |
'displayhierarchy' =>C4::Context->preference("AuthDisplayHierarchy"), |
| 202 |
'loophierarchies' =>\@loophierarchies, |
222 |
'loophierarchies' =>\@loophierarchies, |
| 203 |
); |
223 |
); |
| 204 |
} else { |
|
|
| 205 |
$record=GetAuthority($authid); |
| 206 |
} |
224 |
} |
|
|
225 |
|
| 207 |
my $count = CountUsage($authid); |
226 |
my $count = CountUsage($authid); |
| 208 |
|
227 |
|
| 209 |
# find the marc field/subfield used in biblio by this authority |
228 |
# find the marc field/subfield used in biblio by this authority |
|
Lines 215-238
while (my ($tagfield) = $sth->fetchrow) {
Link Here
|
| 215 |
} |
234 |
} |
| 216 |
chop $biblio_fields; |
235 |
chop $biblio_fields; |
| 217 |
|
236 |
|
| 218 |
|
237 |
build_tabs ($template, $record, $dbh,"",$query); |
| 219 |
# fill arrays |
|
|
| 220 |
my @loop_data =(); |
| 221 |
my $tag; |
| 222 |
# loop through each tab 0 through 9 |
| 223 |
# for (my $tabloop = 0; $tabloop<=10;$tabloop++) { |
| 224 |
# loop through each tag |
| 225 |
build_tabs ($template, $record, $dbh,"",$query); |
| 226 |
|
| 227 |
my $authtypes = getauthtypes; |
| 228 |
my @authtypesloop; |
| 229 |
foreach my $thisauthtype (sort { $authtypes->{$b} cmp $authtypes->{$a} } keys %$authtypes) { |
| 230 |
my %row =(value => $thisauthtype, |
| 231 |
selected => $thisauthtype eq $authtypecode, |
| 232 |
authtypetext => $authtypes->{$thisauthtype}{'authtypetext'}, |
| 233 |
); |
| 234 |
push @authtypesloop, \%row; |
| 235 |
} |
| 236 |
|
238 |
|
| 237 |
$template->param(authid => $authid, |
239 |
$template->param(authid => $authid, |
| 238 |
count => $count, |
240 |
count => $count, |