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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-21 / +27 lines)
Lines 1226-1241 Link Here
1226
                        <link property="itemOffered" href="#record" />
1226
                        <link property="itemOffered" href="#record" />
1227
                        <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1227
                        <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1228
1228
1229
                        [% IF ( ITEM_RESULT.holding_branch_opac_info ) %]
1229
                        [% IF ( ITEM_RESULT.holding_branch.opac_info ) %]
1230
                            <a href="[% ITEM_RESULT.branchurl | url %]" class="library_info" data-branchcode="[% ITEM_RESULT.branchcode | html %]">
1230
                            <a href="[% ITEM_RESULT.holding_branch.branchurl | url %]" class="library_info" data-branchcode="[% ITEM_RESULT.holding_branch.branchcode | html %]">
1231
                                <i class="fa fa-info-circle" aria-hidden="true"></i> [% ITEM_RESULT.branchname | html %]
1231
                                <i class="fa fa-info-circle" aria-hidden="true"></i> [% ITEM_RESULT.holding_branch.branchname | html %]
1232
                            </a>
1232
                            </a>
1233
                        [% ELSIF ( ITEM_RESULT.branchurl ) %]
1233
                        [% ELSIF ( ITEM_RESULT.holding_branch.branchurl ) %]
1234
                            <a href="[% ITEM_RESULT.branchurl | url %]">
1234
                            <a href="[% ITEM_RESULT.branchurl | url %]">
1235
                                [% ITEM_RESULT.branchname | html %]
1235
                                [% ITEM_RESULT.holding_branch.branchname | html %]
1236
                            </a>
1236
                            </a>
1237
                        [% ELSE %]
1237
                        [% ELSE %]
1238
                            <span>[% ITEM_RESULT.branchname | html %]</span>
1238
                            <span>[% ITEM_RESULT.holding_branch.branchname | html %]</span>
1239
                        [% END %]
1239
                        [% END %]
1240
1240
1241
                        [% IF ( Koha.Preference('OpacLocationOnDetail') == 'holding' || Koha.Preference('OpacLocationOnDetail') == 'both' ) %]
1241
                        [% IF ( Koha.Preference('OpacLocationOnDetail') == 'holding' || Koha.Preference('OpacLocationOnDetail') == 'both' ) %]
Lines 1250-1265 Link Here
1250
                        <link property="itemOffered" href="#record" />
1250
                        <link property="itemOffered" href="#record" />
1251
                        <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1251
                        <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1252
1252
1253
                        [% IF ( ITEM_RESULT.holding_branch_opac_info ) %]
1253
                        [% IF ( ITEM_RESULT.holding_branch.opac_info ) %] [%# FIXME Shouldn't this be home_branch instead of holding_branc? %]
1254
                            <a href="[% Branches.GetURL( ITEM_RESULT.homebranch ) | url %]" class="library_info" data-branchcode="[% ITEM_RESULT.homebranch | html %]">
1254
                            <a href="[% ITEM_RESULT.home_branch.branchurl | url %]" class="library_info" data-branchcode="[% ITEM_RESULT.home_branch.branchchode | html %]">
1255
                                <i class="fa fa-info-circle" aria-hidden="true"></i> [% Branches.GetName( ITEM_RESULT.homebranch ) | html %]
1255
                                <i class="fa fa-info-circle" aria-hidden="true"></i> [% ITEM_RESULT.home_branch.branchname | html %]
1256
                            </a>
1256
                            </a>
1257
                        [% ELSIF ( Branches.GetURL( ITEM_RESULT.homebranch ) ) %]
1257
                        [% ELSIF ( ITEM_RESULT.home_branch.branchurl ) %]
1258
                            <a href="[% Branches.GetURL( ITEM_RESULT.homebranch ) | url %]">
1258
                            <a href="[% ITEM_RESULT.home_branch.branchurl | url %]">
1259
                                [% Branches.GetName( ITEM_RESULT.homebranch ) | html %]
1259
                                [% ITEM_RESULT.home_branch.branchname | html %]
1260
                            </a>
1260
                            </a>
1261
                        [% ELSE %]
1261
                        [% ELSE %]
1262
                            <span>[% Branches.GetName( ITEM_RESULT.homebranch ) | html %]</span>
1262
                            <span>[% ITEM_RESULT.home_branch.branchname | html %]</span>
1263
                        [% END %]
1263
                        [% END %]
1264
1264
1265
                        [% IF ( Koha.Preference('OpacLocationOnDetail') == 'home' || Koha.Preference('OpacLocationOnDetail') == 'both' ) %]
1265
                        [% IF ( Koha.Preference('OpacLocationOnDetail') == 'home' || Koha.Preference('OpacLocationOnDetail') == 'both' ) %]
Lines 1295-1314 Link Here
1295
                [% END %]
1295
                [% END %]
1296
1296
1297
                [% IF ( itemdata_enumchron ) %]
1297
                [% IF ( itemdata_enumchron ) %]
1298
                    [% SET serial = ITEM_RESULT.serial %]
1298
                    <td class="vol_info">
1299
                    <td class="vol_info">
1299
                        [% IF ITEM_RESULT.enumchron && ITEM_RESULT.serialseq %]
1300
                        [% IF ITEM_RESULT.enumchron && serial.serialseq %]
1300
                            <span class="enum">[% ITEM_RESULT.enumchron | html %]</span>
1301
                            <span class="enum">[% ITEM_RESULT.enumchron | html %]</span>
1301
                            [% IF ( ITEM_RESULT.serialseq && ITEM_RESULT.enumchron!=ITEM_RESULT.serialseq ) %]
1302
                            [% IF ( serial.serialseq && ITEM_RESULT.enumchron!=serial.serialseq ) %]
1302
                                <span class="sep"> -- </span>
1303
                                <span class="sep"> -- </span>
1303
                                <span class="serialseq">[% ITEM_RESULT.serialseq | html %]</span>
1304
                                <span class="serialseq">[% serial.serialseq | html %]</span>
1304
                            [% END %]
1305
                            [% END %]
1305
                        [% ELSIF ITEM_RESULT.enumchron %]
1306
                        [% ELSIF ITEM_RESULT.enumchron %]
1306
                            <span class="enum">[% ITEM_RESULT.enumchron | html %]</span>
1307
                            <span class="enum">[% ITEM_RESULT.enumchron | html %]</span>
1307
                        [% ELSIF ITEM_RESULT.serialseq %]
1308
                        [% ELSIF serial.serialseq %]
1308
                                <span class="serialseq">[% ITEM_RESULT.serialseq | html %]</span>
1309
                                <span class="serialseq">[% serial.serialseq | html %]</span>
1309
                        [% END %]
1310
                        [% END %]
1310
                        [% IF ( ITEM_RESULT.publisheddate ) %]
1311
                        [% IF ( serial.publisheddate ) %]
1311
                            <span class="pubdate">([% ITEM_RESULT.publisheddate | $KohaDates %])</span>
1312
                            <span class="pubdate">([% serial.publisheddate | $KohaDates %])</span>
1312
                        [% END %]
1313
                        [% END %]
1313
                    </td>
1314
                    </td>
1314
                [% END %]
1315
                [% END %]
Lines 1343-1349 Link Here
1343
                [% IF ( itemdata_copynumber ) %]<td class="copynumber">[% ITEM_RESULT.copynumber | html %]</td>[% END %]
1344
                [% IF ( itemdata_copynumber ) %]<td class="copynumber">[% ITEM_RESULT.copynumber | html %]</td>[% END %]
1344
                <td class="status">[% INCLUDE 'item-status-schema-org.inc' item = ITEM_RESULT %][% INCLUDE 'item-status.inc' item = ITEM_RESULT %]</td>
1345
                <td class="status">[% INCLUDE 'item-status-schema-org.inc' item = ITEM_RESULT %][% INCLUDE 'item-status.inc' item = ITEM_RESULT %]</td>
1345
                [% IF ( itemdata_itemnotes ) %]<td class="notes" property="description">[% ITEM_RESULT.itemnotes | $raw %]</td>[% END %]
1346
                [% IF ( itemdata_itemnotes ) %]<td class="notes" property="description">[% ITEM_RESULT.itemnotes | $raw %]</td>[% END %]
1346
                <td class="date_due" data-order="[% ITEM_RESULT.datedue | html %]">[% ITEM_RESULT.datedue | $KohaDates  as_due_date => 1 %]</td>
1347
                [% IF ITEM_RESULT.checkout %]
1348
                    <td class="date_due" data-order="[% ITEM_RESULT.checkout.date_due | html %]">[% ITEM_RESULT.checkout.date_due | $KohaDates as_due_date => 1 %]</td>
1349
                [% ELSE %]
1350
                    <td class="date_due"></td>
1351
                [% END %]
1352
1347
                    <td class="barcode" property="serialNumber">[% ITEM_RESULT.barcode | html %]</td>
1353
                    <td class="barcode" property="serialNumber">[% ITEM_RESULT.barcode | html %]</td>
1348
                [% IF holds_count.defined || show_priority %]
1354
                [% IF holds_count.defined || show_priority %]
1349
                    <td class="holds_count">
1355
                    <td class="holds_count">
(-)a/opac/opac-detail.pl (-122 / +125 lines)
Lines 45-51 use C4::Biblio qw( Link Here
45
    GetMarcSubjects
45
    GetMarcSubjects
46
    GetMarcUrls
46
    GetMarcUrls
47
);
47
);
48
use C4::Items qw( GetItemsInfo );
49
use C4::Circulation qw( GetTransfers );
48
use C4::Circulation qw( GetTransfers );
50
use C4::Tags qw( get_tags );
49
use C4::Tags qw( get_tags );
51
use C4::XISBN qw( get_xisbns );
50
use C4::XISBN qw( get_xisbns );
Lines 82-87 use Koha::Plugins; Link Here
82
use Koha::Ratings;
81
use Koha::Ratings;
83
use Koha::Recalls;
82
use Koha::Recalls;
84
use Koha::Reviews;
83
use Koha::Reviews;
84
use Koha::Serial::Items;
85
use Koha::SearchEngine::Search;
85
use Koha::SearchEngine::Search;
86
use Koha::SearchEngine::QueryBuilder;
86
use Koha::SearchEngine::QueryBuilder;
87
87
Lines 104-115 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
104
    }
104
    }
105
);
105
);
106
106
107
my @all_items = GetItemsInfo($biblionumber);
108
if( $specific_item ) {
109
    @all_items = grep { $_->{itemnumber} == $query->param('itemnumber') } @all_items;
110
    $template->param( specific_item => 1 );
111
}
112
my @items_to_show;
113
my $patron = Koha::Patrons->find( $borrowernumber );
107
my $patron = Koha::Patrons->find( $borrowernumber );
114
108
115
my $biblio = Koha::Biblios->find( $biblionumber );
109
my $biblio = Koha::Biblios->find( $biblionumber );
Lines 119-124 unless ( $biblio && $record ) { Link Here
119
    exit;
113
    exit;
120
}
114
}
121
115
116
my $items = $biblio->items;
117
if ($specific_item) {
118
    $items->search( { itemnumber => scalar $query->param('itemnumber') } );
119
    $template->param( specific_item => 1 );
120
}
121
122
unless ( $patron and $patron->category->override_hidden_items ) {
122
unless ( $patron and $patron->category->override_hidden_items ) {
123
    # only skip this check if there's a logged in user
123
    # only skip this check if there's a logged in user
124
    # and its category overrides OpacHiddenItems
124
    # and its category overrides OpacHiddenItems
Lines 126-134 unless ( $patron and $patron->category->override_hidden_items ) { Link Here
126
        print $query->redirect('/cgi-bin/koha/errors/404.pl'); # escape early
126
        print $query->redirect('/cgi-bin/koha/errors/404.pl'); # escape early
127
        exit;
127
        exit;
128
    }
128
    }
129
    if ( scalar @all_items >= 1 ) {
129
    if ( $items->count >= 1 ) {
130
        @items_to_show = Koha::Items->search( { itemnumber => [ map { $_->{itemnumber} } @all_items ] } )
130
        $items = $items->filter_by_visible_in_opac( { patron => $patron } );
131
                                    ->filter_by_visible_in_opac( { patron => $patron } )->as_list;
132
    }
131
    }
133
}
132
}
134
133
Lines 494-537 $template->param( Link Here
494
    OPACShowCheckoutName => C4::Context->preference("OPACShowCheckoutName"),
493
    OPACShowCheckoutName => C4::Context->preference("OPACShowCheckoutName"),
495
);
494
);
496
495
497
if ( C4::Context->preference('EasyAnalyticalRecords') ) {
496
my $host_items = $biblio->host_items->filter_by_visible_in_opac({ patron => $patron });
498
    # adding items linked via host biblios
499
    my $analyticfield = '773';
500
    if ($marcflavour eq 'MARC21'){
501
        $analyticfield = '773';
502
    } elsif ($marcflavour eq 'UNIMARC') {
503
        $analyticfield = '461';
504
    }
505
    foreach my $hostfield ( $record->field($analyticfield)) {
506
        my $hostbiblionumber = $hostfield->subfield("0");
507
        my $linkeditemnumber = $hostfield->subfield("9");
508
        my @hostitemInfos = GetItemsInfo($hostbiblionumber);
509
        foreach my $hostitemInfo (@hostitemInfos){
510
            if ($hostitemInfo->{itemnumber} eq $linkeditemnumber){
511
                push(@all_items, $hostitemInfo);
512
            }
513
        }
514
    }
515
}
516
497
517
my @items;
498
$items = $biblio->items->search(
518
499
    {
519
# Are there items to hide?
500
        itemnumber => {
520
# Hide items
501
            -in => [
521
if ( @items_to_show != @all_items ) {
502
                $items->get_column('itemnumber'),
522
    for my $itm (@all_items) {
503
                $host_items->get_column('itemnumber')
523
        next unless any { $itm->{itemnumber} eq $_ } @items_to_show;
504
            ]
524
        if ( C4::Context->preference('hidelostitems') ) {
525
            push @items, $itm unless $itm->{itemlost};
526
        }
527
        else {
528
            push @items, $itm;
529
        }
505
        }
530
    }
506
    }
531
} else {
507
);
532
    # Or not
533
    @items = @all_items;
534
}
535
508
536
my $dat = &GetBiblioData($biblionumber);
509
my $dat = &GetBiblioData($biblionumber);
537
my $HideMARC = $record_processor->filters->[0]->should_hide_marc(
510
my $HideMARC = $record_processor->filters->[0]->should_hide_marc(
Lines 590-597 foreach my $subscription (@subscriptions) { Link Here
590
    push @subs, \%cell;
563
    push @subs, \%cell;
591
}
564
}
592
565
593
$dat->{'count'} = scalar(@items);
566
$dat->{'count'} = $items->count;
594
595
567
596
my (%item_reserves, %priority);
568
my (%item_reserves, %priority);
597
my ($show_holds_count, $show_priority);
569
my ($show_holds_count, $show_priority);
Lines 702-786 if ( C4::Context->preference('OPACAcquisitionDetails' ) ) { Link Here
702
674
703
my $allow_onshelf_holds;
675
my $allow_onshelf_holds;
704
my ( $itemloop_has_images, $otheritemloop_has_images );
676
my ( $itemloop_has_images, $otheritemloop_has_images );
705
if ( not $viewallitems and @items > $max_items_to_display ) {
677
if ( not $viewallitems and $items->count > $max_items_to_display ) {
706
    $template->param(
678
    $template->param(
707
        too_many_items => 1,
679
        too_many_items => 1,
708
        items_count => scalar( @items ),
680
        items_count    => $items->count,
709
    );
681
    );
710
} else {
682
}
711
  for my $itm (@items) {
683
else {
712
    my $item = Koha::Items->find( $itm->{itemnumber} );
684
    while ( my $item = $items->next ) {
713
    $itm->{holds_count} = $item_reserves{ $itm->{itemnumber} };
685
        my $item_info = $item->unblessed;
714
    $itm->{priority} = $priority{ $itm->{itemnumber} };
686
        $item->{holds_count} = $item_reserves{ $item->itemnumber };
715
687
        $item->{priority}    = $priority{ $item->itemnumber };
716
    $allow_onshelf_holds = Koha::CirculationRules->get_onshelfholds_policy( { item => $item, patron => $patron } )
688
717
      unless $allow_onshelf_holds;
689
        $allow_onshelf_holds = Koha::CirculationRules->get_onshelfholds_policy(
718
690
            { item => $item, patron => $patron } )
719
    # get collection code description, too
691
          unless $allow_onshelf_holds;
720
    my $ccode = $itm->{'ccode'};
692
721
    $itm->{'ccode'} = $collections->{$ccode} if defined($ccode) && $collections && exists( $collections->{$ccode} );
693
        # get collection code description, too
722
    my $copynumber = $itm->{'copynumber'};
694
        my $ccode = $item->ccode;
723
    $itm->{'copynumber'} = $copynumbers->{$copynumber} if ( defined($copynumbers) && defined($copynumber) && exists( $copynumbers->{$copynumber} ) );
695
        $item_info->{'ccode'} = $collections->{$ccode}
724
    if ( defined $itm->{'location'} ) {
696
          if defined($ccode)
725
        $itm->{'location_description'} = $shelflocations->{ $itm->{'location'} };
697
          && $collections
726
    }
698
          && exists( $collections->{$ccode} );
727
    if (exists $itm->{itype} && defined($itm->{itype}) && exists $itemtypes->{ $itm->{itype} }) {
699
728
        $itm->{'imageurl'}    = getitemtypeimagelocation( 'opac', $itemtypes->{ $itm->{itype} }->{'imageurl'} );
700
        my $copynumber = $item->copynumber;
729
        $itm->{'description'} = $itemtypes->{ $itm->{itype} }->{translated_description};
701
        $item_info->{copynumber} = $copynumbers->{$copynumber}
730
    }
702
          if ( defined($copynumbers)
731
    foreach (qw(ccode materials enumchron copynumber itemnotes location_description uri)) {
703
            && defined($copynumber)
732
        $itemfields{$_} = 1 if ($itm->{$_});
704
            && exists( $copynumbers->{$copynumber} ) );
733
    }
705
706
        if ( defined $item->location ) {
707
            $item_info->{'location_description'} =
708
              $shelflocations->{ $item->location };
709
        }
734
710
735
    my $reserve_status = C4::Reserves::GetReserveStatus($itm->{itemnumber});
711
        my $itemtype = $item->itemtype;
736
    if ( $reserve_status eq "Waiting" )  { $itm->{'waiting'} = 1; }
712
        $item_info->{'imageurl'} = getitemtypeimagelocation( 'opac',
737
    if ( $reserve_status eq "Reserved" ) { $itm->{'onhold'}  = 1; }
713
            $itemtypes->{ $itemtype->itemtype }->{'imageurl'} );
714
        $item_info->{'description'} =
715
          $itemtypes->{ $itemtype->itemtype }->{translated_description};
738
716
739
    if ( C4::Context->preference('UseRecalls') ) {
717
        foreach my $field (
740
        my $pending_recall_count = Koha::Recalls->search(
718
            qw(ccode materials enumchron copynumber itemnotes location_description uri)
741
            {
719
          )
742
                item_id   => $itm->{itemnumber},
720
        {
743
                status    => 'waiting',
721
            $itemfields{$field} = 1 if $item_info->{$field};
744
            }
722
        }
745
        )->count;
746
        if ( $pending_recall_count ) { $itm->{has_pending_recall} = 1; }
747
    }
748
723
749
     my ( $transfertwhen, $transfertfrom, $transfertto ) = GetTransfers($itm->{itemnumber});
724
        # FIXME The following must be Koha::Item->serial
750
     if ( defined( $transfertwhen ) && $transfertwhen ne '' ) {
725
        my $serial_item = Koha::Serial::Items->find($item->itemnumber);
751
        $itm->{transfertwhen} = $transfertwhen;
726
        if ( $serial_item ) {
752
        $itm->{transfertfrom} = $transfertfrom;
727
            $item_info->{serial} = $serial_item;
753
        $itm->{transfertto}   = $transfertto;
728
        }
754
     }
755
729
756
    if ( C4::Context->preference('OPACAcquisitionDetails') ) {
730
        $item_info->{checkout} = $item->checkout;
757
        $itm->{on_order} = 1
758
          if grep { $_ eq $itm->{itemnumber} } @itemnumbers_on_order;
759
    }
760
731
761
    if ( C4::Context->preference("OPACLocalCoverImages") == 1 ) {
732
        my $reserve_status =
762
        $itm->{cover_images} = $item->cover_images;
733
          C4::Reserves::GetReserveStatus( $item->itemnumber );
763
    }
734
        if ( $reserve_status eq "Waiting"  ) { $item_info->{'waiting'} = 1; }
735
        if ( $reserve_status eq "Reserved" ) { $item_info->{'onhold'}  = 1; }
764
736
765
    if ( $item->in_bundle ) {
737
        if ( C4::Context->preference('UseRecalls') ) {
766
        my $host = $item->bundle_host;
738
            my $pending_recall_count = Koha::Recalls->search(
767
        $itm->{bundle_host} = $host;
739
                {
768
    }
740
                    item_id   => $item->itemnumber,
741
                    status    => 'waiting',
742
                }
743
            )->count;
744
            if ( $pending_recall_count ) { $item_info->has_pending_recall = 1; }
745
        }
746
747
        my ( $transfertwhen, $transfertfrom, $transfertto ) =
748
          GetTransfers( $item->itemnumber );
749
        if ( defined($transfertwhen) && $transfertwhen ne '' ) {
750
            $item_info->{transfertwhen} = $transfertwhen;
751
            $item_info->{transfertfrom} = $transfertfrom;
752
            $item_info->{transfertto}   = $transfertto;
753
        }
754
755
        if ( C4::Context->preference('OPACAcquisitionDetails') ) {
756
            $item_info->{on_order} = 1
757
              if grep { $_ eq $item->itemnumber } @itemnumbers_on_order;
758
        }
759
760
        if ( C4::Context->preference("OPACLocalCoverImages") == 1 ) {
761
            $item_info->{cover_images} = $item->cover_images;
762
        }
763
764
765
        if ( $item->in_bundle ) {
766
            $item_info->{bundle_host} = $item->bundle_host;
767
        }
768
769
        if ( C4::Context->preference('UseCourseReserves') ) {
770
            $item_info->{course_reserves} = GetItemCourseReservesInfo( itemnumber => $item->itemnumber );
771
        }
772
773
        $item_info->{holding_branch} = $item->holding_branch;
774
        $item_info->{home_branch}    = $item->home_branch;
769
775
770
    my $itembranch = $itm->{$separatebranch};
776
        my $itembranch = $item->$separatebranch;
771
    if ($currentbranch and C4::Context->preference('OpacSeparateHoldings')) {
777
        if ( $currentbranch
772
        if ($itembranch and $itembranch eq $currentbranch) {
778
            and C4::Context->preference('OpacSeparateHoldings') )
773
            push @itemloop, $itm;
779
        {
780
            if ( $itembranch and $itembranch eq $currentbranch ) {
781
                push @itemloop, $item_info;
782
                $itemloop_has_images++ if $item->cover_images->count;
783
            }
784
            else {
785
                push @otheritemloop, $item_info;
786
                $otheritemloop_has_images++ if $item->cover_images->count;
787
            }
788
        }
789
        else {
790
            push @itemloop, $item_info;
774
            $itemloop_has_images++ if $item->cover_images->count;
791
            $itemloop_has_images++ if $item->cover_images->count;
775
        } else {
776
            push @otheritemloop, $itm;
777
            $otheritemloop_has_images++ if $item->cover_images->count;
778
        }
792
        }
779
    } else {
780
        push @itemloop, $itm;
781
        $itemloop_has_images++ if $item->cover_images->count;
782
    }
793
    }
783
  }
784
}
794
}
785
795
786
if( $allow_onshelf_holds || CountItemsIssued($biblionumber) || $biblio->has_items_waiting_or_intransit ) {
796
if( $allow_onshelf_holds || CountItemsIssued($biblionumber) || $biblio->has_items_waiting_or_intransit ) {
Lines 827-833 my $norequests = ! $biblio->items->filter_by_for_hold->count; Link Here
827
                     OpacStarRatings         => C4::Context->preference("OpacStarRatings"),
837
                     OpacStarRatings         => C4::Context->preference("OpacStarRatings"),
828
    );
838
    );
829
839
830
if (C4::Context->preference("AlternateHoldingsField") && scalar @items == 0) {
840
if (C4::Context->preference("AlternateHoldingsField") && $items->count == 0) {
831
    my $fieldspec = C4::Context->preference("AlternateHoldingsField");
841
    my $fieldspec = C4::Context->preference("AlternateHoldingsField");
832
    my $subfields = substr $fieldspec, 3;
842
    my $subfields = substr $fieldspec, 3;
833
    my $holdingsep = C4::Context->preference("AlternateHoldingsSeparator") || ' ';
843
    my $holdingsep = C4::Context->preference("AlternateHoldingsSeparator") || ' ';
Lines 1114-1120 if (C4::Context->preference("OPACShelfBrowser")) { Link Here
1114
        );
1124
        );
1115
1125
1116
        # in which tab shelf browser should open ?
1126
        # in which tab shelf browser should open ?
1117
        if (grep { $starting_itemnumber == $_->{itemnumber} } @itemloop) {
1127
        if (grep { $starting_itemnumber == $_->itemnumber } @itemloop) {
1118
            $template->param(shelfbrowser_tab => 'holdings');
1128
            $template->param(shelfbrowser_tab => 'holdings');
1119
        } else {
1129
        } else {
1120
            $template->param(shelfbrowser_tab => 'otherholdings');
1130
            $template->param(shelfbrowser_tab => 'otherholdings');
Lines 1242-1253 if (C4::Context->preference('OpacHighlightedWords')) { Link Here
1242
}
1252
}
1243
$template->{VARS}->{'trackclicks'} = C4::Context->preference('TrackClicks');
1253
$template->{VARS}->{'trackclicks'} = C4::Context->preference('TrackClicks');
1244
1254
1245
if ( C4::Context->preference('UseCourseReserves') ) {
1246
    foreach my $i ( @items ) {
1247
        $i->{'course_reserves'} = GetItemCourseReservesInfo( itemnumber => $i->{'itemnumber'} );
1248
    }
1249
}
1250
1251
$template->param(
1255
$template->param(
1252
    'OpacLocationBranchToDisplay' => C4::Context->preference('OpacLocationBranchToDisplay'),
1256
    'OpacLocationBranchToDisplay' => C4::Context->preference('OpacLocationBranchToDisplay'),
1253
);
1257
);
1254
- 

Return to bug 27272