From 9cd9041239f8cbef4dba45b42bcb166807058713 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 29 Oct 2014 15:16:57 -0300 Subject: [PATCH] [PASSED QA] 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 --- .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 25 ++++++++++++------ .../prog/en/xslt/NORMARCslim2intranetDetail.xsl | 25 ++++++++++++------ .../prog/en/xslt/UNIMARCslim2intranetDetail.xsl | 30 ++++++++++++---------- .../bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 26 +++++++++++-------- .../bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl | 25 ++++++++++++------ .../bootstrap/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 6711f9d..f96c0eb 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 150a29a..9db138c 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 61d8085..c845dff 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 fe8daac..86df091 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 7a8e5ce..01d56af 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 40eac3a..8cb8bf9 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: - - - - - - . - - - ; - - - + + + + + + . + + + ; + + + + -- 1.9.1