From 4029f3e64f486fd43c1bf153940215a9c6b75e5a Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 26 May 2023 19:00:13 +0000 Subject: [PATCH] Bug 32695: Fix search strings for 775, 780, 785 and 787 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the past due to some misunderstanding of the MARC standard we built the search links for these fields using $a and $t with the title index. But we actually need to search $t as title and $a as author. This patch fixes the templates for the MARC 7xx fields: * 775 * 780 * 785 * 787 To test: * Ensure systme preference 'UseControlNumber' is set to don't * Create a record with the linking fields above * Look at the OPAC and staff interface detail views * Verify the content of your fields shows and the links combine a+t as a title search * Apply patch * Verify you have nicely formatted links now Example: 775 _ _ ‡asomeone‡ttitle775 780 0 2 ‡asomeone‡ttitle780 785 0 2 ‡asomeone‡ttitle785 787 _ _ ‡ilabel:‡ttitle787‡asomeone Signed-off-by: Sabrina Kiehl --- .../en/xslt/MARC21slim2intranetDetail.xsl | 109 ++++++++++++----- .../en/xslt/MARC21slim2OPACDetail.xsl | 115 ++++++++++++------ 2 files changed, 158 insertions(+), 66 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl index 48439f3a241..36b01059b06 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl @@ -1321,16 +1321,29 @@ Other editions: - - - a_t - + + + ti,phr:( + + + + ) + + AND au:( + + + + + + ) + + i - : + @@ -1338,7 +1351,7 @@ /cgi-bin/koha/catalogue/search.pl?q=Control-number: - /cgi-bin/koha/catalogue/search.pl?q=ti,phr: + /cgi-bin/koha/catalogue/search.pl?q= @@ -1393,20 +1406,38 @@ - - - a_t + + ti,phr:( + + + ) + + AND au:( + + + + + + ) + + - /cgi-bin/koha/catalogue/search.pl?q=Control-number: - + + /cgi-bin/koha/catalogue/search.pl?q=Control-number: + + a_t + - /cgi-bin/koha/catalogue/search.pl?q=ti,phr: - + + /cgi-bin/koha/catalogue/search.pl?q= + + a_t + @@ -1463,21 +1494,38 @@ - - - a_t + + ti,phr:( + + + ) + + AND au:( + + + + + + ) + - /cgi-bin/koha/catalogue/search.pl?q=Control-number: - + + /cgi-bin/koha/catalogue/search.pl?q=Control-number: + + a_t + - /cgi-bin/koha/catalogue/search.pl?q=ti,phr: - + + /cgi-bin/koha/catalogue/search.pl?q= + + a_t + @@ -1492,21 +1540,19 @@ Other related works: - - - a_t - - i - : + - /cgi-bin/koha/catalogue/search.pl?q=Control-number: - + + /cgi-bin/koha/catalogue/search.pl?q=Control-number: + + a_t + @@ -1527,9 +1573,10 @@ - /cgi-bin/koha/catalogue/search.pl?q= - - + /cgi-bin/koha/catalogue/search.pl?q= + + a_t + diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl index 3fe783b6152..515f9543456 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl @@ -1094,21 +1094,19 @@ Other related works: - - - a_t - - i - : + - /cgi-bin/koha/opac-search.pl?q=Control-number: - + + /cgi-bin/koha/opac-search.pl?q=Control-number: + + a_t + @@ -1129,9 +1127,10 @@ - /cgi-bin/koha/opac-search.pl?q= - - + /cgi-bin/koha/opac-search.pl?q= + + a_t + @@ -1532,25 +1531,38 @@ Other editions: - - - a_t - + + + ti,phr:( + + + + ) + + AND au:( + + + + + + ) + + i - : + - - /cgi-bin/koha/opac-search.pl?q=Control-number: - - - /cgi-bin/koha/opac-search.pl?q=ti,phr: - + + /cgi-bin/koha/opac-search.pl?q=Control-number: + + + /cgi-bin/koha/opac-search.pl?q= + a_t @@ -1604,21 +1616,38 @@ - - - a_t + + ti,phr:( + + + ) + + AND au:( + + + + + + ) + - /cgi-bin/koha/opac-search.pl?q=Control-number: - + + /cgi-bin/koha/opac-search.pl?q=Control-number: + + a_t + - /cgi-bin/koha/opac-search.pl?q=ti,phr: - + + /cgi-bin/koha/opac-search.pl?q= + + a_t + @@ -1675,21 +1704,37 @@ - - - a_t + + ti,phr:( + + + ) + + AND au:( + + + + + + ) + /cgi-bin/koha/opac-search.pl?q=Control-number: - + + a_t + - /cgi-bin/koha/opac-search.pl?q=ti,phr: - + + /cgi-bin/koha/opac-search.pl?q= + + a_t + -- 2.39.2