From 9e43303f3d09712ff585f91c93db9a223e3fca93 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 30 Apr 2024 12:08:09 +0000 Subject: [PATCH] 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 --- installer/data/mysql/mandatory/sysprefs.sql | 2 +- .../prog/en/modules/admin/preferences/serials.pref | 1 + koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 2 ++ opac/opac-detail.pl | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 4c372bad78..52e54b49ed 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -533,7 +533,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('OPACSearchForTitleIn','Other Libraries (WorldCat)\nOther Databases (Google Scholar)\nOnline Stores (Bookfinder.com)\nOpen Library (openlibrary.org)','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'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref index 7581bf5ca8..5bea1b16ae 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref @@ -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. diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index 810b4ffe07..267ee93520 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1694,6 +1694,8 @@ showBsTab("bibliodescriptions", "holdings"); [% CASE 'components' -%] showBsTab("bibliodescriptions", "components"); + [% CASE 'descriptions' -%] + showBsTab("bibliodescriptions", "descriptions"); [% CASE 'subscriptions' -%] showBsTab("bibliodescriptions", "subscriptions"); [% CASE 'serialcollection' -%] diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 36c2670b2a..e9f05dcb71 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -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 -- 2.30.2