desc => 'Returns a stream of fleshed holds',
params => [
{ desc => 'Authtoken', type => 'string'},
- { desc => 'Hash of optional param: Org unit ID (defaults to workstation org unit), limit, offset, sort (array of: acplo.position, call_number, request_time)',
+ { desc => 'Hash of optional param: Org unit ID (defaults to workstation org unit), limit, offset, sort (array of: acplo.position, prefix, call_number, suffix, request_time)',
type => 'object'
},
],
"class" => "acplo", "field" => "position",
"transform" => "coalesce", "params" => [999]
};
+ } elsif ($s eq 'prefix') {
+ push @$sort, {"class" => "acnp", "field" => "label_sortkey"};
} elsif ($s eq 'call_number') {
- push @$sort, {"class" => "acn", "field" => "label"};
+ push @$sort, {"class" => "acn", "field" => "label_sortkey"};
+ } elsif ($s eq 'suffix') {
+ push @$sort, {"class" => "acns", "field" => "label_sortkey"};
} elsif ($s eq 'request_time') {
push @$sort, {"class" => "ahr", "field" => "request_time"};
}
"join" => {
"acn" => {
"field" => "id",
- "fkey" => "call_number"
+ "fkey" => "call_number",
+ "join" => {
+ "acnp" => {
+ "field" => "id",
+ "fkey" => "prefix"
+ },
+ "acns" => {
+ "field" => "id",
+ "fkey" => "suffix"
+ }
+ }
},
"acplo" => {
"field" => "org",
"ahr" => ["usr", "current_copy"],
"au" => ["card"],
"acp" => ["location", "call_number"],
- "acn" => ["record"]
+ "acn" => ["record","prefix","suffix"]
}
}
]);
<!-- Dojo goodness -->
<script type="text/javascript">
var djConfig = {parseOnLoad:true,isDebug:false,AutoIDL:['aou','aout','pgt','ahr','acp','acn']};
- var sort_order = ["acplo.position", "call_number", "request_time"];
+ var sort_order = ["acplo.position", "prefix", "call_number", "suffix", "request_time"];
</script>
<script type="text/javascript" src="/js/dojo/dojo/dojo.js"></script>
<script type="text/javascript" src="/js/dojo/dojo/openils_dojo.js"></script>
<td type='opac/slot-data' query='datafield[tag=245]'></td>
<td type='opac/slot-data' query='datafield[tag^=1]' limit='1'> </td>
<td>${current_copy.location.name}</td>
- <td>${current_copy.call_number.label}</td>
+ <td>${current_copy.call_number.prefix.label} ${current_copy.call_number.label} ${current_copy.call_number.suffix.label}</td>
<td>${current_copy.barcode}</td>
</tr>
</tbody>
hold.current_copy.location = hold_fm.current_copy().location().toHash(true);
hold.current_copy.call_number = hold_fm.current_copy().call_number().toHash(true);
hold.current_copy.call_number.record = hold_fm.current_copy().call_number().record().toHash(true);
+ hold.current_copy.call_number.prefix = hold_fm.current_copy().call_number().prefix().toHash(true);
+ hold.current_copy.call_number.suffix = hold_fm.current_copy().call_number().suffix().toHash(true);
// clone the template's html
var tr = dojo.clone(