View | Details | Raw Unified | Return to bug 21871
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-detail.tt (+34 lines)
Lines 109-114 Link Here
109
                            </div>
109
                            </div>
110
                        [% END %]
110
                        [% END %]
111
111
112
                        [% IF ( MARCURLS ) %]
113
                            <div class="authstanza online_resources">
114
                                <span class="label">Online resources:</span>
115
                                <ul>
116
                                    [% FOREACH MARCurl IN MARCURLS %]
117
                                        <li>[% IF ( MARCurl.part ) %][% MARCurl.part | html %]<br />[% END %]
118
119
                                        [% IF ( OPACURLOpenInNewWindow ) %]
120
                                            [% IF trackclicks == 'track' || trackclicks == 'anonymous' %]
121
                                                <a href="/cgi-bin/koha/tracklinks.pl?uri=[% MARCurl.MARCURL | uri %]&amp;biblionumber=[% biblio.biblionumber | uri %]" title="[% MARCurl.MARCURL | html %]" target="_blank" rel="noreferrer">
122
                                            [% ELSE %]
123
                                                <a href="[% MARCurl.MARCURL | url %]" title="[% MARCurl.MARCURL | html %]" target="_blank" rel="noreferrer">
124
                                            [% END %]
125
                                        [% ELSE %]
126
                                            [% IF trackclicks == 'track' || trackclicks == 'anonymous' %]
127
                                                <a href="/cgi-bin/koha/tracklinks.pl?uri=[% MARCurl.MARCURL | uri %]&amp;biblionumber=[% biblio.biblionumber | uri %]" title="[% MARCurl.MARCURL | html %]">
128
                                            [% ELSE %]
129
                                                <a href="[% MARCurl.MARCURL | url %]" title="[% MARCurl.MARCURL | html %]">
130
                                            [% END %]
131
                                        [% END %]
132
                                        [% MARCurl.linktext | html %]</a>
133
                                            [% IF ( MARCurl.notes ) %]
134
                                                <ul>
135
                                                    [% FOREACH note IN MARCurl.notes %]
136
                                                        <li>[% note.note | html %]</li>
137
                                                    [% END %]
138
                                                </ul>
139
                                            [% END %]
140
                                        </li>
141
                                    [% END # /FOREACH MARCURLS %]
142
                                </ul>
143
                            </div>
144
                        [% END # / IF MARCURLS %]
145
112
                        <div id="authdescriptions" class="toptabs">
146
                        <div id="authdescriptions" class="toptabs">
113
                            <ul>
147
                            <ul>
114
                                <li id="tab_descriptions"><a href="#descriptions">Notes</a></li>
148
                                <li id="tab_descriptions"><a href="#descriptions">Notes</a></li>
(-)a/opac/opac-authoritiesdetail.pl (-3 / +7 lines)
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
- 

Return to bug 21871