],
acn => [
{column => 'label', alias => 'call_number_label'},
- {column => 'id', alias => 'call_number'}
+ {column => 'id', alias => 'call_number'},
+ {column => 'owning_lib', alias => 'call_number_owning_lib'}
],
circ => ['due_date'],
acnp => [
<td headers='copy_header_part'>[% copy_info.part_label | html %]</td>
[%- END %]
<td headers='copy_header_barcode' property="serialNumber">
- [%- IF ctx.is_staff -%]
- <a href="javascript:void(0)" onclick="xulG.new_tab(xulG.urls.XUL_COPY_STATUS, {}, {'from_item_details_new': true, 'barcodes': ['[%- copy_info.barcode | html | replace('\'', '\\\'') -%]']})">[% copy_info.barcode | html %]</a>
- [%- ELSE -%][% copy_info.barcode | html %]
- [%- END -%]
+ [% copy_info.barcode | html -%]
+ [% IF ctx.is_staff %]
+ <a onclick="xulG.new_tab(xulG.urls.XUL_COPY_STATUS, {}, {'from_item_details_new': true, 'barcodes': ['[%- copy_info.barcode | html | replace('\'', '\\\'') -%]']})"
+ href="javascript:;">[% l('view') %]</a>
+ [%# if the user can edit copies, show the copy edit link %]
+ [% IF ctx.has_perm('UPDATE_COPY', copy_info.circ_lib)
+ OR ctx.has_perm('UPDATE_COPY', copy_info.call_number_owning_lib) %]
+ <span> | </span>
+ <a href="javascript:;"
+ onclick="xulG.volume_item_creator({copy_id : [% copy_info.id %]})">
+ [% l(' edit') %]
+ </a>
+ [% END %]
+ [% END %]
[%- IF attrs.gtin13;
'<meta property="gtin13" content="' _ attrs.gtin13 _ '" />';
END; -%]
} else {
url = obj.url_prefix('XUL_VOLUME_COPY_CREATOR_ORIGINAL');
}
- var w = obj.new_tab(
+
+
+ if (params && params.copy_id) {
+ // if accessing directly from the embedded catalog,
+ // load the copy/volume data here so the catalog
+ // doesn't have to.
+ try {
+ JSAN.use('util.network');
+ var net = new util.network();
+ var copies = net.simple_request(
+ 'FM_ACP_FLESHED_BATCH_RETRIEVE', [[params.copy_id]]);
+ var copy = copies[0];
+ var volume = net.simple_request(
+ 'FM_ACN_RETRIEVE.authoritative', [copy.call_number()]);
+ copy.call_number(volume);
+ params.existing_copies = [copy];
+ } catch (E) {
+ alert('cannot fetch copy ' + E);
+ }
+ }
+
+ var w = obj.new_tab(
url,
{ 'tab_name' : document.getElementById('offlineStrings').getString('staff.cat.create_or_rebarcode_items') },
params