LP#1761222: Replace bib "quality" with item "mint_condition" user/rsteed/lp1761222-holdings-due-date-etc
authorRemington Steed <rjs7@calvin.edu>
Tue, 30 Jul 2019 19:52:39 +0000 (15:52 -0400)
committerRemington Steed <rjs7@calvin.edu>
Tue, 30 Jul 2019 19:59:32 +0000 (15:59 -0400)
I originally misunderstood the XUL item field labeled "quality" and
pulled in the bib record "overall quality" score. But upon checking the
XUL holdings maintenance screen again, we clearly want the item's
"mint_condition" field instead. This commit makes that correction and
converts the 't' or 'f' values into "Good" or "Damaged", to match the
item editor labels.

Signed-off-by: Remington Steed <rjs7@calvin.edu>
Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2

index 871d6a5..37d1f94 100644 (file)
     <eg-grid-field label="[% l('Classification') %]"          path="call_number.label_class.name" hidden></eg-grid-field>
     <eg-grid-field label="[% l('Due Date') %]"                path="_circ.due_date" datecontext="_circ_lib" dateonlyinterval="_duration" datatype="timestamp" visible></eg-grid-field>
     <eg-grid-field label="[% l('OPAC Visible?') %]"           datatype="bool" path="opac_visible" hidden></eg-grid-field>
-    <eg-grid-field label="[% l('Quality') %]"                 path="call_number.record.simple_record.quality" hidden></eg-grid-field>
+    <eg-grid-field label="[% l('Quality') %]"                 path="mint_condition" hidden>
+      <span>{{ item['mint_condition']=='t' ? '[% l('Good') %]' : '[% l('Damaged') %]' }}</span>
+    </eg-grid-field>
   
   </eg-grid>
 </div>