Nick Clemens
72750cf3b7
To test: 1 - Define a rule to deny renewal 2 - Checkout an item meeting this rule 3 - Attempt renew an item via the OPAC 4 - Attempt renewal via SIP 5 - Attempt renewal via staff client 6 - Verify errors are reasonable Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
191 lines
11 KiB
Text
191 lines
11 KiB
Text
[% USE Koha %]
|
|
[% USE KohaDates %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
|
|
<title>Koha › Circulation › Renew [% title | html %]</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</head>
|
|
|
|
<body id="circ_renew" class="circ">
|
|
|
|
[% 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>
|
|
|
|
[% IF Koha.Preference('CircSidebar') %]<div id="doc3" class="yui-t2">[% ELSE %]<div id="doc" class="yui-t7">[% END %]
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
[% IF Koha.Preference('CircSidebar') %]<div class="yui-b">[% END %]
|
|
[% 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.biblio.biblionumber | uri %]">[% item.biblio.title | html %] [% item.biblioitem.subtitle | html %]</a> ( <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.itemnumber | html %]&biblionumber=[% item.biblio.biblionumber | html %]&bi=[% item.biblioitemnumber.biblioitemnumber | html %]#item[% item.itemnumber | html %]">[% item.barcode | html %]</a> ) is not checked out to a patron.</p>
|
|
|
|
[% ELSIF error == "too_many" %]
|
|
|
|
<p>[% item.biblio.title | html %] [% item.biblioitem.subtitle | html %] ( [% item.barcode | html %] ) has been renewed the maximum number of times by [% borrower.firstname | html %] [% borrower.surname | html %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber | uri %]"> [% borrower.cardnumber | html %] </a> )</p>
|
|
|
|
[% IF Koha.Preference('AllowRenewalLimitOverride') %]
|
|
<form method="post" action="/cgi-bin/koha/circ/renew.pl">
|
|
<input type="hidden" name="barcode" value="[% item.barcode | html %]"/>
|
|
<input type="hidden" name="override_limit" value="1" />
|
|
<button type="submit" class="approve"><i class="fa fa-check"></i> Override limit and renew</button>
|
|
</form>
|
|
[% END %]
|
|
|
|
[% ELSIF error == "too_soon" %]
|
|
|
|
<p>[% item.biblio.title | html %] [% item.biblioitem.subtitle | html %] ( [% item.barcode | html %] ) 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 | html %]"/>
|
|
<input type="hidden" name="override_limit" value="1" />
|
|
<button type="submit" class="approve"><i class="fa fa-check"></i> Override and renew</button>
|
|
</form>
|
|
[% END %]
|
|
|
|
[% ELSIF error == "auto_too_soon" %]
|
|
|
|
<p>[% item.biblio.title | html %] [% item.biblioitem.subtitle | html %] ( [% item.barcode | html %] ) 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 | html %]"/>
|
|
<input type="hidden" name="override_limit" value="1" />
|
|
<button type="submit" class="approve"><i class="fa fa-check"></i> Override and renew</button>
|
|
</form>
|
|
[% END %]
|
|
|
|
[% ELSIF error == "auto_too_late" %]
|
|
|
|
<p>[% item.biblio.title | html %] [% item.biblioitem.subtitle | html %] ( [% item.barcode | html %] ) has been scheduled for automatic renewal and cannot be renewed anymore since [% latestautorenewdate | $KohaDates %]. </p>
|
|
|
|
[% IF Koha.Preference('AllowRenewalLimitOverride') %]
|
|
<form method="post" action="/cgi-bin/koha/circ/renew.pl">
|
|
<input type="hidden" name="barcode" value="[% item.barcode | html %]"/>
|
|
<input type="hidden" name="override_limit" value="1" />
|
|
<input type="submit" class="approve" value="Override and renew" />
|
|
</form>
|
|
[% END %]
|
|
|
|
[% ELSIF error == "auto_account_expired" %]
|
|
|
|
<p>[% item.biblio.title | html %] [% item.biblioitem.subtitle | html %] ( [% item.barcode | html %] ) has been scheduled for automatic renewal and cannot be renewed because the patron's account is expired</p>
|
|
|
|
[% IF Koha.Preference('AllowRenewalLimitOverride') %]
|
|
<form method="post" action="/cgi-bin/koha/circ/renew.pl">
|
|
<input type="hidden" name="barcode" value="[% item.barcode | html %]"/>
|
|
<input type="hidden" name="override_limit" value="1" />
|
|
<input type="submit" class="approve" value="Override and renew" />
|
|
</form>
|
|
[% END %]
|
|
|
|
[% ELSIF error == "auto_renew" or error == "auto_too_much_oweing" %]
|
|
|
|
<p>[% item.biblio.title | html %] [% item.biblioitem.subtitle | html %] ( [% item.barcode | html %] ) 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 | html %]"/>
|
|
<input type="hidden" name="override_limit" value="1" />
|
|
<button type="submit" class="approve"><i class="fa fa-check"></i> Override limit and renew</button>
|
|
</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 | html %]"/>
|
|
<input type="hidden" name="override_limit" value="1" />
|
|
<input type="hidden" name="override_holds" value="1" />
|
|
<button type="submit" class="approve"><i class="fa fa-check"></i> Override and renew</button>
|
|
</form>
|
|
|
|
[% ELSIF error == "patron_restricted" %]
|
|
|
|
<p>[% borrower.firstname | html %] [% borrower.surname | html %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber | uri %]"> [% borrower.cardnumber | html %] </a> ) is currently restricted.</p>
|
|
|
|
[% ELSIF error == "item_denied_renewal" %]
|
|
|
|
<p>Item is not allowed renewal.</p>
|
|
|
|
[% ELSE %]
|
|
|
|
[% error | html %]
|
|
|
|
[% END %]
|
|
|
|
<form method="get" action="/cgi-bin/koha/circ/renew.pl">
|
|
<button type="submit" class="deny"><i class="fa fa-times"></i> Continue without renewing</button>
|
|
</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.biblio.biblionumber | uri %]">[% item.biblio.title | html %] [% item.biblioitem.subtitle | html %]</a>
|
|
( <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.itemnumber | uri %]&biblionumber=[% item.biblio.biblionumber | uri %]&bi=[% item.biblioitemnumber.biblioitemnumber | uri %]#item[% item.itemnumber | uri %]">[% item.barcode | html %]</a> )
|
|
renewed for
|
|
[% borrower.firstname | html %] [% borrower.surname | html %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber | uri %]"> [% borrower.cardnumber | html %] </a> )
|
|
now due on [% date_due | $KohaDates %]
|
|
</p>
|
|
</div>
|
|
[% END %]
|
|
|
|
<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" type="text" />
|
|
|
|
<input type="submit" class="submit" value="Submit" />
|
|
</fieldset>
|
|
</div>
|
|
|
|
</form>
|
|
[% END %]
|
|
|
|
</div>
|
|
</div>
|
|
|
|
[% IF Koha.Preference('CircSidebar') %]
|
|
</div>
|
|
|
|
<div class="yui-b noprint">
|
|
[% INCLUDE 'circ-nav.inc' %]
|
|
</div>
|
|
[% END %]
|
|
<div>
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% IF error %]
|
|
<script type="text/javascript">
|
|
$( document ).ready(function() {
|
|
removeFocus();
|
|
});
|
|
</script>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|