LP1103068 - Show titles and authors for pre-cat items
authorBen Shum <bshum@biblio.org>
Thu, 14 Mar 2013 21:40:04 +0000 (17:40 -0400)
committerBen Shum <bshum@biblio.org>
Fri, 15 Mar 2013 16:26:22 +0000 (12:26 -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>
Signed-off-by: Michael Peters <mpeters@emeralddata.net>
Open-ILS/src/templates/opac/myopac/circs.tt2

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