dojo.require('openils.PermaCrud');
win.xulG = {
- "record" : {"marc" : rec.marc()},
- "save" : {
+ "record": {"marc": rec.marc()},
+ "save": {
"label": opac_strings.SAVE_MFHD_LABEL,
"func": function(xmlString) {
rec.marc(xmlString);
}
function _holdingsDrawMFHD(holdings, entryNum) {
- var here = findOrgUnit(getLocation());
- if (getDepth() > 0 || getDepth === 0 ) {
- while (getDepth() < findOrgDepth(here))
- here = findOrgUnit( here.parent_ou() );
+ var here = findOrgUnit(getLocation());
+ if (getDepth() > 0 || getDepth === 0 ) {
+ while (getDepth() < findOrgDepth(here))
+ here = findOrgUnit( here.parent_ou() );
if (!orgIsMine(findOrgUnit(here), findOrgUnit(holdings.owning_lib()))) {
return null;
}
- }
+ }
+
var hh = holdings.holdings();
var hch = holdings.current_holdings();
var hs = holdings.supplements();
var ho = holdings.online();
var hm = holdings.missing();
var hinc = holdings.incomplete();
+ var hloc = holdings.location() || 'MFHD';
if ( hh.length == 0 && hch.length == 0 && hs.length == 0 &&
hcs.length == 0 && hi.length == 0 && hci.length == 0 &&
- ho.length == 0 && hm.length == 0 && hinc.length == 0
+ ho.length == 0 && hm.length == 0 && hinc.length == 0 && !isXUL()
) {
return null;
}
dojo.place("<table style='width: 100%;'><caption id='mfhdHoldingsCaption' class='rdetail_header color_1'>" +
- dojo.string.substitute(opac_strings.HOLDINGS_TABLE_CAPTION, [holdings.location()]) +
+ dojo.string.substitute(opac_strings.HOLDINGS_TABLE_CAPTION, [hloc]) +
"</caption><tbody id='rdetail_holdings_tbody_" + entryNum +
"'></tbody></table>", "rdetail_details_table", "after"
);
if( rdetailShowLocal && getLocation() != globalOrgTree.id() ) {
var loc = findOrgUnit(getLocation());
if( node ) {
- if( !orgIsMine(node, loc) && !orgIsMine(loc, node) ) return;
+ if( !orgIsMine(node, loc) && !orgIsMine(loc,node) ) return;
} else {
for( var i = 0; i < globalOrgTree.children().length; i++ ) {
var org = findOrgUnit(globalOrgTree.children()[i]);
--- /dev/null
+
+<abbr 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>
+ <table id='rdetail_details_table'>
+ <tbody id='rdetail_details_tbody'>
+
+ <tr>
+ <td id='rdetail_image_cell' rowspan='20'>
+ <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>
+ <!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
+ *** summary screen with more and/or different information. In this case, the raw MARC 245. -->
+ <td type='opac/slot-data' query='datafield[tag=245]' class='rdetail_item' id='rdetail_title'> </td>
+ </tr>
+
+ <tr>
+ <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>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.isbn;</td>
+ <td class='rdetail_item' id='rdetail_isbn'> </td>
+ </tr>
+
+ <tr>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.edition;</td>
+ <td class='rdetail_item' id='rdetail_edition'> </td>
+ </tr>
+
+ <tr>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.pubdate;</td>
+ <td class='rdetail_item' id='rdetail_pubdate'> </td>
+ </tr>
+
+ <tr>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.publisher;</td>
+ <td type='opac/slot-data' query='datafield[tag=260]' class='rdetail_item' id='rdetail_publisher'> </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>
+ <td nowrap='nowrap' class='rdetail_desc'>&rdetail.detailMain.abstract;</td>
+ <td class='rdetail_item' id='rdetail_abstract'> </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>
+ <td nowrap='nowrap' class='rdetail_desc'>Subjects</td>
+ <td type='opac/slot-data' query='datafield[tag=650]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ 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&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='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;
+ <span class='hide_me' type='opac/slot-data' query='datafield[tag=856] subfield[code=9]'>
+ <script type='opac/slot-format'><![CDATA[
+ // There exists at least one localized URI. Clear all links.
+ dojo.query('*:not([type^=opac])', 'rdetail_online').orphan();
+ return '';
+ ]]></script>
+ </span>
+ </td>
+ <td class='rdetail_item' id='rdetail_online' type='opac/slot-data' query='volumes > volume > uris > uri' join=", ">
+ <script type='opac/slot-format'><![CDATA[
+ var link = '<a href="' + item.getAttribute('href') + '" class="classic_link">' + item.getAttribute('label') + '</a>';
+ if (item.getAttribute('use_restriction'))
+ link += ' (' + item.getAttribute('use_restriction') + ') <br />';
+ return link;
+ ]]></script>
+ </td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <!-- Empty span used for creating unAPI links -->
+ <abbr name="unapi" class="unapi-id">
+ <!-- unAPI URI goes here -->
+ </abbr>
+
+ <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';
+
+ 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 -->
+