"SUPPLEMENT_HOLDINGS": "Supplements",
"SUPPLEMENT_HOLDINGS_ADD": "Additional Supplement Information",
"PLACE_HOLD": "Place hold",
- "MORE": "More"
+ "HOLD_STATUS_PLURAL": "hold # ${0} of ${1} total holds and ${2} potential items",
+ "HOLD_STATUS_SINGULAR": "hold # ${0} of ${1} total holds and ${2} potential item",
+ "MORE": "More",
+ "MORE_COPIES_FULL_RECORD": "... more copies listed in full record"
}
//attachEvt("common", "loggedIn", myOPACInit );
attachEvt('common','locationUpdated', myopacReload );
+dojo.requireLocalization("openils.opac", "opac");
+
+var opac_strings = dojo.i18n.getLocalization("openils.opac", "opac");
var fleshedUser = null;
var fleshedContainers = {};
var holdCache = {};
var holdStatusCache = {};
+var showHoldQueuePosition = false;
var allowPendingAddr = false;
var myopacEnableRefWorks = false;
var myopacRefWorksHost = 'http://www.refworks.com';
-
function clearNodes( node, keepArray ) {
if(!node) return;
for( var n in keepArray ) node.removeChild(keepArray[n]);
hideMe($n(row, 'myopac_holds_cancel_link'));
}
- if(false) {
+ if (showHoldQueuePosition) {
var node = $n(row, 'hold_qstats');
- // XXX best way to display this info + dojo i18n
- node.appendChild(text('hold #' + qstats.queue_position+' of '+qstats.queue_position+' and '+qstats.potential_copies+' item(s)'));
+ if (qstats.potential_copies == 1) {
+ node.appendChild(text(dojo.string.substitute(opac_strings.HOLD_STATUS_SINGULAR, [qstats.queue_position, qstats.total_holds, qstats.potential_copies])));
+ } else {
+ node.appendChild(text(dojo.string.substitute(opac_strings.HOLD_STATUS_PLURAL, [qstats.queue_position, qstats.total_holds, qstats.potential_copies])));
+ }
unHideMe(node);
} else {
item_cnt++;
if (item_cnt >= max_items) {
dojo.create('br', null, cp_entry);
- cp_entry.appendChild(dojo.doc.createTextNode('... more print items listed in full record'));
+ cp_entry.appendChild(dojo.doc.createTextNode(opac_strings.MORE_COPIES_FULL_RECORD));
}
output.appendChild(cp_entry);
});