// output the grouped-by-library summary
for (var libname in copySummaryObj) {
var copycount = 0;
+ var copycount_reshelving = 0;
for (var loc in copySummaryObj[libname]) {
for (var cn in copySummaryObj[libname][loc]) {
copycount = copycount + copySummaryObj[libname][loc][cn]['count'];
+ copycount_reshelving = copycount_reshelving + copySummaryObj[libname][loc][cn]['count_reshelving'];
}
}
var libdiv = dojo.create('div');
var libcontent = dojo.create('span', { "style": "font-weight: bold;" });
- var libtext = dojo.doc.createTextNode(copycount + ' available at ' + libname);
+ var summary_text = copycount + ' available at ' + libname;
+ if (copycount_reshelving) {
+ summary_text += ' (plus ' + copycount_reshelving + ' recently returned)';
+ }
+ var libtext = dojo.doc.createTextNode(summary_text);
libcontent.appendChild(libtext);
libdiv.appendChild(libcontent);
output.appendChild(libdiv);
// output the grouped-by-library summary
for (var libname in copySummaryObj) {
var copycount = 0;
+ var copycount_reshelving = 0;
for (var loc in copySummaryObj[libname]) {
for (var cn in copySummaryObj[libname][loc]) {
copycount = copycount + copySummaryObj[libname][loc][cn]['count'];
+ copycount_reshelving = copycount_reshelving + copySummaryObj[libname][loc][cn]['count_reshelving'];
}
}
var libdiv = dojo.create('div');
var libcontent = dojo.create('span', { "style": "font-weight: bold;" });
- var libtext = dojo.doc.createTextNode(copycount + ' available at ' + libname);
+ var summary_text = copycount + ' available at ' + libname;
+ if (copycount_reshelving) {
+ summary_text += ' (plus ' + copycount_reshelving + ' recently returned)';
+ }
+ var libtext = dojo.doc.createTextNode(summary_text);
libcontent.appendChild(libtext);
libdiv.appendChild(libcontent);
output.appendChild(libdiv);