<field name="status" oils_obj:array_position="30" oils_persist:virtual="false" />
<field name="notes" oils_obj:array_position="31" oils_persist:virtual="true" />
<field name="stat_cat_entry_copy_maps" oils_obj:array_position="32" oils_persist:virtual="true" />
+ <field name="circulations" oils_obj:array_position="33" oils_persist:virtual="true" />
</fields>
<links>
<link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
# For backwards compatibility
$copy->stat_cat_entries($copy->stat_cat_entry_copy_maps);
- return $copy;
-
-# return $copy unless $copy->stat_cat_entries;
-#
-# for my $map (@{$copy->stat_cat_entries}) {
-# $map->stat_cat(
-# $e->retrieve_asset_stat_cat($map->stat_cat));
-# $map->stat_cat_entry(
-# $e->retrieve_asset_stat_cat_entry($map->stat_cat_entry));
-# }
-# return $copy;
+ if( $copy->status->id == OILS_COPY_STATUS_CHECKED_OUT ) {
+ $copy->circulations(
+ $e->search_action_circulation(
+ [
+ { target_copy => $copy->id },
+ {
+ order_by => 'xact_start',
+ limit => 1
+ }
+ ]
+ )
+ );
+ }
+ return $copy;
}
unHideMe($n(templateRow, 'age_protect_label'));
unHideMe($n(templateRow, 'create_date_label'));
unHideMe($n(templateRow, 'holdable_label'));
+ unHideMe($n(templateRow, 'due_date_label'));
}
unHideMe(templateRow);
unHideMe($n(copyrow, 'age_protect_value'));
unHideMe($n(copyrow, 'create_date_value'));
unHideMe($n(copyrow, 'copy_holdable_td'));
+ unHideMe($n(copyrow, 'copy_due_date_td'));
}
for( var i = 0; i < copies.length; i++ ) {
$n(row, 'status').appendChild(text(copy.status().name()));
if(isXUL()) {
-
/* show the hold link */
var l = $n(row, 'copy_hold_link');
unHideMe(l);
$n(row, 'copy_is_holdable').appendChild(text(no));
}
+ var circ;
+ if( copy.circulations() ) {
+ circ = copy.circulations()[0];
+ if( circ ) {
+ $n(row, 'copy_due_date').appendChild(text(circ.due_date().replace(/[T ].*/,'')));
+ }
+ }
+
}
r.args.copy = copy;
<td name='age_protect_label' class='hide_me'>Age Hold Protection</td>
<td name='create_date_label' class='hide_me'>Create Date</td>
<td name='holdable_label' class='hide_me'>Holdable</td>
+ <td name='due_date_label' class='hide_me'>Due Date</td>
</tr>
</thead>
<tbody name='copies_tbody' class='copy_details_table' width='100%'>
<span name='copy_is_holdable'> </span>
</td>
+ <td name='copy_due_date_td' class='hide_me'>
+ <span name='copy_due_date'> </span>
+ </td>
+
</tr>
<tr name='copy_extras_row' class='hide_me'>