<div>
<h4>Related Subjects</h4>
</div>
- <div type='opac/slot-data' query='datafield[tag^="6"]' class='rdetail_item'>
+ <div type='opac/slot-data' query='datafield[tag^="6"]'>
<script type='opac/slot-format'><![CDATA[
var cgi = new CGI();
var other_params = [ 'd', 'l', 'r', 'av', 's', 'sd', 'ol' ];
- var total = '';
- var output = [];
+ var subj_display = '';
+ var subj_search = '';
+ var subj_line = '';
var list = dojo.query( 'subfield', item );
for (var i = 0; i < list.length; i++) {
var sub_code = list[i].getAttribute('code');
if ( sub_code.match(/[a-z]/i) ) {
- var current = '';
if ( sub_code.match(/[vxyz]/) ) {
- current += '-- ';
+ subj_display += '-- ';
}
- total += BT.textContent(list[i]) + ' ';
- current += '<a href="rresult.xml?rt=subject&tp=subject&t=' + total.replace(/\s+$/, '');
- for (var p in other_params) {
- if (cgi.param(other_params[p]))
- current += '&' + other_params[p] + '=' + cgi.param(other_params[p]);
- }
- current += '">' + BT.textContent(list[i]) + '</a>'
- output.push(current);
+ subj_display += BT.textContent(list[i]) + ' ';
+ subj_search += BT.textContent(list[i]) + ' ';
}
}
- unHideMe($('sidebarSubjects'));
- return '<span>' + output.join(' ') + '</span><br/>';
+ subj_line += '<li><a href="rresult.xml?rt=subject&tp=subject&t=' + subj_search.replace(/\s+$/, '');
+ for (var p in other_params) {
+ if (cgi.param(other_params[p]))
+ subj_line += '&' + other_params[p] + '=' + cgi.param(other_params[p]);
+ }
+ subj_line += '">' + subj_display + '</a></li>';
+ unHideMe(slot.parentNode);
+ return '<span>' + subj_line + '</span>';
]]></script>
</div>
</div>