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

(-)a/C4/Reserves.pm (+1 lines)
Lines 358-363 sub GetReservesFromItemnumber { Link Here
358
        $r->get_column('branchcode'),
358
        $r->get_column('branchcode'),
359
        $r->reserve_id(),
359
        $r->reserve_id(),
360
        $r->waitingdate(),
360
        $r->waitingdate(),
361
        $r->get_column('expirationdate'),
361
    );
362
    );
362
}
363
}
363
364
(-)a/circ/circulation.pl (-4 / +29 lines)
Lines 458-468 if ($borrowernumber) { Link Here
458
if ($borrowernumber) {
458
if ($borrowernumber) {
459
    my $holds = Koha::Holds->search( { borrowernumber => $borrowernumber } );
459
    my $holds = Koha::Holds->search( { borrowernumber => $borrowernumber } );
460
    $template->param(
460
    $template->param(
461
        holds_count  => $holds->count(),
461
        holds_count  => Koha::Database->new()->schema()
462
        WaitingHolds => scalar $holds->waiting(),
462
            ->resultset('Reserve')
463
            ->count( { borrowernumber => $borrowernumber } ),
463
    );
464
    );
464
465
    my @borrowerreserv = GetReservesFromBorrowernumber($borrowernumber);
465
    $template->param( adultborrower => 1 ) if ( $borrower->{category_type} eq 'A' || $borrower->{category_type} eq 'I' );
466
467
    my @WaitingReserveLoop;
468
    foreach my $num_res (@borrowerreserv) {
469
        if ( $num_res->{'found'} && $num_res->{'found'} eq 'W' ) {
470
            my $getiteminfo  = GetBiblioFromItemNumber( $num_res->{'itemnumber'} );
471
            my $itemholdinfo = GetReservesFromItemNumber( $num_res->{'itemnumber'} );
472
            my $itemtypeinfo = getitemtypeinfo( (C4::Context->preference('item-level_itypes')) ? $getiteminfo->{'itype'} : $getiteminfo->{'itemtype'} );
473
            my %getWaitingReserveInfo;
474
            $getWaitingReserveInfo{title}           = $getiteminfo->{'title'};
475
            $getWaitingReserveInfo{biblionumber}    = $getiteminfo->{'biblionumber'};
476
            $getWaitingReserveInfo{author}          = $getiteminfo->{'author'};
477
            $getWaitingReserveInfo{itemcallnumber}  = $getiteminfo->{'itemcallnumber'};
478
            $getWaitingReserveInfo{enumchron}       = $getiteminfo->{'enumchron'};
479
            $getWaitingReserveInfo{reservedate}     = format_date( $num_res->{'reservedate'} );
480
            $getWaitingReserveInfo{waitingat}       = GetBranchName( $num_res->{'branchcode'} );
481
            $getWaitingReserveInfo{itemtype}        = $itemtypeinfo->{'description'};
482
            $getWaitingReserveInfo{expirationdate}  = $itemholdinfo->{'expirationdate'};
483
            $getWaitingReserveInfo{waitinghere}     = 1
484
              if $num_res->{'branchcode'} eq $branch;
485
            push( @WaitingReserveLoop, \%getWaitingReserveInfo );
486
        }
487
    }
488
    $template->param( WaitingReserveLoop => \@WaitingReserveLoop );
489
    $template->param( adultborrower => 1 )
490
      if ( $borrower->{category_type} eq 'A' || $borrower->{category_type} eq 'I' );
466
}
491
}
467
492
468
#title
493
#title
(-)a/circ/returns.pl (+1 lines)
Lines 581-586 foreach ( sort { $a <=> $b } keys %returneditems ) { Link Here
581
        $ri{itemtitle}        = $biblio->{'title'};
581
        $ri{itemtitle}        = $biblio->{'title'};
582
        $ri{itemauthor}       = $biblio->{'author'};
582
        $ri{itemauthor}       = $biblio->{'author'};
583
        $ri{itemcallnumber}   = $biblio->{'itemcallnumber'};
583
        $ri{itemcallnumber}   = $biblio->{'itemcallnumber'};
584
        $ri{enumchron}        = $item->{'enumchron'};
584
        $ri{itemtype}         = $biblio->{'itemtype'};
585
        $ri{itemtype}         = $biblio->{'itemtype'};
585
        $ri{itemnote}         = $biblio->{'itemnotes'};
586
        $ri{itemnote}         = $biblio->{'itemnotes'};
586
        $ri{ccode}            = $biblio->{'ccode'};
587
        $ri{ccode}            = $biblio->{'ccode'};
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js (-2 / +10 lines)
Lines 227-233 $(document).ready(function() { Link Here
227
                                  title += " " + value.subfield;
227
                                  title += " " + value.subfield;
228
                        });
228
                        });
229
229
230
                        title += "</a></span>";
230
                        if ( oObj.enumchron ) {
231
                            title += "</a>" + " " + oObj.enumchron + "</span>";
232
                        }else{
233
                            title += "</a></span>";
234
                        }
231
235
232
                        if ( oObj.author ) {
236
                        if ( oObj.author ) {
233
                            title += " " + BY.replace( "_AUTHOR_",  " " + oObj.author );
237
                            title += " " + BY.replace( "_AUTHOR_",  " " + oObj.author );
Lines 489-495 $(document).ready(function() { Link Here
489
                                      title += " " + value.subfield;
493
                                      title += " " + value.subfield;
490
                            });
494
                            });
491
495
492
                            title += "</a></span>";
496
                            if ( oObj.enumchron ) {
497
                                title += "</a>" + " " + oObj.enumchron + "</span>";
498
                            }else{
499
                                title += "</a></span>";
500
                            }
493
501
494
                            if ( oObj.author ) {
502
                            if ( oObj.author ) {
495
                                title += " " + BY.replace( "_AUTHOR_", " " + oObj.author );
503
                                title += " " + BY.replace( "_AUTHOR_", " " + oObj.author );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-14 / +16 lines)
Lines 797-824 No patron matched <span class="ex">[% message %]</span> Link Here
797
			</ul>
797
			</ul>
798
        </div>
798
        </div>
799
799
800
            [% IF ( WaitingHolds ) %]
800
            [% IF ( WaitingReserveLoop ) %]
801
                <div id="holdswaiting" class="circmessage">
801
                <div id="holdswaiting" class="circmessage">
802
                    <h4>Holds waiting:</h4>
802
                    <h4>Holds waiting:</h4>
803
                    [% FOREACH w IN WaitingHolds %]
803
                    [% FOREACH WaitingReserveLoo IN WaitingReserveLoop %]
804
                        <ul>
804
                        <ul>
805
                            <li>
805
                            <li>
806
                                <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% w.biblio.biblionumber %]">[% w.biblio.title | html %]</a>
806
                                <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% WaitingReserveLoo.biblionumber %]">[% WaitingReserveLoo.title | html %]</a> 
807
                                ([% ItemTypes.GetDescription( w.item.effective_itemtype ) %]),
807
                                ([% WaitingReserveLoo.itemtype %])
808
                                [% IF ( w.biblio.author ) %] by [% w.biblio.author | html %] [% END %]
808
                                [% IF ( WaitingReserveLoo.enumchron ) %] [% WaitingReserveLoo.enumchron %][% END %],
809
                                [% IF ( w.item.itemcallnumber ) %] [[% w.item.itemcallnumber %]] [% END %]
809
                                [% IF ( WaitingReserveLoo.author ) %]<br/>by [% WaitingReserveLoo.author | html %][% END %]
810
                                Hold placed on [% w.reservedate | $KohaDates %].
810
                                [% IF ( WaitingReserveLoo.itemcallnumber ) %][[% WaitingReserveLoo.itemcallnumber %]] [% END %]
811
811
                                Hold placed on [% WaitingReserveLoo.reservedate %].
812
                                <br/>
812
813
                                [% IF ( w.branch.branchcode == Branches.GetLoggedInBranchcode()  ) %]<strong class="waitinghere">[% ELSE %]<strong>[% END %]
813
                                <br />
814
                                    [% SET waiting_expires_on = w.waiting_expires_on %]
814
                                [% IF ( WaitingReserveLoo.waitingat ) %]
815
                                    Waiting at [% w.branch.branchname | html %] [% IF waiting_expires_on %] until [% waiting_expires_on | $KohaDates %] [% END %]
815
                                    [% IF ( WaitingReserveLoo.waitinghere ) %]<strong class="waitinghere">[% ELSE %]<strong>[% END %]
816
                                </strong>
816
                                        Waiting at [% WaitingReserveLoo.waitingat %] [% IF WaitingReserveLoo.expiratedate %] until [% WaitingReserveLoo.expirationdate | $KohaDates %] [% END %]
817
                                    </strong>
818
                                [% END %]
817
                            </li>
819
                            </li>
818
                        </ul>
820
                        </ul>
819
                    [% END %]
821
                    [% END %]
820
                </div>
822
                </div>
821
            [% END %]
823
            <!-- /If WaitingReserveLoop -->[% END %]
822
824
823
	[% IF ( notes ) %]
825
	[% IF ( notes ) %]
824
			<div id="circnotes" class="circmessage">
826
			<div id="circnotes" class="circmessage">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-1 / +1 lines)
Lines 580-586 $(document).ready(function () { Link Here
580
                [% END %]
580
                [% END %]
581
            </td>
581
            </td>
582
            <td class="ci-title"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% riloo.itembiblionumber %]">
582
            <td class="ci-title"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% riloo.itembiblionumber %]">
583
                    [% riloo.itemtitle |html %]</a></td>
583
                    [% riloo.itemtitle |html %]</a>[% IF ( riloo.enumchron ) %]<br/>[% riloo.enumchron %][% END %]</td>
584
            <td class="ci-author">[% riloo.itemauthor %]</td>
584
            <td class="ci-author">[% riloo.itemauthor %]</td>
585
            <td class="ci-barcode"><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% riloo.itembiblionumber %]&amp;itemnumber=[% riloo.itemnumber %]#item[% riloo.itemnumber %]">[% riloo.barcode %]</a></td>
585
            <td class="ci-barcode"><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% riloo.itembiblionumber %]&amp;itemnumber=[% riloo.itemnumber %]#item[% riloo.itemnumber %]">[% riloo.barcode %]</a></td>
586
            <td class="ci-homelibrary">[% riloo.homebranch %]</td>
586
            <td class="ci-homelibrary">[% riloo.homebranch %]</td>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-1 / +3 lines)
Lines 193-198 Link Here
193
193
194
                                                <td class="title">
194
                                                <td class="title">
195
                                                    <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ISSUE.biblionumber %]">[% ISSUE.title |html %] [% FOREACH subtitl IN ISSUE.subtitle %] [% subtitl.subfield %][% END %]</a>
195
                                                    <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ISSUE.biblionumber %]">[% ISSUE.title |html %] [% FOREACH subtitl IN ISSUE.subtitle %] [% subtitl.subfield %][% END %]</a>
196
                                                    [% IF ( ISSUE.enumchron ) %] [% ISSUE.enumchron %][% END %]
196
                                                    <span class="item-details">[% ISSUE.author %]</span>
197
                                                    <span class="item-details">[% ISSUE.author %]</span>
197
                                                </td>
198
                                                </td>
198
                                                [% IF ( ISSUE.overdue ) %]
199
                                                [% IF ( ISSUE.overdue ) %]
Lines 353-359 Link Here
353
                                                <td><img src="[% themelang %]/images/[% WAITIN.itemtype %].gif" alt="[% WAITIN.itemtype %]" title="[% WAITIN.itemtype %]" /></td>
354
                                                <td><img src="[% themelang %]/images/[% WAITIN.itemtype %].gif" alt="[% WAITIN.itemtype %]" title="[% WAITIN.itemtype %]" /></td>
354
                                                <td>
355
                                                <td>
355
                                                    <a class="title" href="opac-detail.pl?biblionumber=[% WAITIN.biblionumber %]">
356
                                                    <a class="title" href="opac-detail.pl?biblionumber=[% WAITIN.biblionumber %]">
356
                                                        [% WAITIN.waiting_title %] [% FOREACH subtitl IN WAITIN.subtitle %] [% subtitl.subfield %][% END %]
357
                                                        [% WAITIN.waiting_title %] [% IF ( WAITIN.enumchron ) %][% WAITIN.enumchron %] [% END %][% FOREACH subtitl IN WAITIN.subtitle %] [% subtitl.subfield %][% END %]
357
                                                    </a>
358
                                                    </a>
358
                                                    <span class="item-details">
359
                                                    <span class="item-details">
359
                                                        [% WAITIN.author %]
360
                                                        [% WAITIN.author %]
Lines 540-545 Link Here
540
                                            <td class="title">
541
                                            <td class="title">
541
                                                <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RESERVE.biblionumber %]">
542
                                                <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RESERVE.biblionumber %]">
542
                                                    [% RESERVE.reserves_title %]
543
                                                    [% RESERVE.reserves_title %]
544
                                                    [% IF ( WAITIN.enumchron ) %] [% WAITIN.enumchron %][% END %]
543
                                                    [% FOREACH subtitl IN RESERVE.subtitle %]
545
                                                    [% FOREACH subtitl IN RESERVE.subtitle %]
544
                                                        [% subtitl.subfield %]
546
                                                        [% subtitl.subfield %]
545
                                                    [% END %]
547
                                                    [% END %]
(-)a/opac/opac-user.pl (+1 lines)
Lines 312-317 my $wcount = 0; Link Here
312
foreach my $res (@reserves) {
312
foreach my $res (@reserves) {
313
    if ( $res->{'itemnumber'} ) {
313
    if ( $res->{'itemnumber'} ) {
314
        my $item = GetItem( $res->{'itemnumber'});
314
        my $item = GetItem( $res->{'itemnumber'});
315
        $res->{enumchron} = $item->{enumchron};
315
        $res->{'holdingbranch'} =
316
        $res->{'holdingbranch'} =
316
          $branches->{ $item->{'holdingbranch'} }->{'branchname'};
317
          $branches->{ $item->{'holdingbranch'} }->{'branchname'};
317
        $res->{'branch'} = $branches->{ $res->{'branchcode'} }->{'branchname'};
318
        $res->{'branch'} = $branches->{ $res->{'branchcode'} }->{'branchname'};
(-)a/svc/checkouts (-2 / +2 lines)
Lines 93-99 my $sql = ' Link Here
93
        itemlost,
93
        itemlost,
94
        damaged,
94
        damaged,
95
        location,
95
        location,
96
96
        items.enumchron,
97
        DATEDIFF( issuedate, CURRENT_DATE() ) AS not_issued_today
97
        DATEDIFF( issuedate, CURRENT_DATE() ) AS not_issued_today
98
    FROM issues
98
    FROM issues
99
        LEFT JOIN items USING ( itemnumber )
99
        LEFT JOIN items USING ( itemnumber )
Lines 168-173 while ( my $c = $sth->fetchrow_hashref() ) { Link Here
168
        date_due_overdue    => $c->{date_due_overdue} ? JSON::true : JSON::false,
168
        date_due_overdue    => $c->{date_due_overdue} ? JSON::true : JSON::false,
169
        timestamp           => $c->{timestamp},
169
        timestamp           => $c->{timestamp},
170
        onsite_checkout         => $c->{onsite_checkout},
170
        onsite_checkout         => $c->{onsite_checkout},
171
        enumchron           => $c->{enumchron},
171
        renewals_count      => $renewals_count,
172
        renewals_count      => $renewals_count,
172
        renewals_allowed    => $renewals_allowed,
173
        renewals_allowed    => $renewals_allowed,
173
        renewals_remaining  => $renewals_remaining,
174
        renewals_remaining  => $renewals_remaining,
174
- 

Return to bug 14668