Bug 19768: Add "Title notes" tab to OpacSerialDefaultTab preference

This patch adds a "title notes tab" option to the opacSerialDefaultTab
preference.

To test, apply the patch and restart services.

- Go to Administration -> System preferences -> opacSerialDefaultTab.
- There should now be a new options, "title notes tab."
- Set the preference to the new value.

- Go to the OPAC and locate a bibliographic record which is associated
  with a subscription and which has data in a 5XX notes field.
- On the bibliographic detail page the "Title notes" tab should be
  selected by default.
- Test that the other system preference values still work correctly too.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Owen Leonard 2024-04-30 12:08:09 +00:00 committed by Katrin Fischer
parent d8465adfe5
commit 0945cdf5d6
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
4 changed files with 6 additions and 1 deletions

View File

@ -538,7 +538,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('OPACSearchForTitleIn','<a href=\"https://worldcat.org/search?q={TITLE}\" target=\"_blank\">Other Libraries (WorldCat)</a>\n<a href=\"https://scholar.google.com/scholar?q={TITLE}\" target=\"_blank\">Other Databases (Google Scholar)</a>\n<a href=\"https://www.bookfinder.com/search/?author={AUTHOR}&amp;title={TITLE}&amp;st=xl&amp;ac=qr\" target=\"_blank\">Online Stores (Bookfinder.com)</a>\n<a href=\"https://openlibrary.org/search?author=({AUTHOR})&title=({TITLE})\" target=\"_blank\">Open Library (openlibrary.org)</a>','70|10','Enter the HTML that will appear in the \'Search for this title in\' box on the detail page in the OPAC. Enter {TITLE}, {AUTHOR}, or {ISBN} in place of their respective variables in the URL. Leave blank to disable \'More Searches\' menu.','Textarea'),
('OpacSeparateHoldings','0',NULL,'Separate current branch holdings from other holdings (OPAC)','YesNo'),
('OpacSeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings (OPAC)','Choice'),
('opacSerialDefaultTab','subscriptions','holdings|serialcollection|subscriptions','Define the default tab for serials in OPAC.','Choice'),
('opacSerialDefaultTab','subscriptions','holdings|serialcollection|subscriptions|titlenotes','Define the default tab for serials in OPAC.','Choice'),
('OPACSerialIssueDisplayCount','3','','Number of serial issues to display per subscription in the OPAC','Integer'),
('OPACShelfBrowser','1','','Enable/disable Shelf Browser on item details page. WARNING: this feature is very resource consuming on collections with large numbers of items.','YesNo'),
('OPACShibOnly','0','','If ON enables shibboleth only authentication for the opac','YesNo'),

View File

@ -5,6 +5,7 @@ Serials:
- pref: opacSerialDefaultTab
choices:
holdings: holdings tab
titlenotes: title notes tab
subscriptions: subscriptions tab
serialcollection: serial collection tab
- as default tab for serials in OPAC. Please note that the serial collection tab is currently available only for UNIMARC.

View File

@ -1694,6 +1694,8 @@
showBsTab("bibliodescriptions", "holdings");
[% CASE 'components' -%]
showBsTab("bibliodescriptions", "components");
[% CASE 'descriptions' -%]
showBsTab("bibliodescriptions", "descriptions");
[% CASE 'subscriptions' -%]
showBsTab("bibliodescriptions", "subscriptions");
[% CASE 'serialcollection' -%]

View File

@ -1202,6 +1202,8 @@ my $defaulttab =
? 'holdings' :
$opac_serial_default eq 'subscriptions' && $subscriptionsnumber
? 'subscriptions' :
$opac_serial_default eq 'titlenotes' && $subscriptionsnumber
? 'descriptions' :
$opac_serial_default eq 'serialcollection' && @serialcollections > 0
? 'serialcollection' :
$opac_serial_default eq 'holdings' && scalar (@itemloop) > 0