Rdetail
================================================================= -->
<!ENTITY rdetail.print "print these details">
+<!ENTITY rdetail.cn.part "Part">
<!ENTITY rdetail.cn.barcode "Barcode">
<!ENTITY rdetail.cn.location "Location">
<!ENTITY rdetail.cn.hold.age "Age Hold Protection">
function cpdDrawCopy(r) {
var copy = r.getResultObject();
var row = r.row;
+ var trow = r.args.templateRow;
if (r.args.copy_location && copy.location().name() != r.args.copy_location) {
hideMe(row);
$n(row, 'location').appendChild(text(copy.location().name()));
$n(row, 'status').appendChild(text(copy.status().name()));
+ // append comma-separated list of part this copy is linked to
+ if(copy.parts() && copy.parts().length) {
+ unHideMe($n(trow, 'copy_part_label'));
+ unHideMe($n(row, 'copy_part'));
+ for(var i = 0; i < copy.parts().length; i++) {
+ var part = copy.parts()[i];
+ var node = $n(row, 'copy_part');
+ if(i > 0) node.appendChild(text(','));
+ node.appendChild(text(part.label()));
+ }
+ }
+
if(isXUL()) {
/* show the hold link */
var l = $n(row, 'copy_hold_link');
<td width='33%'>&rdetail.cn.barcode;</td>
<td>&common.status;</td>
<td>&rdetail.cn.location;</td>
+ <td name='copy_part_label' class='hide_me'>&rdetail.cn.part;</td>
<td name='age_protect_label' class='hide_me'>&rdetail.cn.hold.age;</td>
<td name='create_date_label' class='hide_me'>&rdetail.cn.genesis;</td>
<td name='holdable_label' class='hide_me'>&rdetail.cn.holdable;</td>
<td name='status'> </td>
<td name='location'> </td>
+ <td name='copy_part' class='hide_me'> </td>
<td name='age_protect_value' class='hide_me'>&rdetail.cn.disabled;</td>
<td name='create_date_value' class='hide_me'> </td>