555d0d5898
This patch adds the new renewal errors 'auto_renew' and 'auto_too_soon' to the renewal interface. To test: 1) Issue two items: - one with automatic renewal and no value for "No renewal before" - another with automatic renewal and a value for "No renewal before" 2) Try to renew: Home > Circulation > Renew 3) Confirm there are error messages explaining that the items have been scheduled for automatic renewal and that one of the renewals is also premature. 4) If global syspref AllowRenewalLimitOverride is set to "Allow" you should be given the option to override. Sponsored-by: Hochschule für Gesundheit (hsg), Germany Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
160 lines
7.9 KiB
Text
160 lines
7.9 KiB
Text
[% USE Koha %]
|
|
[% USE KohaDates %]
|
|
[% USE EncodeUTF8 %]
|
|
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
|
|
<title>Koha › Circulation › Renew [% title |html %]</title>
|
|
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
|
|
[% IF error %]
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
$( document ).ready(function() {
|
|
removeFocus()
|
|
});
|
|
//]]>
|
|
</script>
|
|
[% END %]
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'circ-search.inc' %]
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> › Renew</div>
|
|
|
|
<div id="doc" class="yui-t7">
|
|
<div id="bd">
|
|
|
|
[% IF error %]
|
|
<div class="dialog alert">
|
|
<h3>Cannot renew:</h3>
|
|
|
|
[% IF error == "no_item" %]
|
|
|
|
<p>No item matches this barcode</p>
|
|
|
|
[% ELSIF error == "no_checkout" %]
|
|
|
|
<p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber %]">[% item.biblio.title | $EncodeUTF8 %] [% item.biblioitem.subtitle | $EncodeUTF8 %]</a> ( <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.itemnumber %]&biblionumber=[% item.biblionumber %]&bi=[% item.biblioitemnumber %]#item[% item.itemnumber %]">[% item.barcode %]</a> ) is not checked out to a patron.</p>
|
|
|
|
[% ELSIF error == "too_many" %]
|
|
|
|
<p>[% item.biblio.title | $EncodeUTF8 %] [% item.biblioitem.subtitle | $EncodeUTF8 %] ( [% item.barcode %] ) has been renewed the maximum number of times by [% borrower.firstname %] [% borrower.surname %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]"> [% borrower.cardnumber %] </a> )</p>
|
|
|
|
[% IF Koha.Preference('AllowRenewalLimitOverride') %]
|
|
<form method="post" action="/cgi-bin/koha/circ/renew.pl">
|
|
<input type="hidden" name="barcode" value="[% item.barcode %]"/>
|
|
<input type="hidden" name="override_limit" value="1" />
|
|
<input type="submit" class="approve" value="Override limit and renew" />
|
|
</form>
|
|
[% END %]
|
|
|
|
[% ELSIF error == "too_soon" %]
|
|
|
|
<p>[% item.biblio.title | $EncodeUTF8 %] [% item.biblioitem.subtitle | $EncodeUTF8 %] ( [% item.barcode %] ) cannot be renewed before [% soonestrenewdate | $KohaDates %]. </p>
|
|
|
|
[% IF Koha.Preference('AllowRenewalLimitOverride') %]
|
|
<form method="post" action="/cgi-bin/koha/circ/renew.pl">
|
|
<input type="hidden" name="barcode" value="[% item.barcode %]"/>
|
|
<input type="hidden" name="override_limit" value="1" />
|
|
<input type="submit" class="approve" value="Override and renew" />
|
|
</form>
|
|
[% END %]
|
|
|
|
[% ELSIF error == "auto_too_soon" %]
|
|
|
|
<p>[% item.biblio.title | $EncodeUTF8 %] [% item.biblioitem.subtitle | $EncodeUTF8 %] ( [% item.barcode %] ) has been scheduled for automatic renewal and cannot be renewed before [% soonestrenewdate | $KohaDates %]. </p>
|
|
|
|
[% IF Koha.Preference('AllowRenewalLimitOverride') %]
|
|
<form method="post" action="/cgi-bin/koha/circ/renew.pl">
|
|
<input type="hidden" name="barcode" value="[% item.barcode %]"/>
|
|
<input type="hidden" name="override_limit" value="1" />
|
|
<input type="submit" class="approve" value="Override and renew" />
|
|
</form>
|
|
[% END %]
|
|
|
|
[% ELSIF error == "auto_renew" %]
|
|
|
|
<p>[% item.biblio.title | $EncodeUTF8 %] [% item.biblioitem.subtitle | $EncodeUTF8 %] ( [% item.barcode %] ) has been scheduled for automatic renewal. </p>
|
|
|
|
[% IF Koha.Preference('AllowRenewalLimitOverride') %]
|
|
<form method="post" action="/cgi-bin/koha/circ/renew.pl">
|
|
<input type="hidden" name="barcode" value="[% item.barcode %]"/>
|
|
<input type="hidden" name="override_limit" value="1" />
|
|
<input type="submit" class="approve" value="Override limit and renew" />
|
|
</form>
|
|
[% END %]
|
|
|
|
[% ELSIF error == "on_reserve" %]
|
|
|
|
<p>This item is on hold for another patron.</p>
|
|
|
|
<form method="post" action="/cgi-bin/koha/circ/renew.pl">
|
|
<input type="hidden" name="barcode" value="[% item.barcode %]"/>
|
|
<input type="hidden" name="override_limit" value="1" />
|
|
<input type="hidden" name="override_holds" value="1" />
|
|
<input type="submit" class="approve" value="Override and renew" />
|
|
</form>
|
|
|
|
[% ELSIF error == "patron_restricted" %]
|
|
|
|
<p>[% borrower.firstname %] [% borrower.surname %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]"> [% borrower.cardnumber %] </a> ) is currently restricted.</p>
|
|
|
|
[% ELSE %]
|
|
|
|
[% error %]
|
|
|
|
[% END %]
|
|
|
|
<form method="get" action="/cgi-bin/koha/circ/renew.pl">
|
|
<input type="submit" class="deny" value="Ignore and continue" />
|
|
</form>
|
|
</div>
|
|
[% END %]
|
|
|
|
[% IF date_due %]
|
|
<div class="dialog message">
|
|
<h3>Item renewed:</h3>
|
|
<p>
|
|
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber %]">[% item.biblio.title | $EncodeUTF8 %] [% item.biblioitem.subtitle | $EncodeUTF8 %]</a>
|
|
( <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.itemnumber %]&biblionumber=[% item.biblionumber %]&bi=[% item.biblioitemnumber %]#item[% item.itemnumber %]">[% item.barcode %]</a> )
|
|
renewed for
|
|
[% borrower.firstname %] [% borrower.surname %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]"> [% borrower.cardnumber %] </a> )
|
|
now due on [% date_due | $KohaDates %]
|
|
</p>
|
|
</div>
|
|
[% END %]
|
|
</div>
|
|
|
|
<div class="yui-g">
|
|
|
|
[% UNLESS error %]
|
|
<form method="post" action="/cgi-bin/koha/circ/renew.pl" autocomplete="off" >
|
|
|
|
<div class="yui-u first">
|
|
<fieldset>
|
|
<legend>Renew</legend>
|
|
|
|
<label for="barcode">Enter item barcode: </label>
|
|
|
|
<input name="barcode" id="barcode" size="14" class="focus"/>
|
|
|
|
<input type="submit" class="submit" value="Submit" />
|
|
</fieldset>
|
|
</div>
|
|
|
|
</form>
|
|
[% END %]
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|