Marcel de Rooy
7e85abde99
Clear enough? Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
204 lines
14 KiB
Text
204 lines
14 KiB
Text
[% USE Koha %]
|
|
[% USE KohaDates %]
|
|
[% USE Branches %]
|
|
[% USE ItemTypes %]
|
|
[% USE AuthorisedValues %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Recall › [% 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">
|
|
<nav aria-label="breadcrumb">
|
|
<ul class="breadcrumb">
|
|
<li class="breadcrumb-item">
|
|
<a href="/cgi-bin/koha/opac-main.pl">Home</a>
|
|
</li>
|
|
<li class="breadcrumb-item">
|
|
<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | uri %]">Details for: [% biblio.title | html %]</a>
|
|
</li>
|
|
<li class="breadcrumb-item">
|
|
<a href="/cgi-bin/koha/opac-recall.pl?biblionumber=[% biblio.biblionumber | uri %]">Place recall</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col col-lg-2 order-2 order-lg-1">
|
|
<div id="navigation">
|
|
[% INCLUDE 'navigation.inc' IsPatronPage=1 %]
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12 col-lg-10 order-1 order-lg-2">
|
|
<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" class="flatpickr futuredate" />
|
|
<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> </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 btn-primary" 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> <!-- / .col-md-12 -->
|
|
</div> <!-- / .row -->
|
|
</div> <!-- / .container-fluid -->
|
|
</div> <!-- / .main -->
|
|
|
|
[% INCLUDE 'opac-bottom.inc' %]
|
|
[% BLOCK jsinclude %]
|
|
[% INCLUDE 'calendar.inc' %]
|
|
<script>
|
|
$(document).ready(function(){
|
|
$(".level-option").show();
|
|
$("#items").hide();
|
|
$("#expiration-hint").hide();
|
|
$("#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();
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
[% END %]
|