one more minor thing when showing fines on reservations
authorsenator <lebbeous@esilibrary.com>
Mon, 25 Apr 2011 20:15:51 +0000 (16:15 -0400)
committersenator <lebbeous@esilibrary.com>
Mon, 25 Apr 2011 20:15:51 +0000 (16:15 -0400)
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

Open-ILS/web/templates/default/opac/myopac/main.tt2

index a99cc2d..03347fb 100644 (file)
                     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>