<head>
<title>Koha › Circulation</title>
[% INCLUDE 'doc-head-close.inc' %]
+[% INCLUDE 'calendar.inc' %]
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.indexeddb.js"></script>
<script type="text/javascript" src="[% interface %]/prog/en/js/offlinecirc.js"></script>
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery-ui-timepicker-addon.js"></script>
+<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script>
+[% INCLUDE 'timepicker.inc' %]
<script type="text/javascript">
//<![CDATA[
var ALERT_SUCCESSFUL_CHECKIN = _("Checked in item.");
-var ALERT_MATERIALS = _("Note about the accompanying materials: ");
+var ALERT_MATERIALS = _("Note about the accompanying materials: %s");
var ALERT_RESTRICTED = _("Patron is RESTRICTED");
-var ALERT_NO_MATCHING_ITEM = _("No item with barcode in offline database (transaction recorded anyway): ");
+var ALERT_NO_MATCHING_ITEM = _("No item with barcode in offline database (transaction recorded anyway): %s");
var ALERT_NOT_CHECKED_OUT = _("Item not listed as checked out in offline database (transaction recorded anyway)");
var ALERT_ITEM_WITHDRAWN = _("Item has been withdrawn (transaction recorded anyway)");
var ALERT_ITEM_RESTRICTED = _("Item is restricted (transaction recorded anyway)");
var ALERT_ITEM_LOST = _("Item has been lost (transaction recorded anyway)");
-var ALERT_NO_MATCHING_PATRON = _("No patron cardnumber in offline database (proceeding anyway): ");
-var ALERT_PATRON_GONE_NO_ADDRESS = _("Patron's address is in doubt (transaction recorded anyway)");
+var ALERT_NO_MATCHING_PATRON = _("No patron cardnumber in offline database (proceeding anyway): %s");
+var ALERT_PATRON_GONE_NO_ADDRESS = _("Patron's address is in doubt (proceeding anyway)");
var ALERT_PATRON_CARD_LOST = _("Patron's card is lost");
-var ALERT_PATRON_EXPIRED = _("Patron's card is expired");
-var ALERT_PATRON_BLOCKED_TEMPORARY = _("Patron has had overdue items and is restricted for: ");
+var ALERT_PATRON_EXPIRED = _("Patron's card is expired (%s)");
+var ALERT_PATRON_BLOCKED_TEMPORARY = _("Patron has had overdue items and is restricted until: %s");
var ALERT_PATRON_RESTRICTED = _("Patron is restricted");
-var ALERT_PATRON_FINE = _("Patron has outstanding fines: ");
-var ALERT_PATRON_FINE_OVER_LIMIT = _("Patron fines are over limit: ");
+var ALERT_PATRON_FINE = _("Patron has outstanding fines: %s");
+var ALERT_PATRON_FINE_OVER_LIMIT = _("Patron fines are over limit: %s");
var UPLOAD_PENDING_MESSAGE = _("You have transactions in the offline circulation database on this computer that have not been uploaded.");
var NO_UPLOAD_PENDING_MESSAGE = _("You do not have any pending transactions in the offline circulation database on this computer.");
function checkAlerts(barcode, item) {
var alerts = [];
if (typeof item === 'undefined') {
- alerts.push(ALERT_NO_MATCHING_ITEM + barcode);
+ alerts.push(ALERT_NO_MATCHING_ITEM.format(barcode));
} else {
if (typeof item.materials !== 'undefined' && item.materials != null) {
- alerts.push(ALERT_MATERIALS + item.materials);
+ alerts.push(ALERT_MATERIALS.format(item.materials));
}
}
return alerts;
}).done(function (data) {
if (data) {
$('.loading-overlay').hide();
- alert(_("Please log in to Koha and try again. (Error: '" + data + "')"));
+ alert(_("Please log in to Koha and try again. (Error: '%s')").format(data));
} else {
var uploadIter = $.indexedDB("koha").objectStore("transactions").each(uploadTransaction);
uploadIter.done(function() {
"action" : transaction.value.action,
"barcode" : transaction.value.barcode,
"cardnumber" : transaction.value.cardnumber,
+ "amount" : transaction.value.amount,
"pending" : true,
},
});
function loadRecords(page) {
[% IF (AllowOfflineCirculation) %]
- $(".loading-overlay div").text(_("Loading page " + page + ", please wait..."));
+ $(".loading-overlay div").text(_("Loading page %s, please wait...").format(page));
$(".loading-overlay").show();
$.ajax({
type: "GET",
function checkPatronAlerts(cardnumber, patron) {
var alerts = [];
if (typeof patron === 'undefined') {
- alerts.push(ALERT_NO_MATCHING_PATRON + cardnumber);
+ alerts.push(ALERT_NO_MATCHING_PATRON.format(cardnumber));
} else {
if (patron.gonenoaddress !== '0') {
alerts.push(ALERT_PATRON_GONE_NO_ADDRESS);
}
if (patron.debarred !== null) {
if (patron.debarred != '9999-12-31') {
- alerts.push(ALERT_PATRON_BLOCKED_TEMPORARY + $.datepicker.formatDate(dateformat, patron.debarred));
+ alerts.push(ALERT_PATRON_BLOCKED_TEMPORARY.format($.datepicker.formatDate(dateformat, new Date(patron.debarred))));
} else {
alerts.push(ALERT_PATRON_RESTRICTED);
}
}
+ if (new Date(patron.dateexpiry) < new Date()) {
+ alerts.push(ALERT_PATRON_EXPIRED.format($.datepicker.formatDate(dateformat, new Date(patron.dateexpiry))));
+ }
if (parseInt(patron.fine) > [% maxoutstanding %]) {
- alerts.push(ALERT_PATRON_FINE_OVER_LIMIT + patron.fine);
+ alerts.push(ALERT_PATRON_FINE_OVER_LIMIT.format(patron.fine));
} else if (parseInt(patron.fine) > 0) {
- alerts.push(ALERT_PATRON_FINE + patron.fine);
+ alerts.push(ALERT_PATRON_FINE.format(patron.fine));
}
}
return alerts;
if (patron.name.length > 0) {
$('.patron-title').text(patron.name);
} else {
- $('.patron-title').text(_("Unrecognized patron") + " (" + barcode + ")");
+ $('.patron-title').text(_("Unrecognized patron (%s)").format(barcode));
}
if (patron.address.length > 0 || patron.address2.length > 0) {
$('#patron-address-1').text(patron.address);
$('#patron-email').html('<span class="empty" id="noemailstored">' + _("No email stored.") + '</span></li>');
}
if (patron.categorycode.length > 0) {
- $('#patron-category').text(_("Category: ") + patron.categorycode);
+ $('#patron-category').text(_("Category: %s").format(patron.categorycode));
} else {
$('#patron-category').html('<span class="empty" id="unknowncategory">' + _("Category code unknown.") + '</span></li>');
}
if (patron.branchcode.length > 0) {
- $('#patron-library').text(_("Home library: ") + patron.branchcode);
+ $('#patron-library').text(_("Home library: %s").format(patron.branchcode));
} else {
$('#patron-library').html('<span class="empty" id="unknowncategory">' + _("Home library unknown.") + '</span></li>');
}
$(document).ready(function () {
kohadb.initialize();
+ $('#header_search #circ_search .tip').text(_("Enter patron card number:"));
+
+ $('ul[aria-labelledby="drop3"]').html('<li><a class="toplinks">You cannot change your branch or logout while using offline circulation</a></li>');
// Returns code
$('#checkin-form, #checkin_search form').submit(function (event) {