if (!copySummaryObj[libkey][lockey][cnkey]) {
copySummaryObj[libkey][lockey][cnkey] = new Object();
copySummaryObj[libkey][lockey][cnkey]['count'] = 0;
+ copySummaryObj[libkey][lockey][cnkey]['count_reshelving'] = 0;
+ }
+ if (status_id == 7) {
+ copySummaryObj[libkey][lockey][cnkey]['count_reshelving']++;
+ } else {
+ copySummaryObj[libkey][lockey][cnkey]['count']++;
}
- copySummaryObj[libkey][lockey][cnkey]['count']++;
item_cnt++;
//if (item_cnt >= max_items) {
for (var lib in copySummaryObj) {
numLibs++;
}
- if (numLibs == 0) { return; }
if (numLibs == 1) {
var lines_output = 0;
var sumdiv = dojo.create('div', { "style": "font-weight: bold;" });
morediv.appendChild(dojo.doc.createTextNode("additional copies available - click title for details"));
} else {
var sumcount = copySummaryObj[sumlib][sumloc][sumcn]['count'];
- var summary_line = sumcount + ' available in ' + sumloc + ', call number ' + sumcn;
+ var sumcount_reshelving = copySummaryObj[sumlib][sumloc][sumcn]['count_reshelving'];
+ var summary_line = sumcount + ' available in ' + sumloc;
+ if (sumcount_reshelving) {
+ summary_line += ' (plus ' + sumcount_reshelving + ' recently returned)';
+ }
+ summary_line += ', call number ' + sumcn;
var locdiv = dojo.create('div', null, sumdiv);
locdiv.appendChild(dojo.doc.createTextNode(summary_line));
lines_output++;
}
}
output.appendChild(sumdiv);
- } else {
+ } else if (numLibs > 1) {
// output the grouped-by-library summary
for (var libname in copySummaryObj) {
var copycount = 0;
if (count_copies_unavail > 0) {
other_or_null = (count_copies_avail > 0) ? 'other ' : ' ';
item_or_items = (count_copies_unavail > 1) ? 'items' : 'item';
+ suggest_hold = (count_copies_avail < 1) ? ' -- try placing a hold!' : '';
output.appendChild(
dojo.doc.createTextNode(
- count_copies_unavail + " " + other_or_null + item_or_items + " not currently available"
+ count_copies_unavail + " " + other_or_null + item_or_items + " not currently available" + suggest_hold
)
);
}
if (!copySummaryObj[libkey][lockey][cnkey]) {
copySummaryObj[libkey][lockey][cnkey] = new Object();
copySummaryObj[libkey][lockey][cnkey]['count'] = 0;
+ copySummaryObj[libkey][lockey][cnkey]['count_reshelving'] = 0;
+ }
+ if (status_id == 7) {
+ copySummaryObj[libkey][lockey][cnkey]['count_reshelving']++;
+ } else {
+ copySummaryObj[libkey][lockey][cnkey]['count']++;
}
- copySummaryObj[libkey][lockey][cnkey]['count']++;
-
item_cnt++;
//if (item_cnt >= max_items) {
// dojo.create('br', null, cp_entry);
for (var lib in copySummaryObj) {
numLibs++;
}
- if (numLibs == 0) { return output.innerHTML; }
if (numLibs == 1) {
var lines_output = 0;
var sumdiv = dojo.create('div', { "style": "font-weight: bold;" });
morediv.appendChild(dojo.doc.createTextNode("additional copies available - click title for details"));
} else {
var sumcount = copySummaryObj[sumlib][sumloc][sumcn]['count'];
- var summary_line = sumcount + ' available in ' + sumloc + ', call number ' + sumcn;
+ var sumcount_reshelving = copySummaryObj[sumlib][sumloc][sumcn]['count_reshelving'];
+ var summary_line = sumcount + ' available in ' + sumloc;
+ if (sumcount_reshelving) {
+ summary_line += ' (plus ' + sumcount_reshelving + ' recently returned)';
+ }
+ summary_line += ', call number ' + sumcn;
var locdiv = dojo.create('div', null, sumdiv);
locdiv.appendChild(dojo.doc.createTextNode(summary_line));
lines_output++;
}
}
output.appendChild(sumdiv);
- } else {
+ } else if (numLibs > 1) {
// output the grouped-by-library summary
for (var libname in copySummaryObj) {
var copycount = 0;
if (count_copies_unavail > 0) {
other_or_null = (count_copies_avail > 0) ? 'other ' : ' ';
item_or_items = (count_copies_unavail > 1) ? 'items' : 'item';
+ suggest_hold = (count_copies_avail < 1) ? ' -- try placing a hold!' : '';
output.appendChild(
dojo.doc.createTextNode(
- count_copies_unavail + " " + other_or_null + item_or_items + " not currently available"
+ count_copies_unavail + " " + other_or_null + item_or_items + " not currently available" + suggest_hold
)
);
}