LP1103068 - Show titles and authors for pre-cat items user/bshum/tpac-precat-title-and-author
authorBen Shum <bshum@biblio.org>
Thu, 14 Mar 2013 21:40:04 +0000 (17:40 -0400)
committerBen Shum <bshum@biblio.org>
Thu, 14 Mar 2013 21:47:19 +0000 (17:47 -0400)
As noted in LP1103068, TPAC does not currently show anything when viewing a
pre-cataloged item in the my account summary of items checked out.

If the call number is -1 (pre-cat), then show the dummy title and dummy author
values, which fields are hopefully relevant as long as staff were good to put
something meaningful in those during creation of the pre-cat.

Also, wrap the title in a check for attrs.title.

Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/templates/opac/myopac/circs.tt2

index b4f0ea2..d5a9f02 100644 (file)
                                 value="[% circ.circ.id %]" />
                         </td>
                         <td name="author">
+                            [% IF attrs.title %]
                             <a href="[% mkurl(ctx.opac_root _ '/record/' _ 
                                 circ.circ.target_copy.call_number.record.id) %]"
                                 name="[% l('Catalog record') %]">[% attrs.title | html %]</a>
+                            [% END %]
+                            [% IF circ.circ.target_copy.call_number.id == -1 %]
+                                [% circ.circ.target_copy.dummy_title | html %]
+                            [% END %]
                             [% IF attrs.author %] /
                             <a href="[% mkurl(ctx.opac_root _ '/results',
                                 {qtype => 'author', query => attrs.author.replace('[,\.:;]', '')}
                             ) %]">[% attrs.author | html %]</a>
                             [% END %]
+                            [% IF circ.circ.target_copy.call_number.id == -1 %] / 
+                                [% circ.circ.target_copy.dummy_author | html %]
+                            [% END %]
                         </td>
                         <td name="renewals" align="center">
                             [% circ.circ.renewal_remaining %]