From 5c4e141d5e358e8d04fe74e165e403fe57ebbade 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 --- .../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 e7bf6d1..d4ba67b 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 3271e5b..84aaabe 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 552385e..fff7925 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 a856823..9df73a3 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl @@ -427,16 +427,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 e9fd625..1bd016f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl @@ -326,14 +326,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 f7d1984..e46038d 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