show match score/quality in VL record match grid
authorberick <berick@esilibrary.com>
Wed, 4 May 2011 17:14:38 +0000 (13:14 -0400)
committerBill Erickson <berick@esilibrary.com>
Wed, 6 Jul 2011 18:50:51 +0000 (14:50 -0400)
Open-ILS/web/js/ui/default/vandelay/vandelay.js
Open-ILS/web/templates/default/vandelay/inc/matches.tt2

index bb6ce0c..5b000b7 100644 (file)
@@ -464,26 +464,24 @@ function vlLoadMatchUI(recId) {
 
                 // build the data store of records with match information
                 var dataStore = bre.toStoreData(recs, null, 
-                    {virtualFields:['_id']});
+                    {virtualFields:['_id', 'match_score', 'match_quality']});
                 dataStore.identifier = '_id';
 
                 var matchSeenMap = {};
 
-                // XXX much of this is no longer needed with changes to match_set
                 for(var i = 0; i < dataStore.items.length; i++) {
                     var item = dataStore.items[i];
                     item._id = i; // just need something unique
-                    /*
                     for(var j = 0; j < matches.length; j++) {
                         var match = matches[j];
                         if(match.eg_record() == item.id && !matchSeenMap[match.id()]) {
-                            var attr = getRecAttrFromMatch(queuedRecordsMap[recId], match);
-                            item.src_matchpoint = getRecAttrDefFromAttr(attr, currentType).code();
+                            if(match.match_score)
+                                item.match_score = match.match_score();
+                            item.match_quality = match.quality();
                             matchSeenMap[match.id()] = 1;
                             break;
                         }
                     }
-                    */
                 }
 
                 // now populate the grid
index 39f8261..9cccbdb 100644 (file)
@@ -14,6 +14,8 @@
                     get: vlGetViewMARC, 
                     formatter : vlFormatViewMatchMARC
                 },
+                {name: 'Match Score', field:'match_score'},
+                {name: 'Match Quality', field:'match_quality'},
                 {name: '&vandelay.creator;', get: vlGetCreator},
                 {name: '&vandelay.create.date;', field:'create_date', get: vlGetDateTimeField},
                 {name: '&vandelay.last.edit.date;', field:'edit_date', get: vlGetDateTimeField},