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

(-)a/authorities/auth_finder.pl (+23 lines)
Lines 135-140 if ( $op eq "do_search" ) { Link Here
135
        $to = ( ( $startfrom + 1 ) * $resultsperpage );
135
        $to = ( ( $startfrom + 1 ) * $resultsperpage );
136
    }
136
    }
137
137
138
    my $AuthorityXSLTResultsDisplay = C4::Context->preference('AuthorityXSLTResultsDisplay');
139
    if ($results && $AuthorityXSLTResultsDisplay) {
140
        my $lang = C4::Languages::getlanguage();
141
        foreach my $result (@$results) {
142
            my $authority = Koha::Authorities->find($result->{authid});
143
            next unless $authority;
144
145
            my $authtypecode = $authority->authtypecode;
146
            my $xsl = $AuthorityXSLTResultsDisplay;
147
            $xsl =~ s/\{langcode\}/$lang/g;
148
            $xsl =~ s/\{authtypecode\}/$authtypecode/g;
149
150
            my $xslt_engine = Koha::XSLT::Base->new;
151
            my $output = $xslt_engine->transform({ xml => $authority->marcxml, file => $xsl });
152
            if ($xslt_engine->err) {
153
                warn "XSL transformation failed ($xsl): " . $xslt_engine->err;
154
                next;
155
            }
156
157
            $result->{html} = $output;
158
        }
159
    }
160
138
    $template->param( result => $results ) if $results;
161
    $template->param( result => $results ) if $results;
139
    $template->param(
162
    $template->param(
140
        orderby          => $orderby,
163
        orderby          => $orderby,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt (-2 / +7 lines)
Lines 50-56 Link Here
50
                </tr>
50
                </tr>
51
                [% FOREACH resul IN result %]
51
                [% FOREACH resul IN result %]
52
                    <tr>
52
                    <tr>
53
                        <td>[% PROCESS authresult summary=resul.summary authid=resul.authid %]</td>
53
                        <td>
54
                            [% IF resul.html %]
55
                                [% resul.html | $raw %]
56
                            [% ELSE %]
57
                                [% PROCESS authresult summary=resul.summary authid=resul.authid %]
58
                            [% END %]
59
                        </td>
54
                        <td>[% resul.summary.label | html %]</td>
60
                        <td>[% resul.summary.label | html %]</td>
55
                        <td>[% resul.used | html %] times</td>
61
                        <td>[% resul.used | html %] times</td>
56
                        <td>
62
                        <td>
57
- 

Return to bug 30554