OPAC Browse: Avoid showing tracing if linked authorities have no bibs
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Mon, 22 Jul 2013 18:08:05 +0000 (14:08 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Mon, 22 Jul 2013 18:08:05 +0000 (14:08 -0400)
If the OPAC browser is displaying a heading, e.g. Stephen King, and
there's a 5XX for Richard Bachman, and that the authority records are
properly linked together, you're going to see a "See Also Richard
Bachman" link indented under Stephen King.

However, you probably don't actually want to see See Also Richard
Bachman if you have no bibs linked to the Richard Bachman authority
record.  This commit skips display of such tracings if the target
authority has no bibs linked to it.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/templates/opac/browse.tt2

index 9212e93..58bb0f5 100644 (file)
                                             # that h.target_count is only
                                             # defined when h.target is.
 
-                                            IF h.target %]
+                                            IF h.target AND h.target_count %]
                                             <li><span class="browse-result-authority-field-name">[% field.name %]</span>
                                             <a href="[% mkurl(ctx.opac_root _ '/results', {query => 'identifier|authority_id[' _ h.target _ ']'}) %]">[% h.heading | html %]</a>
                                             <span class="browse-result-authority-bib-links">([% h.target_count %])</span>