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

(-)a/C4/Search.pm (-1 / +6 lines)
Lines 1981-1993 sub searchResults { Link Here
1981
                    ),
1981
                    ),
1982
                    fix_amps       => 1,
1982
                    fix_amps       => 1,
1983
                    hidden_items   => \@hiddenitems,
1983
                    hidden_items   => \@hiddenitems,
1984
                    xslt_variables => $xslt_variables
1984
                    xslt_variables => $xslt_variables,
1985
                    interface => $search_context->{'interface'}
1985
                }
1986
                }
1986
            );
1987
            );
1987
        }
1988
        }
1988
1989
1989
        my $biblio_object = Koha::Biblios->find( $oldbiblio->{biblionumber} );
1990
        my $biblio_object = Koha::Biblios->find( $oldbiblio->{biblionumber} );
1990
        $oldbiblio->{biblio_object} = $biblio_object;
1991
        $oldbiblio->{biblio_object} = $biblio_object;
1992
        $oldbiblio->{coins} = eval { $oldbiblio_object->get_coins }
1993
          if $oldbiblio_object
1994
          && C4::Context->preference('COinSinOPACResults')
1995
          && $is_opac;
1991
1996
1992
        my $can_place_holds = 1;
1997
        my $can_place_holds = 1;
1993
        # if biblio level itypes are used and itemtype is notforloan, it can't be reserved either
1998
        # if biblio level itypes are used and itemtype is notforloan, it can't be reserved either
(-)a/C4/XSLT.pm (-1 / +2 lines)
Lines 250-255 sub XSLTParse4Display { Link Here
250
    my $hidden_items = $params->{hidden_items} || [];
250
    my $hidden_items = $params->{hidden_items} || [];
251
    my $variables    = $params->{xslt_variables};
251
    my $variables    = $params->{xslt_variables};
252
    my $items_rs     = $params->{items_rs};
252
    my $items_rs     = $params->{items_rs};
253
    my $interface    = $params->{interface};
253
254
254
    my $xslfilename = get_xsl_filename( $xslsyspref);
255
    my $xslfilename = get_xsl_filename( $xslsyspref);
255
256
Lines 265-271 sub XSLTParse4Display { Link Here
265
266
266
    $variables ||= {};
267
    $variables ||= {};
267
    my $biblio;
268
    my $biblio;
268
    if (C4::Context->preference('OPACShowOpenURL')) {
269
    if ( $interface eq 'opac' && C4::Context->preference('OPACShowOpenURL')) {
269
        my @biblio_itemtypes;
270
        my @biblio_itemtypes;
270
        $biblio //= Koha::Biblios->find($biblionumber);
271
        $biblio //= Koha::Biblios->find($biblionumber);
271
        if (C4::Context->preference('item-level_itypes')) {
272
        if (C4::Context->preference('item-level_itypes')) {
(-)a/catalogue/detail.pl (+2 lines)
Lines 214-219 if ( $showcomp eq 'both' || $showcomp eq 'staff' ) { Link Here
214
                    record       => $part,
214
                    record       => $part,
215
                    xsl_syspref  => "XSLTResultsDisplay",
215
                    xsl_syspref  => "XSLTResultsDisplay",
216
                    fix_amps     => 1,
216
                    fix_amps     => 1,
217
                    interface    => 'intranet'
217
                }
218
                }
218
              );
219
              );
219
        }
220
        }
Lines 235-240 $template->param( Link Here
235
        xsl_syspref    => "XSLTDetailsDisplay",
236
        xsl_syspref    => "XSLTDetailsDisplay",
236
        fix_amps       => 1,
237
        fix_amps       => 1,
237
        xslt_variables => $xslt_variables,
238
        xslt_variables => $xslt_variables,
239
        interface      => 'intranet'
238
    }),
240
    }),
239
);
241
);
240
242
(-)a/opac/opac-detail.pl (+2 lines)
Lines 642-647 if ( $showcomp eq 'both' || $showcomp eq 'opac' ) { Link Here
642
                    record       => $part,
642
                    record       => $part,
643
                    xsl_syspref  => 'OPACXSLTResultsDisplay',
643
                    xsl_syspref  => 'OPACXSLTResultsDisplay',
644
                    fix_amps     => 1,
644
                    fix_amps     => 1,
645
                    interface    => 'opac'
645
                }
646
                }
646
              );
647
              );
647
        }
648
        }
Lines 674-679 $template->param( Link Here
674
        xsl_syspref    => 'OPACXSLTDetailsDisplay',
675
        xsl_syspref    => 'OPACXSLTDetailsDisplay',
675
        fix_amps       => 1,
676
        fix_amps       => 1,
676
        xslt_variables => $variables,
677
        xslt_variables => $variables,
678
        interface      => 'opac'
677
    }),
679
    }),
678
);
680
);
679
681
(-)a/opac/opac-search.pl (-5 lines)
Lines 628-638 for (my $i=0;$i<@servers;$i++) { Link Here
628
                $res->{'incart'} = 1;
628
                $res->{'incart'} = 1;
629
            }
629
            }
630
630
631
            if (C4::Context->preference('COinSinOPACResults')) {
632
                my $biblio = Koha::Biblios->find( $res->{'biblionumber'} );
633
                # Catch the exception as Koha::Biblio::Metadata->record can explode if the MARCXML is invalid
634
                $res->{coins} = $biblio ? eval {$biblio->get_coins} : q{}; # FIXME This should be moved at the beginning of the @newresults loop
635
            }
636
            if ( C4::Context->preference( "Babeltheque" ) and $res->{normalized_isbn} ) {
631
            if ( C4::Context->preference( "Babeltheque" ) and $res->{normalized_isbn} ) {
637
                if( my $isbn = Business::ISBN->new( $res->{normalized_isbn} ) ) {
632
                if( my $isbn = Business::ISBN->new( $res->{normalized_isbn} ) ) {
638
                    $isbn = $isbn->as_isbn13->as_string;
633
                    $isbn = $isbn->as_isbn13->as_string;
(-)a/opac/opac-shelves.pl (+1 lines)
Lines 376-381 if ( $op eq 'view' ) { Link Here
376
                        fix_amps       => 1,
376
                        fix_amps       => 1,
377
                        xslt_variables => $variables,
377
                        xslt_variables => $variables,
378
                        items_rs       => $items->reset,
378
                        items_rs       => $items->reset,
379
                        interface      => 'opac'
379
                    }
380
                    }
380
                );
381
                );
381
382
(-)a/opac/opac-tags.pl (-1 / +2 lines)
Lines 295-301 if ($loggedinuser) { Link Here
295
                xsl_filename   => 'OPACXSLTResultsDisplay',
295
                xsl_filename   => 'OPACXSLTResultsDisplay',
296
                fix_amps       => 1,
296
                fix_amps       => 1,
297
                hidden_items   => $hidden_items,
297
                hidden_items   => $hidden_items,
298
                xslt_variables => $variables
298
                xslt_variables => $variables,
299
                interface      => 'opac'
299
            }
300
            }
300
        );
301
        );
301
302
(-)a/virtualshelves/shelves.pl (-1 / +1 lines)
Lines 270-275 if ( $op eq 'view' ) { Link Here
270
                        record       => $record,
270
                        record       => $record,
271
                        xsl_filename => "XSLTListsDisplay",
271
                        xsl_filename => "XSLTListsDisplay",
272
                        fix_amps     => 1,
272
                        fix_amps     => 1,
273
                        interface    => 'intranet'
273
                    }
274
                    }
274
                );
275
                );
275
276
276
- 

Return to bug 28375