2 series_tags = ['440', '490', '800', '810', '811', '830', '694'];
7 FOR tag IN series_tags;
8 FOR node IN ctx.marc_xml.findnodes('//*[@tag="' _ tag _ '"]');
11 FOR subfield IN node.childNodes;
12 NEXT UNLESS subfield.nodeName == "subfield";
13 code = subfield.getAttribute('code');
15 linked_fields = [subfield.textContent()];
16 target_field = node.getAttribute('tag');
19 NEXT UNLESS code.match('[a-z]');
20 # at this point, we actually have a partial term to use.
21 single_term = subfield.textContent | html;
22 all_terms.push(subfield.textContent.replace('[#"^$\+\-,\.:;&|\[\]()]', ''));
23 total_term = all_terms.join(" ").replace('\s+$', '');
25 url = mkurl(ctx.opac_root _ '/results',
26 { qtype=>'series', query=>total_term }, stop_parms
28 series = series _ '<a href="' _ url _ '">' _ single_term _ '</a> ';
30 FOREACH link880 IN graphics;
31 link = link880.value | html;
32 series = series _ '<div class="graphic880"' _ link880.dir _ '>' _ link _ '</div>';
40 <li class='rdetail_series_value'>[% entry %]</li>
45 [%- series_anchors = PROCESS render_series;
46 IF series_anchors.length > 0; %]
47 <h2 class='rdetail_related_series'>[% l('Search for related items by series') %]</h2>