[open-ils-commits] r741 - in conifer/trunk/web/opac/skin/hrsrh/xml: . rdetail (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Dec 4 16:46:12 EST 2009
Author: dbs
Date: 2009-12-04 16:46:06 -0500 (Fri, 04 Dec 2009)
New Revision: 741
Added:
conifer/trunk/web/opac/skin/hrsrh/xml/rdetail/
conifer/trunk/web/opac/skin/hrsrh/xml/rdetail/rdetail_summary.xml
Log:
Give HRSRH a more detailed summary
Added: conifer/trunk/web/opac/skin/hrsrh/xml/rdetail/rdetail_summary.xml
===================================================================
--- conifer/trunk/web/opac/skin/hrsrh/xml/rdetail/rdetail_summary.xml (rev 0)
+++ conifer/trunk/web/opac/skin/hrsrh/xml/rdetail/rdetail_summary.xml 2009-12-04 21:46:06 UTC (rev 741)
@@ -0,0 +1,431 @@
+
+<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='40'>
+ <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[
+ dojo.query('#tag246').removeClass('hide_me');
+ 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[
+ dojo.query('#tag100').removeClass('hide_me');
+ 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[
+ dojo.query('#tag110').removeClass('hide_me');
+ 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[
+ dojo.query('#tag111').removeClass('hide_me');
+ 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[
+ dojo.query('#tag020').removeClass('hide_me');
+ 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[
+ dojo.query('#tag022').removeClass('hide_me');
+ var issn_raw = dojo.trim(dojox.data.dom.textContent(item));
+
+ // textContent returns multiple subfields concatenated with linefeeds,
+ // so our regex needs to match against linefeeds. "." does not match
+ // linefeeds, so get \s into the mix
+ var issn = issn_raw.replace(/^(\s|.)*?(\d{4}).(\d{3,4}[xX]?)(\s|.)*/, "$2-$3");
+
+ 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="search_link" href="' + entry.target_url
+ + '">' + entry.public_name + '</a> - '
+ + entry.target_coverage
+ + (entry.target_embargo ? (' / ' + entry.target_embargo) : '')
+ + '</div>', 'rdetail_online');
+ dojo.query('#rdetail_online_row').removeClass('hide_me');
+ });
+ }
+ 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[
+ dojo.query('#tag260').removeClass('hide_me');
+ 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[
+ dojo.query('#tag520').removeClass('hide_me');
+ 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='tag600'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.subject.600;</td>
+ <td type='opac/slot-data' query='datafield[tag^=600]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ return subjectMe('#tag600', item);
+ ]]></script>
+ </td>
+ </tr>
+ <tr class='hide_me' id='tag610'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.subject.610;</td>
+ <td type='opac/slot-data' query='datafield[tag^=610]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ return subjectMe('#tag610', item);
+ ]]></script>
+ </td>
+ </tr>
+ <tr class='hide_me' id='tag611'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.subject.611;</td>
+ <td type='opac/slot-data' query='datafield[tag^=611]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ return subjectMe('#tag611', item);
+ ]]></script>
+ </td>
+ </tr>
+ <tr class='hide_me' id='tag630'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.subject.630;</td>
+ <td type='opac/slot-data' query='datafield[tag^=630]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ return subjectMe('#tag630', item);
+ ]]></script>
+ </td>
+ </tr>
+ <tr class='hide_me' id='tag648'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.subject.648;</td>
+ <td type='opac/slot-data' query='datafield[tag^=648]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ return subjectMe('#tag648', item);
+ ]]></script>
+ </td>
+ </tr>
+ <tr class='hide_me' id='tag650'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.subjects;</td>
+ <td type='opac/slot-data' query='datafield[tag^=650]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ return subjectMe('#tag650', item);
+ ]]></script>
+ </td>
+ </tr>
+ <tr class='hide_me' id='tag651'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.subject.651;</td>
+ <td type='opac/slot-data' query='datafield[tag^=651]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ return subjectMe('#tag651', item);
+ ]]></script>
+ </td>
+ </tr>
+ <tr class='hide_me' id='tag653'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.subject.653;</td>
+ <td type='opac/slot-data' query='datafield[tag^=653]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ return subjectMe('#tag653', item);
+ ]]></script>
+ </td>
+ </tr>
+ <tr class='hide_me' id='tag654'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.subject.654;</td>
+ <td type='opac/slot-data' query='datafield[tag^=654]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ return subjectMe('#tag654', item);
+ ]]></script>
+ </td>
+ </tr>
+ <tr class='hide_me' id='tag655'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.subject.655;</td>
+ <td type='opac/slot-data' query='datafield[tag^=655]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ return subjectMe('#tag655', item);
+ ]]></script>
+ </td>
+ </tr>
+ <tr class='hide_me' id='tag656'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.subject.656;</td>
+ <td type='opac/slot-data' query='datafield[tag^=656]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ return subjectMe('#tag656', item);
+ ]]></script>
+ </td>
+ </tr>
+ <tr class='hide_me' id='tag657'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.subject.657;</td>
+ <td type='opac/slot-data' query='datafield[tag^=657]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ return subjectMe('#tag657', item);
+ ]]></script>
+ </td>
+ </tr>
+ <tr class='hide_me' id='tag658'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.subject.658;</td>
+ <td type='opac/slot-data' query='datafield[tag^=658]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ return subjectMe('#tag658', item);
+ ]]></script>
+ </td>
+ </tr>
+ <tr class='hide_me' id='tag662'>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.subject.662;</td>
+ <td type='opac/slot-data' query='datafield[tag^=662]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ return subjectMe('#tag662', item);
+ ]]></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[
+ dojo.query('#tag500').removeClass('hide_me');
+ 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[
+ dojo.query('#tag505').removeClass('hide_me');
+ 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[
+ dojo.query('#tag506').removeClass('hide_me');
+ 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[
+ dojo.query('#tag511').removeClass('hide_me');
+ 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[
+ dojo.query('#tag700').removeClass('hide_me');
+ 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[
+ dojo.query('#tag780').removeClass('hide_me');
+ 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[
+ dojo.query('#tag785').removeClass('hide_me');
+ 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="search_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;
+
+ function subjectMe(tag, item) {
+ dojo.query(tag).removeClass('hide_me');
+ 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 class="search_link" 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/>';
+ }
+
+ 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