Lines 40-45
use Modern::Perl;
Link Here
|
40 |
|
40 |
|
41 |
use C4::AuthoritiesMarc; |
41 |
use C4::AuthoritiesMarc; |
42 |
use C4::Auth; |
42 |
use C4::Auth; |
|
|
43 |
use C4::Biblio; |
43 |
use C4::Context; |
44 |
use C4::Context; |
44 |
use C4::Output; |
45 |
use C4::Output; |
45 |
use CGI qw ( -utf8 ); |
46 |
use CGI qw ( -utf8 ); |
Lines 54-59
my $query = new CGI;
Link Here
|
54 |
my $dbh = C4::Context->dbh; |
55 |
my $dbh = C4::Context->dbh; |
55 |
|
56 |
|
56 |
my $display_hierarchy = C4::Context->preference("AuthDisplayHierarchy"); |
57 |
my $display_hierarchy = C4::Context->preference("AuthDisplayHierarchy"); |
|
|
58 |
my $marcflavour = C4::Context->preference("marcflavour"); |
57 |
my $show_marc = $query->param('marc'); |
59 |
my $show_marc = $query->param('marc'); |
58 |
|
60 |
|
59 |
# open template |
61 |
# open template |
Lines 86-96
if ($display_hierarchy){
Link Here
|
86 |
my $count = $authority ? $authority->get_usage_count : 0; |
88 |
my $count = $authority ? $authority->get_usage_count : 0; |
87 |
|
89 |
|
88 |
my $authority_types = Koha::Authority::Types->search( {}, { order_by => ['authtypecode'] } ); |
90 |
my $authority_types = Koha::Authority::Types->search( {}, { order_by => ['authtypecode'] } ); |
|
|
91 |
my $marcurlsarray = GetMarcUrls( $record, $marcflavour ); |
92 |
|
89 |
$template->param( |
93 |
$template->param( |
90 |
authority_types => $authority_types, |
94 |
authority_types => $authority_types, |
91 |
authtypetext => $authority_types->find($authtypecode)->authtypetext, |
95 |
authtypetext => $authority_types->find($authtypecode)->authtypetext, |
92 |
authid => $authid, |
96 |
authid => $authid, |
93 |
count => $count, |
97 |
count => $count, |
|
|
98 |
MARCURLS => $marcurlsarray, |
94 |
); |
99 |
); |
95 |
|
100 |
|
96 |
# find the marc field/subfield used in biblio by this authority |
101 |
# find the marc field/subfield used in biblio by this authority |
Lines 117-123
if ($show_marc) {
Link Here
|
117 |
my @subfields_data; |
122 |
my @subfields_data; |
118 |
|
123 |
|
119 |
# skip UNIMARC fields <200, they are useless for a patron |
124 |
# skip UNIMARC fields <200, they are useless for a patron |
120 |
next if C4::Context->preference('marcflavour') eq 'UNIMARC' && $field->tag() <200; |
125 |
next if $marcflavour eq 'UNIMARC' && $field->tag() <200; |
121 |
|
126 |
|
122 |
# if tag <10, there's no subfield, use the "@" trick |
127 |
# if tag <10, there's no subfield, use the "@" trick |
123 |
if ( $field->tag() < 10 ) { |
128 |
if ( $field->tag() < 10 ) { |
Lines 129-135
if ($show_marc) {
Link Here
|
129 |
$subfield_data{marc_tag} = $field->tag(); |
134 |
$subfield_data{marc_tag} = $field->tag(); |
130 |
push( @subfields_data, \%subfield_data ); |
135 |
push( @subfields_data, \%subfield_data ); |
131 |
} |
136 |
} |
132 |
elsif ( C4::Context->preference('marcflavour') eq 'MARC21' && $field->tag() eq 667 ) { |
137 |
elsif ( $marcflavour eq 'MARC21' && $field->tag() eq 667 ) { |
133 |
# tagfield 667 is a nonpublic general note in MARC21, which shouldn't be shown in the OPAC |
138 |
# tagfield 667 is a nonpublic general note in MARC21, which shouldn't be shown in the OPAC |
134 |
} |
139 |
} |
135 |
else { |
140 |
else { |
136 |
- |
|
|