From b2b3d88b7335c542035fbdf11637fa2a31ea22bb 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=utf8 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 Signed-off-by: David Nind Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- .../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 e0fe960078..9b60144d9f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl @@ -1326,16 +1326,29 @@ Other editions: - - - a_t - + + + ti,phr:( + + + + ) + + AND au:( + + + + + + ) + + i - : + @@ -1343,7 +1356,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= @@ -1398,20 +1411,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 + @@ -1468,21 +1499,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 + @@ -1497,21 +1545,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 + @@ -1532,9 +1578,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 5e4a4d2cb4..64d224ed9c 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl @@ -1103,21 +1103,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 + @@ -1138,9 +1136,10 @@ - /cgi-bin/koha/opac-search.pl?q= - - + /cgi-bin/koha/opac-search.pl?q= + + a_t + @@ -1541,25 +1540,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 @@ -1613,21 +1625,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 + @@ -1684,21 +1713,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.5