From d50e03f75c2fa5635e715dcaa8f057f577a508f1 Mon Sep 17 00:00:00 2001 From: berick Date: Mon, 25 Apr 2011 09:58:19 -0400 Subject: [PATCH] record / item import failures summar links --- Open-ILS/web/js/ui/default/vandelay/vandelay.js | 27 +++++++++++++++++++++- .../web/templates/default/vandelay/inc/queue.tt2 | 14 ++++++++++- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/Open-ILS/web/js/ui/default/vandelay/vandelay.js b/Open-ILS/web/js/ui/default/vandelay/vandelay.js index a54005f058..7eece794e0 100644 --- a/Open-ILS/web/js/ui/default/vandelay/vandelay.js +++ b/Open-ILS/web/js/ui/default/vandelay/vandelay.js @@ -369,7 +369,7 @@ function retrieveQueuedRecords(type, queueId, onload) { var limit = parseInt(sel.options[sel.selectedIndex].value); var offset = limit * parseInt(vlQueueDisplayPage.attr('value')-1); - var params = [authtoken, queueId, {clear_marc: 1, offset: offset, limit: limit}]; + var params = [authtoken, queueId, {clear_marc: 1, offset: offset, limit: limit, flesh_import_items:1}]; if(vlQueueGridShowNonImport.checked) params[2].non_imported = 1; @@ -568,6 +568,31 @@ function vlFormatViewMatches(id) { return '' + this.name + ''; } +function vlGetViewErrors(rowIdx, item) { + if(item) { + var id = this.grid.store.getValue(item, 'id'); + var rec = queuedRecordsMap[id]; + // id:rec_error:item_import_error_count + return id + ':' + + (rec.import_error() ? 1 : '') + ':' + + rec.import_items().filter(function(i) {return i.import_error()}).length; + } + return -1 +} + +function vlFormatViewErrors(chunk) { + if(chunk == -1) return ''; + var id = chunk.split(':')[0]; + var rec = chunk.split(':')[1]; + var count = chunk.split(':')[2]; + var links = ''; + if(rec) + links += 'Record
'; // XXX I18N + if(Number(count)) + links += 'Items ('+count+')'; // XXX I18N + return links; +} + function vlFormatViewMatchMARC(id) { return '' + this.name + ''; diff --git a/Open-ILS/web/templates/default/vandelay/inc/queue.tt2 b/Open-ILS/web/templates/default/vandelay/inc/queue.tt2 index e7d6eaf607..5c87243445 100644 --- a/Open-ILS/web/templates/default/vandelay/inc/queue.tt2 +++ b/Open-ILS/web/templates/default/vandelay/inc/queue.tt2 @@ -137,7 +137,7 @@ field='+row_selector' get='vlQueueGridDrawSelectBox' formatter='vlQueueGridFormatSelectBox' - styles='text-align: center;' + styles='text-align: center;width:30px;' nonSelectable='true'> @@ -154,6 +154,12 @@ styles='text-align: center;' nonSelectable='true'>&vandelay.matches; Import Errors + &vandelay.import.time; @@ -189,6 +195,12 @@ styles='text-align: center;' nonSelectable='true'>&vandelay.matches; Import Errors + &vandelay.import.time; -- 2.11.0