https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20732

--- Comment #19 from David Nind <[email protected]> ---
Created attachment 212352
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212352&action=edit
Bug 20732: Hide Holdings tab on OPAC detail pages for records without items,
per item type

The Holdings tab was always displayed, showing 'Holdings (0)' for records
without physical items. This misled users into thinking the library did not
have the item, when in fact it may be online or a component of a larger record.

The OPAC (opac-detail.tt) can now hide the Holdings tab nav item and panel when
the record has no items, but only for the item types listed in the
OPACHideHoldingsTabItemTypes system preference (pipe-separated list of
biblioitems.itemtype codes). If the preference is empty, the tab is shown for
all item types, as before. The default tab JavaScript falls back to the first
available tab when the Holdings panel is absent.

Libraries that want to keep the tab for some item types (e.g. to display the
content configured with AlternateHoldingsField and AlternateHoldingsSeparator)
can leave them out of the list. For records whose item type is not listed, the
previous behaviour is kept: the tab is displayed with the '(0)' count and the
'No physical items' (or ALTERNATEHOLDINGS) content.

Test plan:
1. Create a bibliographic record with no items (e.g. an online resource).
2. With OPACHideHoldingsTabItemTypes empty (default), open the record's detail
page in the OPAC => the Holdings tab is displayed as before, with the '(0)'
count and 'No physical items for this record'.
3. Set OPACHideHoldingsTabItemTypes to an item type different from the record's
item type => the Holdings tab is still displayed as before, with the '(0)'
count.
4. Set OPACHideHoldingsTabItemTypes to the record's item type (e.g. 'BK|DVD')
=> the Holdings tab is not displayed and the first available tab is shown by
default.
5. Add an item to the record and reload the page => the Holdings tab is
displayed again, with the item count, whatever the preference is.

Assisted-by: Mistral Vibe <[email protected]>
Signed-off-by: David Nind <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to