From 3fb57f34ea5644683e18262186dbba09e51a6c92 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 29 Oct 2014 15:16:57 -0300 Subject: [PATCH] Bug 12829: properly skip invalid ISBN when rendering for normal record display Currently, 020$z (and 010$z fr UNIMARC) occurences are not shown, but the XSLT logic used introduces punctuation characters for those $z occurences. This patch adds a check for the existence of subfield a, and only loops on $a subfields. To test: - Create/have a record with 020$z (or 010$z on UNIMARC) but no 020$a (no 010$a on UNIMARC). - Open the detail page for the record (on both OPAC and staff). => FAIL: the ISBN label and ';' and '.' characters incorrectly shown. - Repeat mixing with 020$a occurences to notice the bug. - Apply the patch, reload => SUCCES: ISBN label shows only on the presence of a $a, and $z are skipped. no matter how many ISBN fields you add. - Sign off :-D Regards To+ http://bugs.koha-community.org/show_bug.cgi?id=12901 Signed-off-by: Nicole C. Engard Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../en/xslt/MARC21slim2intranetDetail.xsl | 25 +++++++++++----- .../en/xslt/NORMARCslim2intranetDetail.xsl | 25 +++++++++++----- .../en/xslt/UNIMARCslim2intranetDetail.xsl | 30 ++++++++++--------- .../en/xslt/MARC21slim2OPACDetail.xsl | 26 +++++++++------- .../en/xslt/NORMARCslim2OPACDetail.xsl | 25 +++++++++++----- .../en/xslt/UNIMARCslim2OPACDetail.xsl | 26 ++++++++-------- 6 files changed, 97 insertions(+), 60 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl index 6711f9ddb5..f96c0eb6d9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl @@ -390,14 +390,23 @@ - - ISBN: - - - - .; - - + + + ISBN: + + + + + + . + + + ; + + + + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl index 150a29afd8..9db138c07b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl @@ -306,14 +306,23 @@ - - ISBN: - - - - .; - - + + + ISBN: + + + + + + . + + + ; + + + + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl index 61d80854ce..c845dff87e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl @@ -142,21 +142,23 @@ + -
  • ISBN: - - - - - - . - - - ; - - - -
  • + ISBN: + + + + + + . + + + ; + + + + +
    diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl index fe8daacfd5..86df091d69 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl @@ -429,16 +429,22 @@
    - - ISBN: - - - - - .; - - - + + ISBN: + + + + + + . + + + ; + + + + + diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl index 7a8e5ce41e..01d56af148 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl @@ -342,14 +342,23 @@ - - ISBN: - - - - .; - - + + + ISBN: + + + + + + . + + + ; + + + + + diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl index 40eac3aabc..8cb8bf922b 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl @@ -190,20 +190,22 @@ + ISBN: - - - - - - . - - - ; - - - + + + + + + . + + + ; + + + + -- 2.39.5