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

(-)a/C4/Search.pm (-1 / +6 lines)
Lines 2017-2029 sub searchResults { Link Here
2017
                    ),
2017
                    ),
2018
                    fix_amps       => 1,
2018
                    fix_amps       => 1,
2019
                    hidden_items   => \@hiddenitems,
2019
                    hidden_items   => \@hiddenitems,
2020
                    xslt_variables => $xslt_variables
2020
                    xslt_variables => $xslt_variables,
2021
                    interface => $search_context->{'interface'}
2021
                }
2022
                }
2022
            );
2023
            );
2023
        }
2024
        }
2024
2025
2025
        my $biblio_object = Koha::Biblios->find( $oldbiblio->{biblionumber} );
2026
        my $biblio_object = Koha::Biblios->find( $oldbiblio->{biblionumber} );
2026
        $oldbiblio->{biblio_object} = $biblio_object;
2027
        $oldbiblio->{biblio_object} = $biblio_object;
2028
        $oldbiblio->{coins} = eval { $biblio_object->get_coins }
2029
          if $biblio_object
2030
          && C4::Context->preference('COinSinOPACResults')
2031
          && $is_opac;
2027
2032
2028
        my $can_place_holds = 1;
2033
        my $can_place_holds = 1;
2029
        # if biblio level itypes are used and itemtype is notforloan, it can't be reserved either
2034
        # if biblio level itypes are used and itemtype is notforloan, it can't be reserved either
(-)a/C4/XSLT.pm (-1 / +2 lines)
Lines 179-184 sub XSLTParse4Display { Link Here
179
    my $hidden_items = $params->{hidden_items} || [];
179
    my $hidden_items = $params->{hidden_items} || [];
180
    my $variables    = $params->{xslt_variables};
180
    my $variables    = $params->{xslt_variables};
181
    my $items_rs     = $params->{items_rs};
181
    my $items_rs     = $params->{items_rs};
182
    my $interface    = $params->{interface};
182
183
183
    die "Mandatory \$params->{xsl_syspref} was not provided, called with biblionumber $params->{biblionumber}"
184
    die "Mandatory \$params->{xsl_syspref} was not provided, called with biblionumber $params->{biblionumber}"
184
        if not defined $params->{xsl_syspref};
185
        if not defined $params->{xsl_syspref};
Lines 208-214 sub XSLTParse4Display { Link Here
208
209
209
    $variables ||= {};
210
    $variables ||= {};
210
    my $biblio;
211
    my $biblio;
211
    if (C4::Context->preference('OPACShowOpenURL')) {
212
    if ( $interface eq 'opac' && C4::Context->preference('OPACShowOpenURL')) {
212
        my @biblio_itemtypes;
213
        my @biblio_itemtypes;
213
        $biblio //= Koha::Biblios->find($biblionumber);
214
        $biblio //= Koha::Biblios->find($biblionumber);
214
        if (C4::Context->preference('item-level_itypes')) {
215
        if (C4::Context->preference('item-level_itypes')) {
(-)a/catalogue/detail.pl (+2 lines)
Lines 261-266 if ( $showcomp eq 'both' || $showcomp eq 'staff' ) { Link Here
261
                    record       => $part,
261
                    record       => $part,
262
                    xsl_syspref  => "XSLTResultsDisplay",
262
                    xsl_syspref  => "XSLTResultsDisplay",
263
                    fix_amps     => 1,
263
                    fix_amps     => 1,
264
                    interface    => 'intranet'
264
                }
265
                }
265
              );
266
              );
266
        }
267
        }
Lines 284-289 $template->param( Link Here
284
        xsl_syspref    => "XSLTDetailsDisplay",
285
        xsl_syspref    => "XSLTDetailsDisplay",
285
        fix_amps       => 1,
286
        fix_amps       => 1,
286
        xslt_variables => $xslt_variables,
287
        xslt_variables => $xslt_variables,
288
        interface      => 'intranet'
287
    }),
289
    }),
288
);
290
);
289
291
(-)a/opac/opac-detail.pl (+2 lines)
Lines 612-617 if ( $showcomp eq 'both' || $showcomp eq 'opac' ) { Link Here
612
                    record       => $part,
612
                    record       => $part,
613
                    xsl_syspref  => 'OPACXSLTResultsDisplay',
613
                    xsl_syspref  => 'OPACXSLTResultsDisplay',
614
                    fix_amps     => 1,
614
                    fix_amps     => 1,
615
                    interface    => 'opac'
615
                }
616
                }
616
              );
617
              );
617
        }
618
        }
Lines 647-652 $template->param( Link Here
647
        xsl_syspref    => 'OPACXSLTDetailsDisplay',
648
        xsl_syspref    => 'OPACXSLTDetailsDisplay',
648
        fix_amps       => 1,
649
        fix_amps       => 1,
649
        xslt_variables => $variables,
650
        xslt_variables => $variables,
651
        interface      => 'opac'
650
    }),
652
    }),
651
);
653
);
652
654
(-)a/opac/opac-search.pl (-5 lines)
Lines 659-669 for (my $i=0;$i<@servers;$i++) { Link Here
659
                $res->{'incart'} = 1;
659
                $res->{'incart'} = 1;
660
            }
660
            }
661
661
662
            if (C4::Context->preference('COinSinOPACResults')) {
663
                my $biblio = Koha::Biblios->find( $res->{'biblionumber'} );
664
                # Catch the exception as Koha::Biblio::Metadata->record can explode if the MARCXML is invalid
665
                $res->{coins} = $biblio ? eval {$biblio->get_coins} : q{}; # FIXME This should be moved at the beginning of the @newresults loop
666
            }
667
            if ( C4::Context->preference( "Babeltheque" ) and $res->{normalized_isbn} ) {
662
            if ( C4::Context->preference( "Babeltheque" ) and $res->{normalized_isbn} ) {
668
                if( my $isbn = Business::ISBN->new( $res->{normalized_isbn} ) ) {
663
                if( my $isbn = Business::ISBN->new( $res->{normalized_isbn} ) ) {
669
                    $isbn = $isbn->as_isbn13->as_string;
664
                    $isbn = $isbn->as_isbn13->as_string;
(-)a/opac/opac-shelves.pl (+1 lines)
Lines 416-421 if ( $op eq 'view' ) { Link Here
416
                        fix_amps       => 1,
416
                        fix_amps       => 1,
417
                        xslt_variables => $variables,
417
                        xslt_variables => $variables,
418
                        items_rs       => $items->reset,
418
                        items_rs       => $items->reset,
419
                        interface      => 'opac'
419
                    }
420
                    }
420
                );
421
                );
421
422
(-)a/opac/opac-tags.pl (+1 lines)
Lines 293-298 if ($loggedinuser) { Link Here
293
                fix_amps       => 1,
293
                fix_amps       => 1,
294
                hidden_items   => \@hidden_items,
294
                hidden_items   => \@hidden_items,
295
                xslt_variables => $variables
295
                xslt_variables => $variables
296
                interface      => 'opac'
296
            }
297
            }
297
        );
298
        );
298
299
(-)a/virtualshelves/shelves.pl (-1 / +1 lines)
Lines 293-298 if ( $op eq 'view' ) { Link Here
293
                        record       => $record,
293
                        record       => $record,
294
                        xsl_syspref  => 'XSLTListsDisplay',
294
                        xsl_syspref  => 'XSLTListsDisplay',
295
                        fix_amps     => 1,
295
                        fix_amps     => 1,
296
                        interface    => 'intranet'
296
                    }
297
                    }
297
                );
298
                );
298
299
299
- 

Return to bug 28375