Bug 27924: Display number of holds awaiting pickup on check out screens
This patch modifies the checkout page so that waiting holds are displayed separately depending on whether they are waiting at the current branch or not. A count of each number of waiting holds is displayed too. Unrelated change: A missing </li> has been added for markup validity. To test, apply the patch and view the checkout screen in these situations: - A patron with no waiting holds. - A patron with one or more holds waiting at the current library. - A patron with one or more holds waiting at another library. - A patron with holds waiting at both the current library and at other libraries. In each case, the display of waiting hold information should be correct, including the count of holds of each kind. Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
35226bab68
commit
bb5f0eea74
|
|
@ -830,7 +830,7 @@
|
|||
[% SET ClaimReturnedWarningThreshold = Koha.Preference('ClaimReturnedWarningThreshold') %]
|
||||
[% SET return_claims = patron.return_claims %]
|
||||
[% IF return_claims.count > ClaimReturnedWarningThreshold %]
|
||||
<li><span class="circ-hlt return-claims">Return claims: Patron has [% return_claims.count | html %] RETURN CLAIMS.</span>
|
||||
<li><span class="circ-hlt return-claims">Return claims: Patron has [% return_claims.count | html %] RETURN CLAIMS.</span></li>
|
||||
[% END %]
|
||||
|
||||
|
||||
|
|
@ -869,24 +869,60 @@
|
|||
|
||||
[% IF WaitingHolds.count %]
|
||||
<div id="holdswaiting" class="circmessage">
|
||||
<h4>Holds waiting:</h4>
|
||||
[% SET waiting_here = 0 %]
|
||||
[% SET waiting_elsewhere = 0 %]
|
||||
[% FOREACH w IN WaitingHolds %]
|
||||
<ul>
|
||||
<li>
|
||||
<a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% w.biblio.biblionumber | uri %]">[% w.biblio.title | html %]</a>
|
||||
([% ItemTypes.GetDescription( w.item.effective_itemtype ) | html %]),
|
||||
[% IF ( w.biblio.author ) %] by [% w.biblio.author | html %] [% END %]
|
||||
[% IF ( w.item.itemcallnumber ) %] [[% w.item.itemcallnumber | html %]] [% END %]
|
||||
Hold placed on [% w.reservedate | $KohaDates %].
|
||||
[% IF ( w.branch.branchcode == Branches.GetLoggedInBranchcode() ) %]
|
||||
[% waiting_here = waiting_here + 1 %]
|
||||
[% ELSE %]
|
||||
[% waiting_elsewhere = waiting_elsewhere + 1 %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
<br/>
|
||||
[% IF ( w.branch.branchcode == Branches.GetLoggedInBranchcode() ) %]<strong class="waitinghere">[% ELSE %]<strong>[% END %]
|
||||
[% SET expires_on = w.expirationdate %]
|
||||
Waiting at [% w.branch.branchname | html %] [% IF expires_on %] until [% expires_on | $KohaDates %] [% END %]
|
||||
</strong>
|
||||
</li>
|
||||
[% IF ( waiting_here > 0 ) %]
|
||||
<h4>Holds waiting here ([% waiting_here | html %])</h4>
|
||||
<ul>
|
||||
[% FOREACH w IN WaitingHolds %]
|
||||
[% IF ( w.branch.branchcode == Branches.GetLoggedInBranchcode() ) %]
|
||||
<li>
|
||||
<a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% w.biblio.biblionumber | uri %]">[% w.biblio.title | html %]</a>
|
||||
([% ItemTypes.GetDescription( w.item.effective_itemtype ) | html %]),
|
||||
[% IF ( w.biblio.author ) %] by [% w.biblio.author | html %] [% END %]
|
||||
[% IF ( w.item.itemcallnumber ) %] [[% w.item.itemcallnumber | html %]] [% END %]
|
||||
Hold placed on [% w.reservedate | $KohaDates %].
|
||||
<br />
|
||||
<strong class="waitinghere">
|
||||
[% SET expires_on = w.expirationdate %]
|
||||
Waiting here [% IF expires_on %] until [% expires_on | $KohaDates %] [% END %]
|
||||
</strong>
|
||||
</li>
|
||||
[% END %]
|
||||
[% END %]
|
||||
</ul>
|
||||
[% END %]
|
||||
|
||||
[% IF ( waiting_elsewhere > 0 ) %]
|
||||
<h4>Holds waiting at other libraries ([% waiting_elsewhere | html %])</h4>
|
||||
<ul>
|
||||
[% FOREACH w IN WaitingHolds %]
|
||||
[% IF ( w.branch.branchcode != Branches.GetLoggedInBranchcode() ) %]
|
||||
<li>
|
||||
<a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% w.biblio.biblionumber | uri %]">[% w.biblio.title | html %]</a>
|
||||
([% ItemTypes.GetDescription( w.item.effective_itemtype ) | html %]),
|
||||
[% IF ( w.biblio.author ) %] by [% w.biblio.author | html %] [% END %]
|
||||
[% IF ( w.item.itemcallnumber ) %] [[% w.item.itemcallnumber | html %]] [% END %]
|
||||
Hold placed on [% w.reservedate | $KohaDates %].
|
||||
<br />
|
||||
<strong>
|
||||
[% SET expires_on = w.expirationdate %]
|
||||
Waiting at [% w.branch.branchname | html %] [% IF expires_on %] until [% expires_on | $KohaDates %] [% END %]
|
||||
</strong>
|
||||
</li>
|
||||
[% END %]
|
||||
[% END %]
|
||||
</ul>
|
||||
[% END %]
|
||||
|
||||
</div>
|
||||
[% END # /IF WaitingHolds.count %]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue