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

(-)a/C4/Items.pm (-1 / +3 lines)
Lines 1338-1344 sub GetItemsInfo { Link Here
1338
           holding.branchcode,
1338
           holding.branchcode,
1339
           holding.branchname,
1339
           holding.branchname,
1340
           holding.opac_info as holding_branch_opac_info,
1340
           holding.opac_info as holding_branch_opac_info,
1341
           home.opac_info as home_branch_opac_info
1341
           home.opac_info as home_branch_opac_info,
1342
           tmp_holdsqueue.itemnumber AS pending_hold
1342
    ";
1343
    ";
1343
    $query .= "
1344
    $query .= "
1344
     FROM items
1345
     FROM items
Lines 1350-1355 sub GetItemsInfo { Link Here
1350
     LEFT JOIN borrowers USING (borrowernumber)
1351
     LEFT JOIN borrowers USING (borrowernumber)
1351
     LEFT JOIN serialitems USING (itemnumber)
1352
     LEFT JOIN serialitems USING (itemnumber)
1352
     LEFT JOIN serial USING (serialid)
1353
     LEFT JOIN serial USING (serialid)
1354
     LEFT JOIN tmp_holdsqueue USING (itemnumber)
1353
     LEFT JOIN itemtypes   ON   itemtypes.itemtype         = "
1355
     LEFT JOIN itemtypes   ON   itemtypes.itemtype         = "
1354
     . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype');
1356
     . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype');
1355
    $query .= q|
1357
    $query .= q|
(-)a/C4/Search.pm (-1 / +1 lines)
Lines 2233-2239 sub searchResults { Link Here
2233
        # XSLT processing of some stuff
2233
        # XSLT processing of some stuff
2234
        # we fetched the sysprefs already before the loop through all retrieved record!
2234
        # we fetched the sysprefs already before the loop through all retrieved record!
2235
        if (!$scan && $xslfile) {
2235
        if (!$scan && $xslfile) {
2236
            $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $xslsyspref, 1, \@hiddenitems, $sysxml, $xslfile, $lang);
2236
            $oldbiblio->{XSLTResultsRecord} = C4::XSLT::XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $xslsyspref, 1, \@hiddenitems, $sysxml, $xslfile, $lang);
2237
        # the last parameter tells Koha to clean up the problematic ampersand entities that Zebra outputs
2237
        # the last parameter tells Koha to clean up the problematic ampersand entities that Zebra outputs
2238
        }
2238
        }
2239
2239
(-)a/C4/XSLT.pm (-1 / +5 lines)
Lines 27-32 use C4::Context; Link Here
27
use C4::Items;
27
use C4::Items;
28
use C4::Koha;
28
use C4::Koha;
29
use C4::Biblio;
29
use C4::Biblio;
30
use C4::HoldsQueue;
30
use C4::Circulation;
31
use C4::Circulation;
31
use C4::Reserves;
32
use C4::Reserves;
32
use Koha::AuthorisedValues;
33
use Koha::AuthorisedValues;
Lines 292-298 sub buildKohaItemsNamespace { Link Here
292
        my $reservestatus = C4::Reserves::GetReserveStatus( $item->{itemnumber} );
293
        my $reservestatus = C4::Reserves::GetReserveStatus( $item->{itemnumber} );
293
294
294
        if ( $itemtypes->{ $item->{itype} }->{notforloan} || $item->{notforloan} || $item->{onloan} || $item->{withdrawn} || $item->{itemlost} || $item->{damaged} ||
295
        if ( $itemtypes->{ $item->{itype} }->{notforloan} || $item->{notforloan} || $item->{onloan} || $item->{withdrawn} || $item->{itemlost} || $item->{damaged} ||
295
             (defined $transfertwhen && $transfertwhen ne '') || $item->{itemnotforloan} || (defined $reservestatus && $reservestatus eq "Waiting") ){ 
296
             (defined $transfertwhen && $transfertwhen ne '') || $item->{itemnotforloan} || (defined $reservestatus && $reservestatus eq "Waiting") || $item->{pending_hold} ){
296
            if ( $item->{notforloan} < 0) {
297
            if ( $item->{notforloan} < 0) {
297
                $status = "On order";
298
                $status = "On order";
298
            } 
299
            } 
Lines 317-322 sub buildKohaItemsNamespace { Link Here
317
            if (defined $reservestatus && $reservestatus eq "Waiting") {
318
            if (defined $reservestatus && $reservestatus eq "Waiting") {
318
                $status = 'Waiting';
319
                $status = 'Waiting';
319
            }
320
            }
321
            if ($item->{pending_hold}) {
322
                $status = 'Pending hold';
323
            }
320
        } else {
324
        } else {
321
            $status = "available";
325
            $status = "available";
322
        }
326
        }
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc (+5 lines)
Lines 78-83 not use an API to fetch items that populates item.datedue. Link Here
78
    <span class="item-status onorder">On order</span>
78
    <span class="item-status onorder">On order</span>
79
[% END %]
79
[% END %]
80
80
81
[% IF item.pending_hold %]
82
    [% SET itemavailable = 0 %]
83
    <span class="item-status pendinghold">Pending hold</span>
84
[% END %]
85
81
[% IF ( itemavailable ) %]
86
[% IF ( itemavailable ) %]
82
    <span class="item-status available">Available [% IF ( item.restrictedopac ) %]<span class="restricted">([% item.restrictedopac %])</span>[% END %]</span>
87
    <span class="item-status available">Available [% IF ( item.restrictedopac ) %]<span class="restricted">([% item.restrictedopac %])</span>[% END %]</span>
83
[% END %]
88
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl (-1 / +6 lines)
Lines 1280-1285 Link Here
1280
                       <xsl:value-of select="count(key('item-by-status', 'On order'))"/>
1280
                       <xsl:value-of select="count(key('item-by-status', 'On order'))"/>
1281
                       <xsl:text>). </xsl:text>                   </span>
1281
                       <xsl:text>). </xsl:text>                   </span>
1282
                   </xsl:if>
1282
                   </xsl:if>
1283
                    <xsl:if test="count(key('item-by-status', 'Pending hold'))>0">
1284
                   <span class="unavailable">
1285
                       <xsl:text>Pending hold (</xsl:text>
1286
                       <xsl:value-of select="count(key('item-by-status', 'Pending hold'))"/>
1287
                       <xsl:text>). </xsl:text>                   </span>
1288
                   </xsl:if>
1283
                    <xsl:if test="count(key('item-by-status', 'In transit'))>0">
1289
                    <xsl:if test="count(key('item-by-status', 'In transit'))>0">
1284
                   <span class="unavailable">
1290
                   <span class="unavailable">
1285
                       <xsl:text>In transit (</xsl:text>
1291
                       <xsl:text>In transit (</xsl:text>
1286
- 

Return to bug 15505