if there's not a record associated with the xact (like in the case of
a reservation against a non-cataloged resource), don't try to show a
link
END %]
<tr id='myopac_circ_trans_row'>
<td>
- <a href="[% ctx.opac_root %]/record/[% f.xact.circulation.target_copy.call_number.record.id %]">[% attrs.title %]</a>
+ [% recid = f.xact.circulation.target_copy.call_number.record.id || f.xact.reservation.target_resource_type.record.id;
+ IF recid; %]
+ <a href="[% ctx.opac_root %]/record/[% recid %]">[% attrs.title %]</a>
+ [% ELSE %]
+ [% attrs.title %]
+ [% END %]
</td>
<td>
<a href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>