$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,acnp,acns}'});
+ my (undef, @rec_data) = $self->get_records_and_facets([$rec_id], undef, {flesh => '{holdings_xml,bmp,mra,acp,acnp,acns}'});
$ctx->{bre_id} = $rec_data[0]->{id};
$ctx->{marc_xml} = $rec_data[0]->{marc_xml};
acns => [
{column => 'label', alias => 'call_number_suffix_label'},
{column => 'id', alias => 'call_number_suffix'}
+ ],
+ bmp => [
+ {column => 'label', alias => 'part_label'},
]
},
},
acpl => {},
ccs => {},
- aou => {}
+ aou => {},
+ acpm => {
+ type => 'left',
+ join => {
+ bmp => { type => 'left' }
+ }
+ }
}
},
my ($facets, @data) = $self->get_records_and_facets(
$rec_ids, $results->{facet_key},
{
- flesh => '{holdings_xml,mra,acp,acnp,acns}',
+ flesh => '{holdings_xml,mra,acp,acnp,acns,bmp}',
site => $site,
depth => $depth
}
}
my ($facets, @data) = $self->get_records_and_facets(
- $rec_ids, undef, {flesh => "{holdings_xml,mra,acnp,acns}"}
+ $rec_ids, undef, {flesh => "{holdings_xml,mra,acnp,acns,bmp}"}
);
$self->ctx->{records} = [@data];
ELSE;
copies = volume.findnodes('./*[local-name()="copies"]/*[local-name()="copy"]');
FOR copy IN copies;
+ parts = copy.findnodes('./*[local-name()="monograph_parts"]/*[local-name()="monograph_part"]');
+ FOREACH part IN parts;
+ part_label = part.getAttribute('label');
+ LAST IF part_label != '';
+ END;
# Check copy visibility
cp.deleted = copy.getAttribute('deleted');
cp.visible = copy.getAttribute('opac_visible');
holding = {
label => vol.label,
+ part_label => part_label,
location => loc.textContent,
library => circlib.textContent,
status => status.textContent
barcode => copy.getAttribute('barcode')
};
args.holdings.push(holding);
+ part_label = '';
END;
END;
END;
+[%-
+FOREACH copy_info IN ctx.copies;
+ IF copy_info.part_label != '';
+ has_parts = 'true';
+ LAST;
+ END;
+END;
+%]
<table cellpadding="0" cellspacing="0" border="0" width="100%" id="rdetails_status">
<thead>
<tr>
<th id='copy_header_library'>[% l("Location") %]</th>
<th id='copy_header_callnmber'>[% l("Call Number") %]</th>
+ [%- IF has_parts == 'true' %]
+ <th id='copy_header_part'>[% l("Part") %]</th>
+ [%- END %]
<th id='copy_header_barcode'>[% l("Barcode") %]</th>
<th id='copy_header_shelfloc'>[% l("Shelving Location") %]</th>
[%- IF ctx.is_staff %]
-%]
</td>
<td header='copy_header_callnumber'>[% callnum | html %]</td>
+ [%- IF has_parts == 'true' %]
+ <td header='copy_header_part'>[% copy_info.part_label | html %]</td>
+ [%- END %]
<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 %]
<td><a href="[% uri.href %]">[% uri.link | html %]</a>[% ' - ' _ uri.note | html IF uri.note %]</td>
</tr>
[% END %]
- [% IF args.holdings.size > 0 %]
+ [%- IF args.holdings.size > 0;
+ FOREACH copy IN args.holdings;
+ IF copy.part_label != '';
+ has_parts = 'true';
+ LAST;
+ END;
+ END;
+ %]
<tr name='bib_cn_list' class='result_table_title_cell'>
<td colspan='2'>
<table class='result_holdings_table'>
<th>[% l('Library') %]</th>
<th>[% l('Shelving location') %]</th>
<th>[% l('Call number') %]</th>
+ [%- IF has_parts == 'true'; %]
+ <th>[% l('Part') %]</th>
+ [%- END %]
<th>[% l('Status') %]</th>
</tr></thead>
<tbody>
<td>[% copy.library | html %]</td>
<td>[% copy.location | html %]</td>
<td>[% copy.label | html %]</td>
+ [%- IF has_parts == 'true'; %]
+ <td>[% copy.part_label %]</td>
+ [%- END %]
<td>[% copy.status | html %]</td>
</tr>
[% END %]
</table>
</td>
</tr>
- [% END %]
+ [%- has_parts = 'false';
+ END;
+ %]
[% END %] <!-- END detail_record_view -->
</table>
[% PROCESS "opac/parts/result/copy_counts.tt2" %]