END;
args.upc = args.upcs.0; # use first UPC as the default
args.issn = xml.findnodes('//*[@tag="022"]/*[@code="a"]').textContent;
- args.title = xml.findnodes('//*[@tag="245"]/*[@code="a"]').textContent;
- args.title_extended = xml.findnodes('//*[@tag="245"]').textContent;
args.author = xml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
+
+ # Avoid ugly trailing syntax on brief titles
+ args.title = xml.findnodes('//*[@tag="245"]/*[@code="a"]').textContent;
+ args.title = args.title | replace('[:;/]$', '');
+
+ # Provide correct spacing between the subfields
+ titsubs = xml.findnodes('//*[@tag="245"]/*[@code]');
+ titsubs_content = [];
+ FOR sub IN titsubs; titsubs_content.push(sub.textContent); END;
+ args.title_extended = titsubs_content.join(" ");
+
args.publisher = xml.findnodes('//*[@tag="260"]/*[@code="b"]').textContent;
args.pubdate = xml.findnodes('//*[@tag="260"]/*[@code="c"]').textContent;
args.summary = xml.findnodes('//*[@tag="520"]/*[@code="a"]').textContent;
IF ctx.result_stop > ctx.hit_count; ctx.result_stop = ctx.hit_count; END;
result_count = ctx.result_start;
+
%]
[% PROCESS "opac/parts/result/paginate.tt2" %]
<tbody id="result_table">
[% FOR rec IN ctx.records;
attrs = {marc_xml => rec.marc_xml};
- PROCESS get_marc_attrs args=attrs %]
+ PROCESS get_marc_attrs args=attrs;
+ IF CGI.param('detail_record_view');
+ attrs.title = attrs.title_extended;
+ END;
+ -%]
<tr class="result_table_row">
<td class="results_row_count" name="results_row_count">[%
result_count; result_count = result_count + 1