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 _ '"]');
12 FOR subfield IN node.childNodes;
13 NEXT UNLESS subfield.nodeName == "subfield";
14 code = subfield.getAttribute('code');
16 linked_fields = [subfield.textContent()];
17 target_field = node.getAttribute('tag');
20 NEXT UNLESS code.match('[a-z]');
21 # at this point, we actually have a partial term to use.
22 single_term = subfield.textContent | html;
23 all_terms.push(subfield.textContent.replace('[#"^$\+\-,\.:;&|\[\]()]', ' '));
24 total_term = all_terms.join(" ").replace('\s+$', '');
26 url = mkurl(ctx.opac_root _ '/results',
27 { qtype=>'series', query=>total_term }, stop_parms.merge(expert_search_parms, general_search_parms, browse_search_parms, facet_search_parms)
29 series = series _ '<a href="' _ url _ '">' _ single_term _ '</a> ';
31 FOREACH link880 IN graphics;
32 link = link880.value | html;
33 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>