Added support for series display in ttopac record details
authorBill Erickson <berick@esilibrary.com>
Wed, 10 Aug 2011 19:01:58 +0000 (15:01 -0400)
committerBill Erickson <berick@esilibrary.com>
Wed, 10 Aug 2011 19:01:58 +0000 (15:01 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/web/templates/default/opac/parts/record/extras.tt2
Open-ILS/web/templates/default/opac/parts/record/series.tt2 [new file with mode: 0644]

index 95333a1..b4ea965 100644 (file)
@@ -18,7 +18,7 @@
             {name => 'summaryplus',  label => l('Summaries &amp; More'), hide => hide_summary}, 
             {name => 'content',  label => l('Contents'), hide => 1}, # ToC
             {name => 'authors',  label => l('Authors')}, 
-            {name => 'series',   label => l('Series'), hide => 1}, 
+            {name => 'series',   label => l('Series')},
             {name => 'subjects', label => l('Subject')}, 
             {name => 'annotation', label => l('Annotation'), hide => 1}, 
             {name => 'awards',  label => l('Awards, Reviews, & Suggested Reads')}, 
diff --git a/Open-ILS/web/templates/default/opac/parts/record/series.tt2 b/Open-ILS/web/templates/default/opac/parts/record/series.tt2
new file mode 100644 (file)
index 0000000..cdfe588
--- /dev/null
@@ -0,0 +1,16 @@
+[% 
+    series_tags = ['440', '490', '800', '810', '811', '830', '694']; 
+    loc = CGI.param('loc');
+%]
+
+<div id='rdetail_series_div'>
+    <table cellpadding="0" cellspacing="0" border="0">
+    [%  FOR tag IN series_tags; %]
+        <tr><td style='padding-top:5px;'>
+        [%  FOR node IN ctx.marc_xml.findnodes('//*[@tag="' _ tag _ '"]/*') %]
+            [% IF !loop.first %]<span>&mdash;</span> [% END %]
+            <a href="[% ctx.opac_root %]/results?qtype=series&amp;query=[% node.textContent | uri %]&amp;loc=[% loc %]">[% node.textContent | html %]</a>
+        [% END %]
+    [% END; %]
+    </table>
+</div>