Koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recall.tt
Aleisha Amohia 52b5cdf79b Bug 19532: Recalls on OPAC
- place a biblio-level or item-level recall via the biblio detail page, OPAC search results, or course reserves
- view or cancel your active recalls from 'your summary' recalls tab
- view all active and inactive (and cancel active) recalls from 'your recall history'
- stopped from placing a reserve on an item that the patron has already recalled

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-14 22:45:51 -10:00

199 lines
14 KiB
Text

[% USE Koha %]
[% USE KohaDates %]
[% USE Branches %]
[% USE ItemTypes %]
[% USE AuthorisedValues %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Recall &rsaquo; [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
[% INCLUDE 'doc-head-close.inc' %]
[% BLOCK cssinclude %][% END %]
</head>
<body id="opac-recall" class="scrollto">
[% INCLUDE 'masthead.inc' %]
<div class="main">
<ul class="breadcrumb">
<li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
<li><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | uri %]">Details for: [% biblio.title | html %]</a> <span class="divider">&rsaquo;</span></li>
<li><a href="/cgi-bin/koha/opac-recall.pl?biblionumber=[% biblio.biblionumber | uri %]">Place recall</a></li>
</ul>
<div class="container-fluid">
<div class="row-fluid">
<div class="span2">
<div id="navigation">
[% INCLUDE 'navigation.inc' IsPatronPage=1 %]
</div>
</div>
<div class="span10">
<div id="recall" class="maincontent">
<h1>Confirm recalls for: [% INCLUDE 'patron-title.inc' patron = logged_in_user %] ([% logged_in_user.cardnumber | html %])</h1>
[% IF nosyspref %]
Recalls have not been enabled. Please contact your library.
[% ELSIF error == 'unavailable' %]
There are no items available for recall.
<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | uri %]">Return to [% biblio.title | html %]</a>
[% ELSE %]
[% IF error %]
<div class="dialog alert">
[% IF error == 'duplicate' %]
You have reached the maximum number of recalls on this record.
[% ELSIF error == 'unavailable' %]
There are no items available for recall.
[% ELSIF error == 'cannot' %]
You cannot place a recall on this item.
[% ELSE %]
An error has occurred while attempting to place a recall. Please contact your library.
[% END %]
</div>
[% END %]
[% IF success %]
<p>Your recall has been placed. The patron the item is currently checked out to has been asked to return the item within [% due_interval | html %] days, by [% due_date | $KohaDates %].</p>
<p>You will be notified when your item is waiting to be picked up at the library.</p>
[% ELSIF not error %]
<p>All borrowable material is subject to recall if checked out and needed by someone else. We will ask the person who has checked out this item to return it so you may use it.</p>
[% IF logged_in_user %]
<div class="dialog">
<form id="recallform" action="/cgi-bin/koha/opac-recall.pl" method="get">
<fieldset class="rows" id="options">
<legend>Place a recall on <b>[% biblio.title | html %]</b> ([% biblio.author | html %])?</legend>
<ul>
[% UNLESS ( single_branch_mode ) %]<li>
<label for="pickup">Pick up location:</label>
<select name="pickup" id="pickup">
[% FOREACH branch IN branches %]
[% IF branch.branchcode == logged_in_user.branchcode %]
<option value="[% branch.branchcode | html %]" selected>[% Branches.GetName( branch.branchcode ) | html %]</option>
[% ELSE %]
<option value="[% branch.branchcode | html %]">[% Branches.GetName( branch.branchcode ) | html %]</option>
[% END %]
[% END %]
</select>
</li>[% END %]
<li><label for="expirationdate">Recall not needed after:</label> <input type="text" name="expirationdate" id="expirationdate" size="20"> <a id="cleartext" style="display:none;">Clear text</a><span id="expiration-hint">[% INCLUDE 'date-format.inc' %]</span></li>
<li class="level-option" style="display:none;"><label for="bibliolevel">Recall next available item</label> <input type="radio" name="type" id="bibliolevel" value="bibliolevel" checked></li>
<li class="level-option" style="display:none;"><label for="itemlevel">Recall a specific item</label> <input type="radio" name="type" id="itemlevel" value="itemlevel"></li>
<table class="table table-bordered table-striped" id="items">
<caption>Select a specific item:</caption>
<tr>
<th>&nbsp;</th>
<th>Item type</th>
<th>Barcode</th>
[% UNLESS ( single_branch_mode ) %]
<th>Home library</th>
<th>Last location</th>
[% END %]
<th>Collection</th>
<th>Call number</th>
<th>Copy number</th>
<th>Vol info</th>
<th>Information</th>
</tr>
[% FOREACH item IN items %]<tr>
<td>
[% IF item.can_be_recalled( patron => logged_in_user ) %]
<input type="radio" class="itemnumber" name="itemnumber" value="[% item.itemnumber | html %]">
[% ELSE %]
<input disabled="disabled" type="radio" class="itemnumber" name="itemnumber" value="[% item.itemnumber | html %]" style="display:none;" />
<img src="[% interface | html %]/lib/famfamfam/cross.png" alt="Cannot be recalled" title="Cannot be recalled" />
[% END %]
</td>
<td>[% ItemTypes.GetDescription( item.effective_itemtype ) | html %]</td>
<td>[% item.barcode | html %]</td>
[% UNLESS ( single_branch_mode ) %]
<td>[% Branches.GetName( item.homebranch ) | html %]</td>
<td>[% Branches.GetName( item.holdingbranch) | html %]</td>
[% END %]
<td>[% AuthorisedValues.GetByCode( 'CCODE', item.ccode, 1 ) | html %]</td>
<td>[% item.itemcallnumber | html %]</td>
<td>[% item.copynumber | html %]</td>
<td>[% item.enumchron | html %]</td>
<td>
[% IF ( item.checkout ) %]
<span class="checkedout">Due [% item.checkout.date_due | $KohaDates %]</span>
[% ELSIF ( item.get_transfer ) %]
<span class="intransit">In transit from [% Branches.GetName( item.get_transfer.frombranch ) | html %] to [% Branches.GetName( item.get_transfer.tobranch ) | html %] since [% item.get_transfer.datesent | $KohaDates %]</span>
[% END %]
[% IF ( item.itemlost || item.withdrawn ) %]
<span class="lost">Unavailable (lost or missing)</span>
[% END %]
[% IF ( item.notforloan ) %]
<span class="notforloan">Not for loan ([% item.notforloan | html %])</span>
[% END %]
[% hold = item.current_holds.next %]
[% IF ( item.recall ) %]
<span class="waiting">
[% IF ( item.recall.waitingdate ) %]
Waiting for patron at [% Branches.GetName( item.recall.branchcode ) | html %] since [% item.recall.waitingdate | $KohaDates %].
[% ELSE %]
Recalled by patron expected at [% Branches.GetName( item.recall.branchcode ) | html %] since [% item.recall.recalldate | $KohaDates %].
[% END %]
</span>
[% ELSIF ( hold.waitingdate ) %]
<span class="waiting">
Waiting for patron at [% Branches.GetName( hold.branchcode ) | html %] since [% hold.waitingdate | $KohaDates %].
</span>
[% ELSIF ( hold.borrowernumber == logged_in_user.borrowernumber ) %]
<span class="waiting">
You have already placed a <a href="/cgi-bin/koha/opac-user.pl#opac-user-holds">reserve</a> on this item.
</span>
[% END # / IF ( item.recall or hold ) %]
</td>
</tr>[% END %]
</table>
</fieldset>
<fieldset class="action">
<input type="hidden" name="op" value="request">
<input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]">
<input type="submit" class="btn" value="Confirm">
<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | uri %]" class="cancel">Cancel</a>
</fieldset>
</form>
</div>
[% ELSE %]
<div class="dialog alert">You must be logged in to place a recall.</div>
[% END %]
[% END %]
[% END %] <!-- norecalls -->
</div> <!-- / #recall -->
</div> <!-- / .span10 -->
</div> <!-- / .row-fluid -->
</div> <!-- / .container-fluid -->
</div> <!-- / .main -->
[% INCLUDE 'opac-bottom.inc' %]
[% BLOCK jsinclude %]
[% INCLUDE 'calendar.inc' %]
<script>
$(document).ready(function(){
$(".level-option").show();
$("#cleartext").show();
$("#items").hide();
$("#expiration-hint").hide();
$("#cleartext").click(function(){
$(this).siblings("input").val("");
});
$("#itemlevel").click(function(){
if ( $("#itemlevel").is(':checked') ){
$("#items").show();
$("input:radio[name='itemnumber']:not(:disabled)").first().attr("checked", "checked"); // selects first item in table
}
});
$("#bibliolevel").click(function(){
if ( $("#bibliolevel").is(':checked') ){
$("#items").hide();
}
});
$("#expirationdate").datepicker({
minDate: 0,
});
});
</script>
[% END %]