2 /* XXX allow to pass in a 'local' var so the links back into the opac can be localized */
3 /* maybe also a 'skin' var */
7 var bb = cgi.param('bb');
8 if(!bb) { unHideMe($('not_found')); return; }
9 var req = new Request(FLESH_PUBLIC_CONTAINER, 'biblio', bb);
10 req.callback( bbShow );
18 var bb = r.getResultObject();
19 if(!bb || !bb.pub()) { unHideMe($('not_found')); return; }
20 $('bb_name').appendChild(text(bb.name()));
22 var tbody = $('tbody');
23 if(!template) template = tbody.removeChild($('row_template'));
25 for( var i in bb.items() )
26 tbody.appendChild(bbShowItem( template, bb.items()[i] ));
29 function bbShowItem( template, item ) {
30 var row = template.cloneNode(true);
32 var req = new Request( FETCH_RMODS, item.target_biblio_record_entry() );
33 req.request.tlink = $n(row, 'title');
34 req.request.alink = $n(row, 'author');
35 req.request.blink = $n(row, 'by');
37 req.callback( function(r) {
38 var rec = r.getResultObject();
39 buildTitleDetailLink(rec, r.tlink);
40 r.tlink.setAttribute('href', '/opac/en-US/skin/default/xml/rdetail.xml?r='+rec.doc_id());
41 r.alink.appendChild(text(rec.author()));