From: dbs Date: Mon, 13 Sep 2010 20:28:33 +0000 (+0000) Subject: Rework online resource display to not show results for records with ISSNs X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e4eb91501028ee616e17b6a4ea3474228ae39950;p=contrib%2FConifer.git Rework online resource display to not show results for records with ISSNs TODO: Pull ResolverResolver into the mix git-svn-id: svn://svn.open-ils.org/ILS-Contrib/conifer/branches/rel_1_6_1@991 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- diff --git a/web/opac/skin/lul/xml/result/result_table.xml b/web/opac/skin/lul/xml/result/result_table.xml index 59d4fbf994..2df62bd53c 100644 --- a/web/opac/skin/lul/xml/result/result_table.xml +++ b/web/opac/skin/lul/xml/result/result_table.xml @@ -70,84 +70,89 @@ &result.localCallNumbers; - + = max_items) { - return output.innerHTML; - } - dojo.query('copy', vol).forEach(function (cp) { - if (cp.getAttribute('deleted') == 't') { - return; + dojo.query('volumes', item).forEach(function(volume) { + var item_cnt = 0; + var max_items = 4; + + dojo.query('volume', volume).forEach(function(vol) { + if (item_cnt >= max_items) { + return output.innerHTML; } - var loc_id; - var vol_appended = false; - dojo.query('location', cp).forEach(function (location) { - loc_id = parseInt(location.getAttribute('ident')); - if (loc_id != 8 && loc_id != 20) { - if (!vol_appended) { - dojo.create('b', { "innerHTML": vol.getAttribute('label') }, output); - vol_appended = true; + dojo.query('copy', vol).forEach(function (cp) { + if (cp.getAttribute('deleted') == 't') { + return; + } + var loc_id; + var vol_appended = false; + dojo.query('location', cp).forEach(function (location) { + loc_id = parseInt(location.getAttribute('ident')); + if (loc_id != 8 && loc_id != 20) { + if (!vol_appended) { + dojo.create('b', { "innerHTML": vol.getAttribute('label') }, output); + vol_appended = true; + } + var pfx = dojo.doc.createTextNode(' - '); + output.appendChild(pfx); + dojo.create('b', { "innerHTML": dojox.xml.parser.textContent(location) }, output); } - var pfx = dojo.doc.createTextNode(' - '); + }); + if (loc_id == 8 || loc_id == 20) { + return; + } + dojo.query('status', cp).forEach(function (status) { + var pfx = dojo.doc.createTextNode(' ('); output.appendChild(pfx); - dojo.create('b', { "innerHTML": dojox.xml.parser.textContent(location) }, output); + dojo.create('b', { "innerHTML": dojox.xml.parser.textContent(status) }, output); + var sfx = dojo.doc.createTextNode(')'); + output.appendChild(sfx); + }); + dojo.create('br', null, output); + + item_cnt++; + if (item_cnt >= max_items) { + output.appendChild(dojo.doc.createTextNode('... more items in full record')); } }); - if (loc_id == 8 || loc_id == 20) { - return; - } - dojo.query('status', cp).forEach(function (status) { - var pfx = dojo.doc.createTextNode(' ('); - output.appendChild(pfx); - dojo.create('b', { "innerHTML": dojox.xml.parser.textContent(status) }, output); - var sfx = dojo.doc.createTextNode(')'); - output.appendChild(sfx); - }); - dojo.create('br', null, output); - - item_cnt++; - if (item_cnt >= max_items) { - output.appendChild(dojo.doc.createTextNode('... more items in full record')); - } }); }); - return output.innerHTML; + dojo.query('volumes volume uris uri', item).forEach(function(link) { + var found_issn = false; + dojo.query('datafield[tag="022"]', item).forEach(function () { + found_issn = true; + }); + if (found_issn) { + return; + } + var uri = new Object; + uri.href = link.getAttribute('href'); + uri.label = link.getAttribute('label'); + uri.use = link.getAttribute('use_restriction'); + if (uri.href == uri.label) { + if (uri.use && uri.use != uri.label) { + uri.label = uri.use; + uri.use = null; + } + } + var link = dojo.create('a', {"class":"search_link", "href": uri.href}); + var link_text = dojo.doc.createTextNode(uri.label); + link.appendChild(link_text); + output.appendChild(link); + + if (uri.use) { + var use_text = dojo.doc.createTextNode(' (' + uri.use + ')'); + output.appendChild(use_text); + } + dojo.create('br', null, output); + }); + if (output) { + return output.innerHTML; + } ]]> - - - - - @@ -255,11 +260,11 @@ style='padding-left: 40px;' > &rdetail.start;&rdetail.page.previous.symbol; &rdetail.page.previous; + id='prev_link2' title='&rdetail.page.previous;'>&rdetail.page.previous.symbol; &rdetail.page.next; &rdetail.page.next.symbol; + title='&rdetail.page.next;'>&rdetail.page.next.symbol;