$self->mk_copy_query($rec_id, $org, $depth, $copy_limit, $copy_offset)
);
- my (undef, @rec_data) = $self->get_records_and_facets([$rec_id], undef, {flesh => '{holdings_xml,mra,acp}'});
+ my (undef, @rec_data) = $self->get_records_and_facets([$rec_id], undef, {flesh => '{holdings_xml,mra,acp,acnp,acns}'});
$ctx->{bre_id} = $rec_data[0]->{id};
$ctx->{marc_xml} = $rec_data[0]->{marc_xml};
{column => 'id', alias => 'call_number'}
],
circ => ['due_date'],
+ acnp => [
+ {column => 'label', alias => 'call_number_prefix_label'},
+ {column => 'id', alias => 'call_number_prefix'}
+ ],
+ acns => [
+ {column => 'label', alias => 'call_number_suffix_label'},
+ {column => 'id', alias => 'call_number_suffix'}
+ ]
},
from => {
acp => {
- acn => {
- join => {bre => {filter => {id => $rec_id }}},
- filter => {deleted => 'f'}
+ acn => {
+ join => {
+ acnp => { fkey => 'prefix' },
+ acns => { fkey => 'suffix' }
+ },
+ filter => [{deleted => 'f'}, {record => $rec_id}],
},
circ => { # If the copy is circulating, retrieve the open circ
type => 'left',
}
},
- where => {'+acp' => {deleted => 'f' }},
+ where => {
+ '+acp' => {deleted => 'f' }
+ },
order_by => [
{class => 'aou', field => 'name'},
my ($facets, @data) = $self->get_records_and_facets(
$rec_ids, $results->{facet_key},
{
- flesh => '{holdings_xml,mra,acp}',
+ flesh => '{holdings_xml,mra,acp,acnp,acns}',
site => $site,
depth => $depth
}
}
my ($facets, @data) = $self->get_records_and_facets(
- $rec_ids, undef, {flesh => "{holdings_xml,mra}"}
+ $rec_ids, undef, {flesh => "{holdings_xml,mra,acnp,acns}"}
);
$self->ctx->{records} = [@data];
}
my ($facets, @data) = $self->get_records_and_facets(
- $self->ctx->{ids}, undef, {flesh => "{holdings_xml,mra}"}
+ $self->ctx->{ids}, undef, {flesh => "{holdings_xml,mra,acnp,acns}"}
);
$self->ctx->{records} = [@data];
# Check volume visibility - could push this into XPath
vol.label = volume.getAttribute('label');
+
+ # Prepend prefix, if any
+ prefix = volume.findnodes('./*[local-name()="call_number_prefix"][@ident!="-1"]');
+ IF prefix.getAttribute('label') != '';
+ vol.label = prefix.getAttribute('label') _ " " _ vol.label;
+ END;
+
+ # Append prefix, if any
+ suffix = volume.findnodes('./*[local-name()="call_number_suffix"][@ident!="-1"]');
+ IF suffix.getAttribute('label') != '';
+ vol.label = vol.label _ " " _ suffix.getAttribute('label');
+ END;
+
vol.id = volume.getAttribute('id');
NEXT IF volume.getAttribute('opac_visible') == 'false';
NEXT IF volume.getAttribute('deleted') == 'true';
<tbody class="copy_details_table">
[%- last_cn = 0;
FOR copy_info IN ctx.copies;
- NEXT IF copy_info.call_number_label == '##URI##' %]
+ callnum = copy_info.call_number_label;
+ NEXT IF callnum == '##URI##';
+
+ callnum_prefix = copy_info.call_number_prefix_label;
+ IF callnum_prefix != "";
+ callnum = callnum_prefix _ " " _ callnum;
+ END;
+
+ callnum_suffix = copy_info.call_number_suffix_label;
+ IF callnum_suffix != "";
+ callnum = callnum _ " " _ callnum_suffix;
+ END;
+ -%]
<tr>
<td header='copy_header_library'>
[%-
org_name | html
-%]
</td>
- <td header='copy_header_callnumber'>[% copy_info.call_number_label | html %]</td>
+ <td header='copy_header_callnumber'>[% callnum | html %]</td>
<td header='copy_header_barcode'>[% copy_info.barcode | html %]</td>
<td header='copy_header_shelfloc'>[% copy_info.copy_location | html %]</td>
[%- IF ctx.is_staff %]