[open-ils-commits] [GIT] Evergreen ILS branch rel_2_3 updated. 1290cc1aa8a8c4f5a535548cd56d917576ed5fd1

Evergreen Git git at git.evergreen-ils.org
Sat Jan 19 16:12:24 EST 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_3 has been updated
       via  1290cc1aa8a8c4f5a535548cd56d917576ed5fd1 (commit)
       via  f8e65c7070dd02bb71750f64e77297fabb80f141 (commit)
      from  bb2b1fc3b781f34d3074619108004bc62cae38cd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1290cc1aa8a8c4f5a535548cd56d917576ed5fd1
Author: Dan Scott <dscott at laurentian.ca>
Date:   Tue Jan 8 17:02:38 2013 -0500

    TPAC: Prevent numeric subfields in series display
    
    Series fields can theoretically contain linking subfields ($6, $8) and
    other numeric subfields that aren't meant to be displayed. So, do not
    display them.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/templates/opac/parts/record/series.tt2 b/Open-ILS/src/templates/opac/parts/record/series.tt2
index aa96243..6a604af 100644
--- a/Open-ILS/src/templates/opac/parts/record/series.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/series.tt2
@@ -6,16 +6,25 @@
 [% BLOCK render_series;
     results = [];
     FOR tag IN series_tags;
-        FOR node IN ctx.marc_xml.findnodes('//*[@tag="' _ tag _ '"]/*');
-            node_uri = node.textContent.replace('[#"^$\+\-,\.:;&|\[\]()]', '') | uri;
-            node_html = node.textContent | html;
-            IF !loop.first;
-                results.last = result.last _ '<span>&mdash;</span>';
+        FOR node IN ctx.marc_xml.findnodes('//*[@tag="' _ tag _ '"]');
+            series = '';
+            series_link = '';
+            FOR subfield IN node.childNodes;
+                NEXT UNLESS subfield.nodeName == "subfield";
+                code = subfield.getAttribute('code');
+                NEXT UNLESS code.match('[a-z]');
+                node_uri = subfield.textContent.replace('[#"^$\+\-,\.:;&|\[\]()]', '') | uri;
+                node_html = subfield.textContent | html;
+                IF !loop.first;
+                    series = series _ ' ';
+                END;
+                series_link = series_link _ ' ' _ node_uri;
+                series = series _ ('<a href="' _ ctx.opac_root 
+                    _ '/results?qtype=series&amp;query=' _ series_link _ '&amp;loc='
+                    _ loc _ '">' _ node_html _ '</a>'
+                );
             END;
-            results.push('<a href="' _ ctx.opac_root 
-                _ '/results?qtype=series&amp;query=' _ node_uri _ '&amp;loc='
-                _ loc _ '">' _ node_html _ '</a>'
-            );
+            results.push(series);
         END;
     END; 
     FOR entry IN results;

commit f8e65c7070dd02bb71750f64e77297fabb80f141
Author: Ben Shum <bshum at biblio.org>
Date:   Sun Dec 2 00:02:25 2012 -0500

    TPAC - hide subfield 6 and 8 from record title display
    
    Record display previously showed every subfield associated with tag 245
    to display the title in TPAC's record view.  Hide subfields 6 and 8
    because they only show linkage information that does not contribute to
    the actual title content.
    
    Signed-off-by: Ben Shum <bshum at biblio.org>
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/opac/parts/misc_util.tt2
index c188e97..f5a9cfb 100644
--- a/Open-ILS/src/templates/opac/parts/misc_util.tt2
+++ b/Open-ILS/src/templates/opac/parts/misc_util.tt2
@@ -42,7 +42,7 @@
         args.title = args.title | replace('[:;/]$', '');
 
         # Provide correct spacing between the subfields
-        titsubs = xml.findnodes('//*[@tag="245"]/*[@code]');
+        titsubs = xml.findnodes('//*[@tag="245"]/*[(@code) and (@code != "6") and (@code != "8")]');
         titsubs_content = [];
             FOR sub IN titsubs; titsubs_content.push(sub.textContent); END;
         args.title_extended = titsubs_content.join(" ");

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/templates/opac/parts/misc_util.tt2    |    2 +-
 .../src/templates/opac/parts/record/series.tt2     |   27 +++++++++++++------
 2 files changed, 19 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list