[GIT] Evergreen ILS branch main updated. 2822019f45d5ce6c0b7e1340503d2aaba1b39e27

This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Evergreen ILS". The branch, main has been updated via 2822019f45d5ce6c0b7e1340503d2aaba1b39e27 (commit) via 9c5c63f75c0671f5b68c2d35aede0e7d3937bece (commit) via c55bc22f3b3ee066f5f0822bd3e9e880f09cf655 (commit) from 998e6c492adf1c754392f7249dde1236bd5522e0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2822019f45d5ce6c0b7e1340503d2aaba1b39e27 Author: Jane Sandberg <js7389@princeton.edu> Date: Mon Apr 21 12:11:15 2025 -0700 LP2107209: follow-up: add some docs Signed-off-by: Jane Sandberg <js7389@princeton.edu> diff --git a/docs/modules/admin_initial_setup/pages/designing_your_catalog.adoc b/docs/modules/admin_initial_setup/pages/designing_your_catalog.adoc index e52f1f5808..264469f716 100644 --- a/docs/modules/admin_initial_setup/pages/designing_your_catalog.adoc +++ b/docs/modules/admin_initial_setup/pages/designing_your_catalog.adoc @@ -749,3 +749,10 @@ would create a large, Google-style search bar on the homepage only: } ---- +== Editing displayed subfields == + +You may wish to customize which subfields are displayed in certain areas, such as +the list view. You can configure this in your catalog's `config.tt2` file. Find +the `search.links_from_880` hash, and add a list of subfields you either wish to +include or exclude from the display for the given field. + commit 9c5c63f75c0671f5b68c2d35aede0e7d3937bece Author: Terran McCanna <tmccanna@georgialibraries.org> Date: Fri Apr 18 17:01:37 2025 -0400 LP2107209 OPAC fix for broken author links when extra MARC 100 subfields exist Newer cataloging standards make use of additional subfields that were not excluded in the code, and this ended up creating search query links that produced no results. To test: - Edit a MARC record to add a subfield $1 with a link in it to a 100 field. - Search for the title in the public OPAC. - On the search results page, note that the author displays the extraneous content. The generated link also includes the extraneous content. Clicking on it produces no search results. This problem can also be created with subfields $t, $c, $f, $g, and perhaps others. The error can also be demonstrated on the My Account pages under Lists and Holds. Apply the patch, then test again. The patch also includes functionality to control the included or excluded subfields on a per-field basis for fields 100, 110, 111, 245, 260, 264, 250, and 505 - although, not all of these fields are actually being used to created search query links within the OPAC at this time. Release-note: Fixes broken author links when additional subfields exist in the MARC record. Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org> Signed-off-by: Jane Sandberg <js7389@princeton.edu> diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/config-fresh.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/config-fresh.tt2 index 73206bd0e5..1d054108dd 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/config-fresh.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/config-fresh.tt2 @@ -159,10 +159,12 @@ search.adv_config = [ # Set up custom include/exclude subfield lists for various different 880-linked # datafields. # +# Example exclusion: '245' => { exclude => 'fghks678' } search.links_from_880 = { - 100 => { include => 'ac' }, - 245 => { exclude => 'fghk016789' } + '100' => { include => 'ad' }, + '110' => { include => 'ad' }, + '111' => { include => 'acd' } }; ############################################################################## diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/config.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/config.tt2 index ab3278a7d9..a2f6a48461 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/config.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/config.tt2 @@ -148,6 +148,18 @@ search.adv_config = [ # Set the default height of the select boxes. Defaults to 4. #search.default_adv_select_height = 4; +############################################################################## +# Set up custom include/exclude subfield lists for various different 880-linked +# datafields. +# +# Example exclusion: '245' => { exclude => 'fghks678' } + +search.links_from_880 = { + '100' => { include => 'ad' }, + '110' => { include => 'ad' }, + '111' => { include => 'acd' } +}; + ############################################################################## # For each search box the default "query type" value can be specified here # This is the actual backend value, not the label diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/misc_util.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/misc_util.tt2 index 81ddb96283..f1a785b67d 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/misc_util.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/misc_util.tt2 @@ -4,15 +4,16 @@ # See "Model A" in http://www.loc.gov/marc/bibliographic/ecbdmulti.html # and $6 description in http://www.loc.gov/marc/bibliographic/ecbdcntf.html MACRO get_graphic_880s BLOCK; + # Define subfields to include or exclude in config.tt2 - search.links_from_880 include_sf = search.links_from_880.$target_field.include; exclude_sf = search.links_from_880.$target_field.exclude || 'ew01456789'; test_sf = ''; IF include_sf.length == 0; # we must use an exclusion list, even if it's the default one - test_sf = 'not(contains(' _ exclude_sf _ ', @code))'; - ELSE - test_sf = 'contains(' _ include_sf _ ', @code)'; + test_sf = 'not(contains("' _ exclude_sf _ '", @code))'; + ELSE; + test_sf = 'contains("' _ include_sf _ '", @code)'; END; FOR node IN xml.findnodes('//*[@tag="' _ target_field _ '"]'); commit c55bc22f3b3ee066f5f0822bd3e9e880f09cf655 Author: Mike Rylander <mrylander@gmail.com> Date: Thu Apr 17 14:35:37 2025 -0400 Example configurable include/exclude list for 880-linked field search link building Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org> Signed-off-by: Jane Sandberg <js7389@princeton.edu> diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/config-fresh.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/config-fresh.tt2 index 3acc9f22c1..73206bd0e5 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/config-fresh.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/config-fresh.tt2 @@ -155,6 +155,16 @@ search.adv_config = [ # Set the default height of the select boxes. Defaults to 4. #search.default_adv_select_height = 4; +############################################################################## +# Set up custom include/exclude subfield lists for various different 880-linked +# datafields. +# + +search.links_from_880 = { + 100 => { include => 'ac' }, + 245 => { exclude => 'fghk016789' } +}; + ############################################################################## # For each search box the default "query type" value can be specified here # This is the actual backend value, not the label diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/misc_util.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/misc_util.tt2 index 890b9b67cb..81ddb96283 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/misc_util.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/misc_util.tt2 @@ -4,10 +4,21 @@ # See "Model A" in http://www.loc.gov/marc/bibliographic/ecbdmulti.html # and $6 description in http://www.loc.gov/marc/bibliographic/ecbdcntf.html MACRO get_graphic_880s BLOCK; + include_sf = search.links_from_880.$target_field.include; + exclude_sf = search.links_from_880.$target_field.exclude || 'ew01456789'; + test_sf = ''; + + IF include_sf.length == 0; + # we must use an exclusion list, even if it's the default one + test_sf = 'not(contains(' _ exclude_sf _ ', @code))'; + ELSE + test_sf = 'contains(' _ include_sf _ ', @code)'; + END; + FOR node IN xml.findnodes('//*[@tag="' _ target_field _ '"]'); raw_vals = []; core_val = ''; - FOR subnode IN node.findnodes('./*[not(contains("e w 0 4 5 6 7 8 9", @code))]'); + FOR subnode IN node.findnodes('./*[' _ test_sf _ ']'); raw_vals.push(subnode.textContent()); END; core_val = raw_vals.join(" "); ----------------------------------------------------------------------- Summary of changes: .../src/templates-bootstrap/opac/parts/config-fresh.tt2 | 12 ++++++++++++ Open-ILS/src/templates-bootstrap/opac/parts/config.tt2 | 12 ++++++++++++ Open-ILS/src/templates-bootstrap/opac/parts/misc_util.tt2 | 14 +++++++++++++- .../admin_initial_setup/pages/designing_your_catalog.adoc | 7 +++++++ 4 files changed, 44 insertions(+), 1 deletion(-) hooks/post-receive -- Evergreen ILS
participants (1)
-
Git User