From: Dan Scott Date: Fri, 6 Jun 2014 00:27:39 +0000 (-0400) Subject: LP#1303544 Trim junk from the ISBN in record summary X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d1cb0e79e74a2c49d297f1f177dd309090e91c14;p=evergreen%2Fpines.git LP#1303544 Trim junk from the ISBN in record summary When asserting that we are publishing an ISBN, move the "(pbk.)" and similar such matter outside of the schema.org element. See "The walking dead" in the sample dataset for an example. Signed-off-by: Dan Scott Signed-off-by: Ben Shum --- diff --git a/Open-ILS/src/templates/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/opac/parts/record/summary.tt2 index 4a58becf8e..fffd158158 100644 --- a/Open-ILS/src/templates/opac/parts/record/summary.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/summary.tt2 @@ -154,10 +154,17 @@ IF num_uris > 0;

[% l("Record details") %]

    - [%- IF attrs.isbns.0; FOR isbn IN attrs.isbns %] + [%- IF attrs.isbns.0; + FOR isbn IN attrs.isbns; + isbn_extra = ''; + IF (matches = isbn.match('^(.+?)(\s.+)$')); + isbn = matches.0; + isbn_extra = matches.1; + END; + %]
  • [% l('ISBN:'); %] - [% isbn | html %] + [% isbn | html %][% isbn_extra | html %]
  • [%- END %] [%- END %]