[% USE Koha %]
[% USE Branches %]
[% USE KohaDates %]
+[% USE Categories %]
[% USE ColumnsSettings %]
[% USE ItemTypes %]
[% USE Price %]
-[% IF Koha.Preference('ExportRemoveFields') OR Koha.Preference('ExportWithCsvProfile') %]
- [% SET exports_enabled = 1 %]
-[% END %]
[% USE AuthorisedValues %]
[% INCLUDE 'doc-head-open.inc' %]
[% SET destination = "circ" %]
var theme = "[% theme %]";
var borrowernumber = "[% borrowernumber %]";
var branchcode = "[% branch %]";
-var exports_enabled = "[% exports_enabled %]";
+var exports_enabled = "[% Koha.Preference('ExportCircHistory') %]";
var AllowRenewalLimitOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalLimitOverride') )? 1: 0 %];
var AllowCirculate = [% (CAN_user_circulate_circulate_remaining_permissions)? 1 : 0 %];
var script = "circulation";
relatives_borrowernumbers.push("[% b %]");
[% END %]
-var MSG_ADD_MESSAGE = _("Add a new message");
var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
var MSG_CONFIRM_DELETE_MESSAGE = _("Are you sure you want to delete this message? This cannot be undone.");
[% END %]
} else {
$("#duedatespec").datetimepicker({
- onClose: function(dateText, inst) { $("#barcode").focus(); },
+ onClose: function(dateText, inst) {
+ if (validate_date(dateText, inst) ) {
+ $("#barcode").focus();
+ }
+ },
hour: 23,
minute: 59
+ }).on("change", function(e, value) {
+ if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");}
});
}
}
}
});
+ if ( $('#clubs-tab').length ) {
+ $('#clubs-tab-link').on('click', function() {
+ $('#clubs-tab').text(_("Loading..."));
+ $('#clubs-tab').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=[% borrowernumber %]');
+ });
+ }
+
[% IF !( CircAutoPrintQuickSlip == 'clear' ) %]
// listen submit to trigger qslip on empty checkout
$('#mainform').bind('submit',function() {
$("#onsite_checkout").click(function(){
toggle_onsite_checkout();
});
+
+ $("#suspend_until").datepicker({
+ onClose: function(dateText, inst) {
+ validate_date(dateText, inst);
+ },
+ minDate: 1, // require that hold suspended until date is after today
+ });
+
});
//]]>
[% END %]
<!-- INITIAL BLOC : PARAMETERS & BORROWER INFO -->
-<div style="display: none;" id="add_message_form">
-<form method="post" action="/cgi-bin/koha/circ/add_message.pl" id="message_form" name="message_f">
-<fieldset id="borrower_messages" class="brief">
-<legend>Leave a message</legend>
- <ol>
- <li>
- <label for="message_type">Add a message for:</label>
- <select name="message_type" id="message_type">
- <option value="L">Staff - Internal note</option>
- <option value="B">OPAC - [% firstname %] [% surname %]</option>
- </select>
- </li>
- [% IF ( canned_bor_notes_loop ) %]
- <li>
- <label for="type">Predefined notes: </label>
- <select name="type" id="type" onchange="this.form.borrower_message.value=this.options[this.selectedIndex].value;">
- <option value="">Select note</option>
- [% FOREACH canned_bor_notes_loo IN canned_bor_notes_loop %]
- <option value="[% canned_bor_notes_loo.lib %]">[% canned_bor_notes_loo.lib %]</option>
- [% END %]
- </select>
- </li>
- [% END %]
- <li>
- <textarea rows="3" cols="60" name="borrower_message" id="borrower_message" ></textarea>
- </li>
- </ol>
- <fieldset class="action">
- <input type="submit" value="Save" /> <a href="#" class="cancel">Cancel</a>
- </fieldset>
-
- <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
- <input type="hidden" name="branchcode" value="[% branch %]" />
-</fieldset>
-</form>
-</div>
-
[% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% expiry | $KohaDates %]</div>[% END %]
[% IF additional_materials %]
[% END %]
[% IF ( RESERVE_WAITING ) %]
- <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) has been waiting for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resborrowernumber %]">[% resfirstname %] [% ressurname %]</a> ([% rescardnumber %]) at [% resbranchname %] since [% reswaitingdate | $KohaDates %]</li>
+ <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) has been waiting for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resborrowernumber %]">[% resfirstname %] [% ressurname %]</a> ([% rescardnumber %]) at [% Branches.GetName( resbranchcode ) %] since [% reswaitingdate | $KohaDates %]</li>
[% END %]
[% IF ( RESERVED ) %]
- <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) has been on hold for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resborrowernumber %]">[% resfirstname %] [% ressurname %]</a> ([% rescardnumber %]) at [% resbranchname %] since [% resreservedate | $KohaDates %]</li>
+ <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) has been on hold for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resborrowernumber %]">[% resfirstname %] [% ressurname %]</a> ([% rescardnumber %]) at [% Branches.GetName( resbranchcode ) %] since [% resreservedate | $KohaDates %]</li>
[% END %]
[% IF ( ISSUED_TO_ANOTHER ) %]
[% END %]
[% IF ( BORRNOTSAMEBRANCH ) %]
- <li>This patron is from a different library ([% BORRNOTSAMEBRANCH %])</li>
+ <li>This patron is from a different library ([% Branches.GetName( BORRNOTSAMEBRANCH ) %])</li>
[% END %]
[% IF ( PATRON_CANT ) %]
- <li>This patron can't check out this item per library circulation policy</li>
+ <li>This patron can't check out this item per library circulation policy.</li>
+[% END %]
+
+[% IF ( TOO_MANY and TOO_MANY == 'NO_RULE_DEFINED' ) %]
+ <li>No circulation rule is defined for this patron and itemtype combination.</li>
[% END %]
[% IF ( NOT_FOR_LOAN_FORCING ) %]
<li>High demand item. Loan period shortened to [% HIGHHOLDS.duration %] days (due [% HIGHHOLDS.returndate %]). Check out anyway?</li>
[% END %]
+[% IF PREVISSUE %]
+ <li>Patron has previously checked out this title: <b>[% item.title %] [% IF item.author %] by [% item.author %][% END %]</b>. Check out anyway?</li>
+[% END %]
+
[% IF BIBLIO_ALREADY_ISSUED %]
<li>
Patron has already checked out another item from this record.
[% IF ( DEBT ) %]<input type="hidden" name="debt_confirmed" value="1" />[% END %]
[% IF ( INVALID_DATE ) %]
<p>
- <input type="text" size="13" id="duedatespec" name="duedatespec" readonly="readonly" value="[% duedatespec %]" />
+ <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" />
<label for="duedatespec">Due date</label>
</p>
[% ELSE %]
<li>The barcode was not found: <span class="ex">[% barcode |html %]</span>
[% IF ( fast_cataloging ) %]
[% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
- <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA&barcode=[% barcode |uri %]&circborrowernumber=[% borrowernumber %]&branch=[% branch %]&duedatespec=[% duedatespec %]&stickyduedate=[% stickyduedate %]">Fast cataloging</a>
+ <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA&barcode=[% barcode |uri %]&circborrowernumber=[% borrowernumber %]&branch=[% branch %]&duedatespec=[% duedatespec %]&stickyduedate=[% stickyduedate %]">Add record using fast cataloging</a>
[% END %]
[% END %]
<li>This item belongs to [% Branches.GetName( itemhomebranch ) %] and cannot be checked out from this location.</li>
[% END %]
+ [% IF RETURN_IMPOSSIBLE %]
+ <li>This item must be returned to [% Branches.GetName( branch_to_return ) %].</li>
+ [% END %]
+
[% IF ( USERBLOCKEDWITHENDDATE ) %]
<li>Patron has a restriction until [% USERBLOCKEDWITHENDDATE | $KohaDates %].</li>
[% END %]
[% IF ( message ) %]
[% INCLUDE 'patron-toolbar.inc' %]
<h4>
-No patron matched <span class="ex">[% message %]</span>
+No patron matched <span class="ex">[% message | html %]</span>
</h4>
[% END %]
<label class="circ_barcode" for="barcode">Checking out to [% INCLUDE 'patron-title.inc' %]</label>
- <div class="hint">Enter item barcode:</div>
+ [% IF Koha.Preference('itemBarcodeFallbackSearch') %]
+ <div class="hint">Enter item barcode or keyword:</div>
+ [% ELSE %]
+ <div class="hint">Enter item barcode:</div>
+ [% END %]
[% IF NEEDSCONFIRMATION %]
<input type="text" name="barcode" id="barcode" class="barcode focus" size="14" disabled="disabled" />
[% ELSE %]
<input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
[% END %]
- <button type="submit" class="btn">Check out</button>
+ <button type="submit" class="btn btn-default">Check out</button>
<div id="show-checkout-settings">
<a href="#"><i class="fa fa-caret-right checkout-settings-icon"></i> Checkout settings</a>
<div id="specify-due-date" class="checkout-setting">
<div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
[% IF ( duedatespec ) %]
- <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" readonly="readonly" />
+ <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" />
[% ELSE %]
- <input type="text" size="13" id="duedatespec" name="duedatespec" value="" readonly="readonly" />
+ <input type="text" size="13" id="duedatespec" name="duedatespec" value="" />
[% END %]
<label for="stickyduedate"> Remember for session:</label>
[% IF ( stickyduedate ) %]
[% ELSE %]
<input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
[% END %]
- <button class="btn btn-small action" id="cleardate" name="cleardate" onclick="this.checked = false; this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false; this.form.barcode.focus(); return false;" >Clear</button>
+ <button class="btn btn-default btn-sm action" id="cleardate" name="cleardate" onclick="this.checked = false; this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false; this.form.barcode.focus(); return false;" >Clear</button>
</div>
[% END %]
[% END %]
[% IF noissues %]
<div class="onsite-checkout-only">
<input type="checkbox" id="onsite_checkout" name="onsite_checkout_forced" checked="checked" disabled="disabled" /> <label for="onsite_checkout">On-site checkouts only. Automatic due date: </label>
- <input type="text" name="duedatespec" id="duedatespec" readonly="readonly" />
+ <input type="text" name="duedatespec" id="duedatespec" />
<input type="hidden" name="onsite_checkout" checked="checked" value="1" />
</div>
[% ELSE %]
<ul>
- [% IF ( modifications ) %]
+ [% IF ( has_modifications ) %]
<li><span class="circ-hlt">Pending modifications:</span> Patron has pending modifications.
[% IF CAN_user_borrowers && ( !Koha.Preference('IndependentBranchesPatronModifications') || borrower.branch == branch ) %]
<a href="/cgi-bin/koha/members/members-update.pl">View all pending patron modifications</a>
[% END %]
[% IF ( debarredcomment ) %]
- with the explanation: <br/><i>[% debarredcomment | html_line_break %]</i>
+ with the explanation: <br/><i>
+ [% IF debarredcomment.search('OVERDUES_PROCESS') %]
+ Restriction added by overdues process [% debarredcomment.remove('OVERDUES_PROCESS ') | html_line_break %]
+ [% ELSE %]
+ [% debarredcomment | html_line_break %]
+ [% END %]
+ </i>
[% END %]
-
<br/>
- <a class="btn btn-small" href="#reldebarments" onclick="$('#debarments-tab-link').click()"><i class="fa fa-ban"></i> View restrictions</a>
+ <a class="btn btn-default btn-sm" href="#reldebarments" onclick="$('#debarments-tab-link').click()"><i class="fa fa-ban"></i> View restrictions</a>
[% IF (noissues && borrowernumber && CAN_user_circulate_force_checkout) %]
<span class="override_debarment">
- <a href="/cgi-bin/koha/circ/circulation.pl?forceallow=1&borrowernumber=[% borrowernumber %]" class="btn btn-small">Override restriction temporarily</a>
+ <a href="/cgi-bin/koha/circ/circulation.pl?forceallow=1&borrowernumber=[% borrowernumber %]" class="btn btn-default btn-sm">Override restriction temporarily</a>
</span>
[% END %]
</li>
[% END %]
- [% IF ( odues ) %]<li>[% IF ( nonreturns ) %]<span class="circ-hlt">Overdues: Patron has ITEMS OVERDUE</span>. See highlighted items <a href="#checkouts">below</a>[% END %]</li>
+ [% IF ( odues ) %]<li>[% IF ( nonreturns ) %]<span class="circ-hlt">Overdues: Patron has ITEMS OVERDUE.</span> <a href="#checkouts">See highlighted items below</a>[% END %]</li>
[% END %]
[% IF ( charges ) %]
<div id="messages" class="circmessage">
<h4>Messages:</h4>
<ul>
- [% FOREACH message IN librarian_messages %]
+ [% FOREACH message IN messages %]
<li>
- <span class="circ-hlt">
+ [% IF(message.message_type == "L") %]
+ <span class="circ-hlt">
+ [% ELSE %]
+ <span>
+ [% END %]
[% message.message_date | $KohaDates %]
[% Branches.GetName( message.branchcode ) %]
+ [% IF message.manager_id %]
+ ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% message.manager_id %]">[% message.get_column('manager_firstname') %] [% message.get_column('manager_surname') %]</a> )
+ [% END %]
<i>"[% message.message %]"</i>
</span>
[% IF message.branchcode == branch OR Koha.Preference('AllowAllMessageDeletion') %]
- <a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% message.message_id %]&borrowernumber=[% message.borrowernumber %]" onclick="return confirm(MSG_CONFIRM_DELETE_MESSAGE);">[Delete]</a>
+ <a class="btn btn-link btn-sm" href="/cgi-bin/koha/circ/del_message.pl?message_id=[% message.message_id %]&borrowernumber=[% message.borrowernumber %]" onclick="return confirm(MSG_CONFIRM_DELETE_MESSAGE);"><i class="fa fa-trash"></i> Delete</a>
[% END %]
</li>
[% END %]
- [% FOREACH message IN patron_messages %]
- <li><span class="">[% message.message_date | $KohaDates %] [% Branches.GetName( message.branchcode )%] <i>"[% message.message %]"</i></span>
- [% IF message.branchcode == branch OR Koha.Preference('AllowAllMessageDeletion') %]
- <a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% message.message_id %]&borrowernumber=[% message.borrowernumber %]">[Delete]</a>
- [% END %]</li>
- [% END %]
</ul>
+ <a id="addnewmessageLabel" href="#add_message_form" class="btn btn-link btn-sm" data-toggle="modal"><i class="fa fa-plus"></i> Add a new message</a>
</div>
</div>
[% END %]
</li>
+ [% SET enrollments = patron.get_club_enrollments.size || 0 %]
+ [% SET enrollable = patron.get_enrollable_clubs.size || 0 %]
+ [% IF CAN_user_clubs && ( enrollable || enrollments ) %]
+ <li>
+ <a id="clubs-tab-link" href="#clubs-tab">
+ Clubs ([% enrollments %]/[% enrollable %])
+ </a>
+ </li>
+ [% END %]
+
[% IF relatives_issues_count %]
<li><a id="relatives-issues-tab" href="#relatives-issues">Relatives' checkouts</a></li>
[% END %]
[% ELSE %]
<a href="#reserves" id="holds-tab">0 Holds</a>
[% END %]
+ </li>
+
+ [% IF Koha.Preference('ArticleRequests') %]
+ <li>
+ <a href="#article-requests" id="article-requests-tab"> [% patron.article_requests_current.count %] Article requests</a>
+ </li>
+ [% END %]
<li><a id="debarments-tab-link" href="#reldebarments">[% debarments.size %] Restrictions</a></li>
</ul>
</div>
[% END %]
+[% IF CAN_user_clubs && ( enrollable || enrollments ) %]
+ <div id="clubs-tab">
+ Loading...
+ </div>
+[% END %]
+
[% INCLUDE borrower_debarments.inc %]
<div id="reserves">
[% IF AutoResumeSuspendedHolds %]
<label for="suspend_until">until</label>
- <input type="text" size="10" id="suspend_until" name="suspend_until" class="datepicker" />
+ <input type="text" size="10" id="suspend_until" name="suspend_until datepicker" />
<span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
[% END %]
</form>
[% END %]
</div> <!-- reservesloop -->
+[% IF Koha.Preference('ArticleRequests') %]
+ [% INCLUDE 'patron-article-requests.inc' %]
+[% END %]
+
[% ELSIF borrowernumber %]
<div class="dialog message">This patron does not exist. <a href="/cgi-bin/koha/members/members-home.pl">Find another patron?</a></div>
[% END %] <!-- borrowernumber and borrower-->
</div></div>
[% END %]
-
+[% IF Koha.Preference('CircSidebar') %]
+[% UNLESS ( borrowers ) %]
+ [% IF not( borrowernumber and borrower ) %]
+ <div class="yui-b noprint">
+ [% INCLUDE 'circ-nav.inc' %]
+ </div>
+ [% END %]
+[% END %]
+[% END %]
</div>
</div>
-[% UNLESS ( borrowers ) %][% IF borrowernumber and borrower %]<div class="yui-b">
-[% INCLUDE 'circ-menu.inc' %]
-</div>[% END %][% END %]
+[% UNLESS ( borrowers ) %]
+ [% IF borrowernumber and borrower %]
+ <div class="yui-b">
+ [% INCLUDE 'circ-menu.inc' %]
+ </div>
+ [% END %]
+[% END %]
</div>
<!-- Modal -->
-<div id="barcodeSubmittedModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="barcodeSubmittedModalLabel" aria-hidden="true">
+<div id="barcodeSubmittedModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="barcodeSubmittedModalLabel" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
<div class="modal-header">
<h3 id="barcodeSubmittedModalLabel">Barcode submitted</h3>
</div>
<div class="modal-body">
<p>You have already submitted a barcode, please wait for the checkout to process...</p>
</div>
+ </div>
+ </div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]