Bug 33509: Don't show Other holdings when there are no alternate holdings

With bug 33509 alternate holdings defined in AlternateHoldingsField
are shown in the staff interface result list. This works greatly
when there are items or when there is are alternate holdings (the
configured field/subfields exist in the record), but not when there
are no items and no alternate holdings.

To test:
* Add 100a to AlternateHoldingsField
* Make a search with some records without items
  Sample data: perl
* Make sure the alternate holdings show when there are no items
  and 100a exists
* Change to 100z
* Verify the result list now shows "Other holdings:" with nothing below
* Apply patch
* Repeat
  * Alternate holdings should still show nicely
  * Without alternate holdings 'no items' is displayed

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2ce97da0e7)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This commit is contained in:
Katrin Fischer 2023-04-12 19:58:03 +00:00 committed by Matt Blenkinsop
parent 09961dff78
commit a6d93137b0
1 changed files with 1 additions and 1 deletions

View File

@ -676,7 +676,7 @@
[% ELSE # /IF ( SEARCH_RESULT.items_count ) %]
[% IF ( SEARCH_RESULT.ALTERNATEHOLDINGS ) %]
[% IF ( SEARCH_RESULT.ALTERNATEHOLDINGS.size ) %]
<strong id="altholdings_heading">Other holdings:</strong>
<ul>
[% FOREACH ALTERNATEHOLDING IN SEARCH_RESULT.ALTERNATEHOLDINGS %]