[open-ils-commits] r714 - conifer/trunk/web/opac/skin/lul/xml/rdetail (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Nov 11 23:41:12 EST 2009
Author: dbs
Date: 2009-11-11 23:41:09 -0500 (Wed, 11 Nov 2009)
New Revision: 714
Added:
conifer/trunk/web/opac/skin/lul/xml/rdetail/rdetail_summary.xml
Log:
Add Laurentian's open-ils.resolver-based live resolution of SFX holdings
Added: conifer/trunk/web/opac/skin/lul/xml/rdetail/rdetail_summary.xml
===================================================================
--- conifer/trunk/web/opac/skin/lul/xml/rdetail/rdetail_summary.xml (rev 0)
+++ conifer/trunk/web/opac/skin/lul/xml/rdetail/rdetail_summary.xml 2009-11-12 04:41:09 UTC (rev 714)
@@ -0,0 +1,316 @@
+
+<abbr name="unapi" class="unapi-id" title='tag:<!--#echo var="HTTP_HOST"-->,<!--#echo var="OILS_TIME_YEAR"-->:biblio-record_entry/<!--#echo var="OILS_OPAC_RID"-->'></abbr>
+<!-- This holds the record summary information -->
+<div>
+ <!-- Hack to give IE somewhere to put these things; should just rip out from rdetail.js -->
+ <span class='hide_me' id='rdetail_title'></span>
+ <span class='hide_me' id='rdetail_isbn'></span>
+ <span class='hide_me' id='rdetail_publisher'></span>
+ <span class='hide_me' id='rdetail_abstract'></span>
+ <table id='rdetail_details_table'>
+ <tbody id='rdetail_details_tbody'>
+
+ <tr>
+ <td id='rdetail_image_cell' rowspan='30'>
+ <a id='rdetail_img_link'>
+ <img style='border: none;' id='rdetail_image'
+ onerror='
+ hideMe($("rdetail.jacket_attrib_div"));
+ hideMe($("rdetail_img_link"));'/>
+ </a>
+ <!-- vendor attribution link -->
+ <div class='jacket_attrib hide_me' id='rdetail.jacket_attrib_div'>
+ <div>&opac.image_provided;</div>
+ <div><a target='_blank' href='&vendor.base_link;'
+ class='classic_link' id='rdetail.jacket_attrib_link'>&vendor.name;</a></div>
+ </div>
+ </td>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.title;</td>
+ <td type='opac/slot-data' query='datafield[tag=245]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ var rdetail_bib_title = dojox.data.dom.textContent(item);
+ var title_node = dojo.query('head title');
+ dojo.addOnLoad(function() {dojo.place('<title>' + rdetail_bib_title + '</title>', title_node[0], 'replace');});
+ return '<span>' + rdetail_bib_title + '</span><br/>';
+ ]]></script>
+ </td>
+ </tr>
+
+ <tr class='hide_me' id='tag246'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.alternate.title;</td>
+ <td type='opac/slot-data' query='datafield[tag=246] subfield[code=a]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ unHideMe($('tag246'));
+ return '<span>' + dojox.data.dom.textContent(item) + '</span><br/>';
+ ]]></script>
+ </td>
+ </tr>
+ <tr class='hide_me'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.author;</td>
+ <td class='rdetail_item'>
+ <a title='&rdetail.author.search;' id='rdetail_author'> </a>
+ </td>
+ </tr>
+ <tr class='hide_me' id='tag100'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.author;</td>
+ <td type='opac/slot-data' query='datafield[tag=100]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ unHideMe($('tag100'));
+ return '<span>' + dojox.data.dom.textContent(item) + '</span><br/>';
+ ]]></script>
+ </td>
+ </tr>
+ <tr class='hide_me' id='tag110'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.corporate.author;</td>
+ <td type='opac/slot-data' query='datafield[tag=110]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ unHideMe($('tag110'));
+ return '<span>' + dojox.data.dom.textContent(item) + '</span><br/>';
+ ]]></script>
+ </td>
+ </tr>
+ <tr class='hide_me' id='tag111'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.meeting.name;</td>
+ <td type='opac/slot-data' query='datafield[tag=111]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ unHideMe($('tag111'));
+ return '<span>' + dojox.data.dom.textContent(item) + '</span><br/>';
+ ]]></script>
+ </td>
+ </tr>
+ <tr class='hide_me' id='tag020'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.isbn;</td>
+ <td type='opac/slot-data' query='datafield[tag=020]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ unHideMe($('tag020'));
+ return '<span>' + dojox.data.dom.textContent(item) + '</span><br/>';
+ ]]></script>
+ </td>
+
+ </tr>
+ <tr class='hide_me' id='tag022'>
+ <td nowrap='nowrap' class='rdetail_desc' id='issn_title'>&common.issn;</td>
+ <td type='opac/slot-data' query='datafield[tag=022]' class='rdetail_item' id='rdetail_issn'>
+ <script type='opac/slot-format'><![CDATA[
+ unHideMe($('tag022'));
+ var issn_raw = dojo.trim(dojox.data.dom.textContent(item));
+ var issn = issn_raw.replace(/^.*?(\d{4}).(\d{3}(\d|x)).*?$/i, "$1-$2");
+ var ses = new OpenSRF.ClientSession('open-ils.resolver');
+ var req = ses.request('open-ils.resolver.resolve_holdings.raw', 'issn', issn);
+ req.oncomplete = function(r) {
+ var msg;
+ dojo.forEach(r.recv().content(), function(entry) {
+ if (first_issn) {
+ dojo.query('#rdetail_online *').orphan();
+ first_issn = false;
+ }
+ dojo.place('<div style="width: 100%">'
+ + ' <a class="classic_link" href="' + entry.target_url
+ + '">' + entry.public_name + '</a> - '
+ + entry.target_coverage
+ + (entry.target_embargo ? (' / ' + entry.target_embargo) : '')
+ + '</div>', 'rdetail_online');
+ });
+ }
+ req.send();
+
+ return '<span>' + issn + '</span><br/>';
+ ]]></script>
+ </td>
+
+ </tr>
+
+ <tr>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.edition;</td>
+ <td class='rdetail_item' id='rdetail_edition'> </td>
+ </tr>
+
+ <tr class='hide_me'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.pubdate;</td>
+ <td class='rdetail_item' id='rdetail_pubdate'> </td>
+ </tr>
+
+ <tr class='hide_me' id='tag260'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.publisher;</td>
+ <td type='opac/slot-data' query='datafield[tag=260]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ unHideMe($('tag260'));
+ return '<span>' + dojox.data.dom.textContent(item) + '</span><br/>';
+ ]]></script>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.physical;</td>
+ <td class='rdetail_item' id='rdetail_physical_desc'> </td>
+ </tr>
+
+ <tr>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.format;</td>
+ <td class='rdetail_item'>
+ <img id='rdetail_tor_pic' class='tor_pic' />
+ <span id='rdetail_tor' style='padding-left: 5px;'> </span>
+ </td>
+ </tr>
+
+ <tr class='hide_me' id='tag520'>
+ <td nowrap='nowrap' class='rdetail_desc'>&rdetail.detailMain.abstract;</td>
+ <td type='opac/slot-data' query='datafield[tag=520]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ unHideMe($('tag520'));
+ return '<span>' + dojox.data.dom.textContent(item) + '</span><br/>';
+ ]]></script>
+ </td>
+
+ </tr>
+
+ <!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
+ *** summary screen with complex information, such as new search links on subjects. -->
+ <tr class='hide_me' id='tag65_'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.subjects;</td>
+ <td type='opac/slot-data' query='datafield[tag^=65]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ unHideMe($('tag65_'));
+ var cgi = new CGI();
+ var other_params = [ 'd', 'l', 'r', 'av', 's', 'sd' ];
+ var total = '';
+ var output = [];
+ var list = dojo.query( 'subfield', item );
+ for (var i =0; i < list.length; i++) {
+ total += dojox.data.dom.textContent(list[i]) + ' ';
+ var current = '<a href="rresult.xml?rt=subject&tp=subject&t=' + total;
+ for (var p in other_params) {
+ if (cgi.param(other_params[p]))
+ current += '&' + other_params[p] + '=' + cgi.param(other_params[p]);
+ }
+ current += '">' + dojox.data.dom.textContent(list[i]) + '</a>'
+ output.push(current);
+ }
+ return '<span>' + output.join(' -- ') + '</span><br/>';
+ ]]></script>
+ </td>
+ </tr>
+ <tr class='hide_me' id='tag500'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.general.note;</td>
+ <td type='opac/slot-data' query='datafield[tag=500]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ unHideMe($('tag500'));
+ return '<span>' + dojox.data.dom.textContent(item) + '</span><br/>';
+ ]]></script>
+ </td>
+ </tr>
+ <tr class='hide_me' id='tag505'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.contents.note;</td>
+ <td type='opac/slot-data' query='datafield[tag=505]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ unHideMe($('tag505'));
+ return '<span>' + dojox.data.dom.textContent(item) + '</span><br/>';
+ ]]></script>
+ </td>
+ </tr>
+ <tr class='hide_me' id='tag506'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.usage.restrictions;</td>
+ <td type='opac/slot-data' query='datafield[tag=506] subfield[code=a]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ unHideMe($('tag506'));
+ return '<span>' + dojox.data.dom.textContent(item) + '</span> ';
+ ]]></script>
+ </td>
+ </tr>
+ <tr class='hide_me' id='tag511'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.performer.note;</td>
+ <td type='opac/slot-data' query='datafield[tag=511]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ unHideMe($('tag511'));
+ return '<span>' + dojox.data.dom.textContent(item) + '</span><br/>';
+ ]]></script>
+ </td>
+ </tr>
+ <tr class='hide_me' id='tag700'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.additional.authors;</td>
+ <td type='opac/slot-data' query='datafield[tag=700]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ unHideMe($('tag700'));
+ return '<span>' + dojox.data.dom.textContent(item) + '</span><br/>';
+ ]]></script>
+ </td>
+ </tr>
+ <tr class='hide_me' id='tag780'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.preceding.entry;</td>
+ <td type='opac/slot-data' query='datafield[tag=780]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ unHideMe($('tag780'));
+ return '<span>' + dojox.data.dom.textContent(item) + '</span><br/>';
+ ]]></script>
+ </td>
+ </tr>
+ <tr class='hide_me' id='tag785'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.succeeding.entry;</td>
+ <td type='opac/slot-data' query='datafield[tag=785]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ unHideMe($('tag785'));
+ return '<span>' + dojox.data.dom.textContent(item) + '</span><br/>';
+ ]]></script>
+ </td>
+ </tr>
+ <tr class='hide_me' id='rdetail_online_row'>
+ <!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
+ *** summary screen with complex information, such as location-specific URIs (856$9). -->
+ <td nowrap='nowrap' class='rdetail_desc'>&rdetail.summary.online;</td>
+ <td class='rdetail_item' id='rdetail_online' type='opac/slot-data' query='volumes > volume > uris > uri'>
+ <script type='opac/slot-format'><![CDATA[
+ dojo.query('*:not([type^=opac])', 'rdetail_online').orphan();
+ var uri = new Object;
+ uri.href = item.getAttribute('href');
+ uri.label = item.getAttribute('label');
+ uri.use = item.getAttribute('use_restriction');
+ if (uri.href == uri.label) {
+ if (uri.use && uri.use != uri.label) {
+ uri.label = uri.use;
+ uri.use = null;
+ }
+ }
+ var link = '<a class="classic_link" href="' + uri.href + '">' + uri.label + '</a>';
+ if (uri.use) {
+ link += ' (' + uri.use + ')';
+ }
+ return '<span>' + link + '</span><br/>';
+ ]]></script>
+ </td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <script language='javascript' type='text/javascript'><![CDATA[
+
+ config.ids.rdetail.details_body = 'rdetail_details_body';
+ config.ids.rdetail.title = 'rdetail_title';
+ config.ids.rdetail.author = 'rdetail_author';
+ config.ids.rdetail.isbn = 'rdetail_isbn';
+ config.ids.rdetail.edition = 'rdetail_edition';
+ config.ids.rdetail.pubdate = 'rdetail_pubdate';
+ config.ids.rdetail.publisher = 'rdetail_publisher';
+ config.ids.rdetail.tor = 'rdetail_tor';
+ config.ids.rdetail.abstr = 'rdetail_abstract';
+ config.ids.rdetail.image = 'rdetail_image';
+ config.ids.rdetail.tor_pic = 'rdetail_tor_pic';
+
+ /* Only clear the resources box once */
+ var first_issn = true;
+
+ dojo.addOnLoad( function () {
+ var here = findOrgUnit(getLocation());
+ if (getDepth() > 0 || getDepth === 0 ) {
+ while (getDepth() < findOrgDepth(here))
+ here = findOrgUnit( here.parent_ou() );
+ }
+
+ dojo.require('openils.BibTemplate');
+ new openils.BibTemplate({ record : new CGI().param('r'), org_unit : here.shortname() }).render();
+ });
+ ]]></script>
+
+</div> <!-- details_body -->
+
More information about the open-ils-commits
mailing list