Show the "match score," a hopefully clearer term for match point quality,
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Fri, 20 May 2011 22:12:58 +0000 (18:12 -0400)
committerBill Erickson <berick@esilibrary.com>
Wed, 6 Jul 2011 18:50:53 +0000 (14:50 -0400)
in the expression tree UI

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/web/js/dojo/openils/vandelay/nls/match_set.js
Open-ILS/web/js/ui/default/conify/global/vandelay/match_set.js
Open-ILS/web/templates/default/conify/global/vandelay/match_set_tree.tt2

index 92851d2..be2c79b 100644 (file)
@@ -11,5 +11,6 @@
     "FAULTY_MARC": "A MARC tag must be identified by three digits, and the subfield must be one non-whitespace, non-control character.",
     "WORKING_MP_HERE": "Choose from among the three buttons above to add a new match point.",
     "WORKING_QM_HERE": "Use buttons above and to the right to add new quality metrics.",
-    "SVF": "Record Attribute"
+    "SVF": "Record Attribute",
+    "MATCH_SCORE": "Match score ${0}"
 }
index 28f30b5..87656a3 100644 (file)
@@ -339,19 +339,27 @@ function find_crad_by_name(name) {
 }
 
 function render_vmsp_label(point, minimal) {
-    /* "minimal" has this implication:
+    /* "minimal" has these implications:
      * for svf, only show the code, not the longer label.
+     * no quality display
      */
     if (point.bool_op()) {
         return point.bool_op();
     } else if (point.svf()) {
         return (openils.Util.isTrue(point.negate()) ? "NOT " : "") + (
             minimal ?  point.svf() :
-                (point.svf() + " / " + find_crad_by_name(point.svf()).label())
+                (point.svf() + " / " + find_crad_by_name(point.svf()).label()) +
+                " | " + dojo.string.substitute(
+                    localeStrings.MATCH_SCORE, [point.quality()]
+                )
         );
     } else {
         return (openils.Util.isTrue(point.negate()) ? "NOT " : "") +
-            point.tag() + " \u2021" + point.subfield();
+            point.tag() + " \u2021" + point.subfield() + (minimal ? "" : " | " +
+                dojo.string.substitute(
+                    localeStrings.MATCH_SCORE, [point.quality()]
+                )
+            );
     }
 }
 
index 99367c0..cc5c788 100644 (file)
@@ -61,7 +61,7 @@
         <td>
             <label for="quality-input"
                 title="A relative number representing the impact of this expression on the score of the overall record match"><!-- XXX tooltipize -->
-                Math Score
+                Match Score
             </label>
         </td>
         <td>