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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-17 / +27 lines)
Lines 1191-1198 Link Here
1191
                [% IF ( Koha.Preference('OpacLocationOnDetail') == 'column' && itemdata_location ) %]
1191
                [% IF ( Koha.Preference('OpacLocationOnDetail') == 'column' && itemdata_location ) %]
1192
                    <th id="item_shelving_location" data-colname="item_shelving_location" class="shelving_location">Shelving location</th>
1192
                    <th id="item_shelving_location" data-colname="item_shelving_location" class="shelving_location">Shelving location</th>
1193
                [% END %]
1193
                [% END %]
1194
                [% IF ( itemdata_itemcallnumber ) %]
1194
                    <th id="item_callnumber" data-colname="item_callnumber" class="call_no">Call number</th>
1195
                    <th id="item_callnumber" data-colname="item_callnumber" class="call_no">Call number</th>
1195
                [% UNLESS TablesSettings.is_hidden( 'opac', 'biblio-detail', 'holdingst', 'item_materials') %]
1196
                [% END %]
1197
                [% IF ( itemdata_materials ) %]
1196
                    <th id="item_materials" data-colname="item_materials" class="materials">Materials specified</th>
1198
                    <th id="item_materials" data-colname="item_materials" class="materials">Materials specified</th>
1197
                [% END %]
1199
                [% END %]
1198
                [% IF ( itemdata_enumchron ) %]
1200
                [% IF ( itemdata_enumchron ) %]
Lines 1208-1216 Link Here
1208
                [% IF ( itemdata_itemnotes ) %]
1210
                [% IF ( itemdata_itemnotes ) %]
1209
                    <th id="item_notes" data-colname="item_notes" class="notes">Notes</th>
1211
                    <th id="item_notes" data-colname="item_notes" class="notes">Notes</th>
1210
                [% END %]
1212
                [% END %]
1213
                [% IF ( item_checkouts ) %]
1211
                    <th id="item_datedue" data-colname="item_datedue" class="date_due">Date due</th>
1214
                    <th id="item_datedue" data-colname="item_datedue" class="date_due">Date due</th>
1215
                [% END %]
1216
                [% IF ( itemdata_barcode ) %]
1212
                    <th id="item_barcode" data-colname="item_barcode" class="barcode">Barcode</th>
1217
                    <th id="item_barcode" data-colname="item_barcode" class="barcode">Barcode</th>
1213
                [% IF holds_count.defined %]
1218
                [% END %]
1219
                [% IF item_level_holds > 0 %]
1214
                    <th id="item_holds" data-colname="item_holds">Item holds</th>
1220
                    <th id="item_holds" data-colname="item_holds">Item holds</th>
1215
                [% ELSIF show_priority %]
1221
                [% ELSIF show_priority %]
1216
                    <th id="item_priority" data-colname="item_priority">Item hold queue priority</th>
1222
                    <th id="item_priority" data-colname="item_priority">Item hold queue priority</th>
Lines 1313-1332 Link Here
1313
                    <td class="shelving_location"><span class="shelvingloc">[% ITEM_RESULT.location_description | html %]</span></td>
1319
                    <td class="shelving_location"><span class="shelvingloc">[% ITEM_RESULT.location_description | html %]</span></td>
1314
                [% END %]
1320
                [% END %]
1315
1321
1316
                <td class="call_no" property="sku">
1322
                [% IF ( itemdata_itemcallnumber ) %]
1317
                    [% IF ( ITEM_RESULT.itemcallnumber ) %]
1323
                    <td class="call_no" property="sku">
1318
                        [% ITEM_RESULT.itemcallnumber | html %]
1324
                        [% IF ( ITEM_RESULT.itemcallnumber ) %]
1319
                        [% IF ( OPACShelfBrowser ) %]
1325
                            [% ITEM_RESULT.itemcallnumber | html %]
1320
                            [% IF ( ITEM_RESULT.itemnumber == starting_itemnumber ) %]
1326
                            [% IF ( OPACShelfBrowser ) %]
1321
                                (<a class="close_shelf" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ITEM_RESULT.biblionumber | html %]&amp;shelfbrowse_itemnumber=[% ITEM_RESULT.itemnumber | html %]#[% tab | html %]">Browse shelf<span class="sr-only">(Opens below)</span></a>)
1327
                                [% IF ( ITEM_RESULT.itemnumber == starting_itemnumber ) %]
1322
                            [% ELSE %]
1328
                                    (<a class="close_shelf" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ITEM_RESULT.biblionumber | html %]&amp;shelfbrowse_itemnumber=[% ITEM_RESULT.itemnumber | html %]#[% tab | html %]">Browse shelf<span class="sr-only">(Opens below)</span></a>)
1323
                                (<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ITEM_RESULT.biblionumber | uri %]&amp;shelfbrowse_itemnumber=[% ITEM_RESULT.itemnumber | uri %]#[% tab | uri %]">Browse shelf<span class="sr-only">(Opens below)</span></a>)
1329
                                [% ELSE %]
1330
                                    (<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ITEM_RESULT.biblionumber | uri %]&amp;shelfbrowse_itemnumber=[% ITEM_RESULT.itemnumber | uri %]#[% tab | uri %]">Browse shelf<span class="sr-only">(Opens below)</span></a>)
1331
                                [% END %]
1324
                            [% END %]
1332
                            [% END %]
1325
                        [% END %]
1333
                        [% END %]
1326
                    [% END %]
1334
                    </td>
1327
                </td>
1335
                [% END %]
1328
1336
1329
                [% UNLESS TablesSettings.is_hidden( 'opac', 'biblio-detail', 'holdingst', 'item_materials') %]
1337
                [% IF ( itemdata_materials ) %]
1330
                    <td class="materials">[% ITEM_RESULT.materials | html %]</td>
1338
                    <td class="materials">[% ITEM_RESULT.materials | html %]</td>
1331
                [% END %]
1339
                [% END %]
1332
1340
Lines 1380-1393 Link Here
1380
                [% IF ( itemdata_copynumber ) %]<td class="copynumber">[% ITEM_RESULT.copynumber | html %]</td>[% END %]
1388
                [% IF ( itemdata_copynumber ) %]<td class="copynumber">[% ITEM_RESULT.copynumber | html %]</td>[% END %]
1381
                <td class="status">[% INCLUDE 'item-status.inc' item = ITEM_RESULT.object include_schema_org = 1 %]</td>
1389
                <td class="status">[% INCLUDE 'item-status.inc' item = ITEM_RESULT.object include_schema_org = 1 %]</td>
1382
                [% IF ( itemdata_itemnotes ) %]<td class="notes" property="description">[% ITEM_RESULT.itemnotes | $raw %]</td>[% END %]
1390
                [% IF ( itemdata_itemnotes ) %]<td class="notes" property="description">[% ITEM_RESULT.itemnotes | $raw %]</td>[% END %]
1383
                [% IF ITEM_RESULT.checkout %]
1391
                [% IF item_checkouts %]
1384
                    <td class="date_due" data-order="[% ITEM_RESULT.checkout.date_due | html %]">[% ITEM_RESULT.checkout.date_due | $KohaDates as_due_date => 1 %]</td>
1392
                    <td class="date_due" data-order="[% ITEM_RESULT.checkout.date_due | html %]">[% ITEM_RESULT.checkout.date_due | $KohaDates as_due_date => 1 %]</td>
1385
                [% ELSE %]
1386
                    <td class="date_due"></td>
1387
                [% END %]
1393
                [% END %]
1388
1394
1395
                [% IF ( itemdata_barcode ) %]
1389
                    <td class="barcode" property="serialNumber">[% ITEM_RESULT.barcode | html %]</td>
1396
                    <td class="barcode" property="serialNumber">[% ITEM_RESULT.barcode | html %]</td>
1390
                [% IF holds_count.defined || show_priority %]
1397
                [% END %]
1398
1399
                [% IF item_level_holds > 0 %]
1391
                    <td class="holds_count">
1400
                    <td class="holds_count">
1392
                        [% IF holds_count.defined %] [% ITEM_RESULT.holds_count | html %] [% END %]
1401
                        [% IF holds_count.defined %] [% ITEM_RESULT.holds_count | html %] [% END %]
1393
                        [% IF ITEM_RESULT.priority %]
1402
                        [% IF ITEM_RESULT.priority %]
Lines 1399-1404 Link Here
1399
                        [% END %]
1408
                        [% END %]
1400
                    </td>
1409
                    </td>
1401
                [% END %]
1410
                [% END %]
1411
1402
                [% IF ShowCourseReservesHeader %]
1412
                [% IF ShowCourseReservesHeader %]
1403
                    <td>
1413
                    <td>
1404
                        [% IF ITEM_RESULT.course_reserves %]
1414
                        [% IF ITEM_RESULT.course_reserves %]
(-)a/opac/opac-detail.pl (-15 / +22 lines)
Lines 670-675 my $holdable_items = $biblio->items->filter_by_for_hold->count; Link Here
670
my $can_holds_be_placed = $patron ? 0 : $holdable_items;
670
my $can_holds_be_placed = $patron ? 0 : $holdable_items;
671
671
672
my ( $itemloop_has_images, $otheritemloop_has_images );
672
my ( $itemloop_has_images, $otheritemloop_has_images );
673
my $item_level_holds;
674
my $item_checkouts;
673
if ( not $viewallitems and $items->count > $max_items_to_display ) {
675
if ( not $viewallitems and $items->count > $max_items_to_display ) {
674
    $template->param(
676
    $template->param(
675
        too_many_items => 1,
677
        too_many_items => 1,
Lines 681-686 else { Link Here
681
    while ( my $item = $items->next ) {
683
    while ( my $item = $items->next ) {
682
        my $item_info = $item->unblessed;
684
        my $item_info = $item->unblessed;
683
        $item_info->{holds_count} = $item_reserves{ $item->itemnumber };
685
        $item_info->{holds_count} = $item_reserves{ $item->itemnumber };
686
        if( $item_info->{holds_count} && $item_info->{holds_count} > 0 ){ $item_level_holds = 1; }
684
        $item_info->{priority}    = $priority{ $item->itemnumber };
687
        $item_info->{priority}    = $priority{ $item->itemnumber };
685
688
686
        # Get opac_info from Additional contents for home and holding library
689
        # Get opac_info from Additional contents for home and holding library
Lines 721-729 else { Link Here
721
        $item_info->{'description'} =
724
        $item_info->{'description'} =
722
          $itemtypes->{ $itemtype->itemtype }->{translated_description};
725
          $itemtypes->{ $itemtype->itemtype }->{translated_description};
723
726
727
        $item_info->{checkout} = $item->checkout;
728
        if( $item_info->{checkout} && $item_info->{checkout} > 0 ){ $item_checkouts = 1; }
729
724
        foreach my $field (
730
        foreach my $field (
725
            qw(ccode materials enumchron copynumber itemnotes location_description uri)
731
            qw(ccode materials enumchron copynumber itemnotes location_description uri barcode itemcallnumber))
726
          )
727
        {
732
        {
728
            $itemfields{$field} = 1 if $item_info->{$field};
733
            $itemfields{$field} = 1 if $item_info->{$field};
729
        }
734
        }
Lines 735-741 else { Link Here
735
            $item_info->{serial} = $serial if $serial;
740
            $item_info->{serial} = $serial if $serial;
736
        }
741
        }
737
742
738
        $item_info->{checkout} = $item->checkout;
739
        $item_info->{object} = $item;
743
        $item_info->{object} = $item;
740
744
741
745
Lines 772-777 else { Link Here
772
}
776
}
773
777
774
$template->param(
778
$template->param(
779
    item_checkouts           => $item_checkouts,
780
    item_level_holds         => $item_level_holds,
775
    ReservableItems          => $can_holds_be_placed,
781
    ReservableItems          => $can_holds_be_placed,
776
    itemloop_has_images      => $itemloop_has_images,
782
    itemloop_has_images      => $itemloop_has_images,
777
    otheritemloop_has_images => $otheritemloop_has_images,
783
    otheritemloop_has_images => $otheritemloop_has_images,
Lines 798-814 if( C4::Context->preference('ArticleRequests') ) { Link Here
798
    $template->param( artreqpossible => $artreqpossible );
804
    $template->param( artreqpossible => $artreqpossible );
799
}
805
}
800
806
801
    $template->param(
807
$template->param(
802
                     MARCNOTES               => $marcnotesarray,
808
    MARCNOTES               => $marcnotesarray,
803
                     itemdata_ccode          => $itemfields{ccode},
809
    itemdata_ccode          => $itemfields{ccode},
804
                     itemdata_materials      => $itemfields{materials},
810
    itemdata_materials      => $itemfields{materials},
805
                     itemdata_enumchron      => $itemfields{enumchron},
811
    itemdata_enumchron      => $itemfields{enumchron},
806
                     itemdata_uri            => $itemfields{uri},
812
    itemdata_uri            => $itemfields{uri},
807
                     itemdata_copynumber     => $itemfields{copynumber},
813
    itemdata_copynumber     => $itemfields{copynumber},
808
                     itemdata_itemnotes      => $itemfields{itemnotes},
814
    itemdata_itemnotes      => $itemfields{itemnotes},
809
                     itemdata_location       => $itemfields{location_description},
815
    itemdata_location       => $itemfields{location_description},
810
                     OpacStarRatings         => C4::Context->preference("OpacStarRatings"),
816
    itemdata_barcode        => $itemfields{barcode},
811
    );
817
    itemdata_itemcallnumber => $itemfields{itemcallnumber},
818
    OpacStarRatings         => C4::Context->preference("OpacStarRatings"),
819
);
812
820
813
if (C4::Context->preference("AlternateHoldingsField") && $items->count == 0) {
821
if (C4::Context->preference("AlternateHoldingsField") && $items->count == 0) {
814
    my $fieldspec = C4::Context->preference("AlternateHoldingsField");
822
    my $fieldspec = C4::Context->preference("AlternateHoldingsField");
815
- 

Return to bug 34486