some changes for records with many items, slight reformat of subject display
authorartunit <artunit@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Sun, 26 Sep 2010 03:40:19 +0000 (03:40 +0000)
committerartunit <artunit@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Sun, 26 Sep 2010 03:40:19 +0000 (03:40 +0000)
git-svn-id: svn://svn.open-ils.org/ILS-Contrib/conifer/branches/rel_1_6_1@1007 6d9bc8c9-1ec2-4278-b937-99fde70a366f

12 files changed:
web/opac/skin/uwin/README [new file with mode: 0644]
web/opac/skin/uwin/css/layout.css
web/opac/skin/uwin/js/bibtemplate.js [new file with mode: 0644]
web/opac/skin/uwin/js/rdetail.js
web/opac/skin/uwin/js/result_common.js
web/opac/skin/uwin/js/sidebar_extras.js
web/opac/skin/uwin/xml/common/libselect.xml
web/opac/skin/uwin/xml/page_rresult.xml
web/opac/skin/uwin/xml/page_rsdetail.xml [new file with mode: 0644]
web/opac/skin/uwin/xml/rdetail/rdetail_subset_summary.xml [new file with mode: 0644]
web/opac/skin/uwin/xml/rdetail/rdetail_summary.xml
web/opac/skin/uwin/xml/setenv.xml

diff --git a/web/opac/skin/uwin/README b/web/opac/skin/uwin/README
new file mode 100644 (file)
index 0000000..6bdda91
--- /dev/null
@@ -0,0 +1,25 @@
+The University of Windsor has serial titles where hundreds
+and even thousands of items that have been added, typically microfilm
+that has been individually barcoded for interlibrary loan. This skin
+has a number of workarounds to accomodate the overhead associated
+with exposing extensive holdings in marcxml-format, we also add one page
+definition to "config.js", usually installed at:
+
+/openils/var/web/opac/common/js/config.js
+
+anchored by the comment (/* */) sections below:
+
+/* pages */
+var RSDETAIL            = "rsdetail";
+
+/* Set up the page names */
+config.page[RSDETAIL]           = "rsdetail.xml";
+
+Dan Scott (dbs) came up with a much more elegant solution to
+how it is handled in this layout this evening on IRC but
+I have taken the route that is least disruptive to the other
+skins for switching this version over to production in the
+short term (since the massive multi-item problem can slurp 
+up a lot of cpu processing capacity).
+
+art rhyno, u. of windsor - Sept. 25, 2010
index 99a39d2..3b7c854 100644 (file)
@@ -273,9 +273,18 @@ table { border-collapse: collapse; }
 */
 
 .search_link {
-   color: blue; 
+   color: #005596;
 }
 
 .search_link:visited {
-   color: purple; 
+   color: #005596; 
+}
+
+.search_link:hover {
+   color: red; 
+   text-decoration: none;
+}
+
+.libselect {
+   text-decoration: none;
 }
diff --git a/web/opac/skin/uwin/js/bibtemplate.js b/web/opac/skin/uwin/js/bibtemplate.js
new file mode 100644 (file)
index 0000000..819281d
--- /dev/null
@@ -0,0 +1,85 @@
+/* ---------------------------------------------------------------------------
+ * Copyright (C) 2009  Equinox Software, Inc.
+ * Mike Rylander <miker@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * ---------------------------------------------------------------------------
+ */
+
+if(!dojo._hasResource["bibtemplate"]) {
+
+    dojo.require('dojox.data.dom');
+    dojo._hasResource["bibtemplate"] = true;
+    dojo.provide("bibtemplate");
+    dojo.declare('bibtemplate', null, {
+
+        constructor : function(kwargs) {
+            this.root = kwargs.root;
+            this.record = kwargs.record;
+            this.org_unit = kwargs.org_unit || '-';
+        },
+
+        render : function() {
+            var all_slots = dojo.query('*[type^=opac/slot-data]', this.root);
+        
+            var slots = {};
+            dojo.forEach(all_slots, function(s){
+                var datatype = 'marcxml';
+        
+                if (s.getAttribute('type').indexOf('+') > -1) 
+                    datatype = s.getAttribute('type').split('+').reverse()[0];
+        
+                if (!slots[datatype]) slots[datatype] = [];
+                slots[datatype].push(s);
+            });
+        
+            for (var datatype in slots) {
+
+                (function (slot_list,dtype,rec,org) {
+
+                    dojo.xhrGet({
+                        url: '/opac/extras/unapi?id=tag:opac:biblio-record_entry/' + rec + '/' + org + '&format=' + datatype,
+                        handleAs: 'xml',
+                        load: function (bib) {
+
+                            dojo.forEach(slot_list, function (slot) {
+                                var joiner = slot.getAttribute('join') || ' ';
+
+                                var slot_handler = dojo.map(
+                                    dojo.query( '*[type=opac/slot-format]', slot ).orphan(),
+                                    function(x){ return dojox.data.dom.textContent(x) || x.innerHTML }
+                                ).join('');
+
+                                if (slot_handler) slot_handler = new Function('item', slot_handler);
+                                else slot_handler = new Function('item','return dojox.data.dom.textContent(item);');
+                
+                                var item_list = dojo.query(
+                                    slot.getAttribute('query'),
+                                    bib
+                                );
+
+                                if (item_list.length) slot.innerHTML = dojo.map(item_list, slot_handler).join(joiner);
+
+                                delete(slot_handler);
+
+                            });
+                       }
+                    });
+
+                })(slots[datatype],datatype,this.record,this.org_unit);
+            
+            }
+
+            return true;
+        }
+    });
+
+}
index 60f87ed..72b5214 100644 (file)
@@ -16,6 +16,9 @@ var rdetailEnableRefWorks = false;
 var rdetailRefWorksHost = 'http://refworks.scholarsportal.info';
 var enableHoldsOnAvailable = false;
 
+var urlCheck = true; //whether to use a url check to mask legacy urls
+var urlExpr = "/ezproxy|laws/i"; //regular expression
+
 /* threshold for paging */
 var rdetailBreakUpLargeSets = true; //flag for paging support
 var pgThreshold = 15; //the number of items to invoke paging
@@ -48,6 +51,7 @@ var rdetailNext = null;
 var rdetailStart = null;
 var rdetailEnd = null;
 
+       dojo.require("bibtemplate");
 /* serials are currently the only use of Dojo strings in the OPAC */
 if (rdetailDisplaySerialHoldings) {
        dojo.require("dijit.Menu");
@@ -374,7 +378,8 @@ function _rdetailDraw(r) {
        for( var i = 0; links && links.length > 0 && i < links.length; i = i + 3 ) {
                var href = links[i];
                // avoid matching "HTTP: The Complete Reference"
-               if( href.match(/https?:\/|ftps?:\/|mailto:/i) ) {
+               //if( href.match(/https?:\/|ftps?:\/|mailto:|http?:/i) && href.match(/ezproxy|law/i )) {
+               if( href.match(/https?:\/|ftps?:\/|mailto:|http?:/i) && urlCheck?href.match(urlExpr):true) {
                        unHideMe($('rdetail_online_row'));
                        // MODS can contain a display label (used for the text of the link)
                        // as well as a note about the URL; many legacy systems conflate the
index 3cc5a09..ecf7bc3 100644 (file)
@@ -8,7 +8,7 @@ var enableHoldsOnAvailable = false;
 var enableExtraSearchesLowHits = true;
 var localProxyPrefix = '';
 var suppressCopyCounts = true;
-var lookUpLimit = 25; //limit for invoking live status info
+var lookUpLimit = 100; //limit for invoking live status info
 
 function sortOutCopies(loc_id, rec_id, form_id) {
         var copies = 0;
@@ -17,7 +17,6 @@ function sortOutCopies(loc_id, rec_id, form_id) {
         if (recreq) {
                 var copy_info =  recreq.result();
                 for (var i in copy_info) {
-                        //alert(loc_id + ' - ' + i + ' - ' + copy_info[i].available);
                         if (loc_id == copy_info[i].org_unit)
                                 return copy_info[i].available;
                 }//for
@@ -521,11 +520,15 @@ function unhideGoogleBooksLink (data) {
 }
 
 /* riff on buildTitleDetailLink from opac_utils */
-function buildResultTitleDetailLink(rec, link) {
+function buildResultTitleDetailLink(rec, link, copyCnt) {
         if(!rec) return;
         link.appendChild(text(normalize(truncate(rec.title(), 500))));
         var args = {};
         args.page = RDETAIL;
+               
+       if (copyCnt > lookUpLimit)
+               args.page = RSDETAIL;
+
         args[PARAM_RID] = rec.doc_id();
     // in IE, if the link text contains a '@', it replaces the innerHTML text
     // with the value of the href attribute.  Wait, what?  Yes.  Capture the
@@ -611,9 +614,11 @@ function resultDisplayRecord(rec, pos, is_mr) {
                }
 
        } else {
-               buildunAPISpan($n(r,'unapi'), 'biblio-record_entry', rec.doc_id());
+                var onlyrec = rec.doc_id();
+               buildunAPISpan($n(r,'unapi'), 'biblio-record_entry', onlyrec);
+               var copyCnt = sortOutCopies(getLocation(), onlyrec, null);
 
-               buildResultTitleDetailLink(rec, title_link); 
+               buildResultTitleDetailLink(rec, title_link, copyCnt); 
                var args = {};
                args.page = RDETAIL;
                args[PARAM_OFFSET] = 0;
@@ -632,8 +637,6 @@ function resultDisplayRecord(rec, pos, is_mr) {
                */
                 // Stolen from trunk - (and stolen again from lul :-))
                 var here = findOrgUnit(getLocation());
-                var onlyrec = rec.doc_id();
-               var copyCnt = sortOutCopies(getLocation(), onlyrec, null);
 
                if (copyCnt <= lookUpLimit) {
                        dojo.require('openils.BibTemplate');
@@ -653,7 +656,7 @@ function resultDisplayRecord(rec, pos, is_mr) {
                        var callSpot = $n(r, "local_callnumber_list").parentNode;
                        var newTd = document.createElement( 'td' )
                        //to do: internationalize this
-                       newTd.appendChild(text("... " + copyCnt + " print items, please see full record for details."));
+                       newTd.appendChild(text("... " + copyCnt + " print items, please see full record for details on print and digital coverage."));
                        addCSSClass(newTd,"too_many_copies");
                        var newTr = document.createElement( 'tr' )
                        newTr.appendChild(newTd);
index 0b4bc8b..db82fd3 100644 (file)
@@ -106,6 +106,9 @@ function resultFireXRefBatch(treeName, xrefCache, stype) {
                var topic = xrefCache[i];
                query.push( [ topic.type, topic.term ] );
        }
+       //FLAG for UWIN before SVN - art
+       return;
+       //alert(FETCH_CROSSREF_BATCH + ' - ' + query);
        var req = new Request(FETCH_CROSSREF_BATCH, query);
        var tree;
        eval('tree=' + treeName);
index 0dcbeea..0f17dee 100644 (file)
@@ -4,7 +4,7 @@
                <!--#if expr="$SHOW_DEPTHSEL_TEXT='true'"-->
                <span>&library.select; </span>
                <!--#endif-->
-               <select id='depth_selector' >
+               <select id='depth_selector' class='libselect'>
                        <option value='new'>&library.select.label;</option>
                </select>
        </span>
index 05357b8..062717a 100644 (file)
@@ -4,6 +4,7 @@
        <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/result_common.js'></script>
        <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/tips.js'></script>
        <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/holds.js'></script>   
+       <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/bibtemplate.js'></script>   
        <!--#include virtual="result/result_common.xml"-->
 </div>
 
diff --git a/web/opac/skin/uwin/xml/page_rsdetail.xml b/web/opac/skin/uwin/xml/page_rsdetail.xml
new file mode 100644 (file)
index 0000000..94dd235
--- /dev/null
@@ -0,0 +1,88 @@
+<div id='canvas_main' class='canvas'>
+
+       <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/sidebar_extras.js'></script>
+       <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/result_common.js'></script>
+       <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/rresult.js'></script>
+       <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/rdetail.js'></script>
+       <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/holds.js'></script>
+       <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/cn_browse.js'></script>
+       <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/container.js'></script>
+       <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/bibtemplate.js'></script>
+
+       <script language='javascript' type='text/javascript'>
+               config.ids.rdetail = {};
+               config.ids.rdetail.view_marc = "rdetail_view_marc";
+       </script>
+
+       <table width='100%' id='np_table' class='hide_me' style='margin-top: 3px;'>
+               <tbody>
+                       <tr class='color_4' style='height: 1em;'>
+                               <td style='vertical-align: top;'>
+
+                                       <span>
+                                               &rdetail.result; <span id='np_offset'> </span>
+                                               <span> &common.of; </span>
+                                               <span id='np_count'> </span>
+                                       </span>
+       
+                                       <span style='padding-left: 40px;' >
+                                               <a class='np_nav_link classic_link hide_me' id='np_start'
+                                                       href='javascript:rdetailStart();' title="&rdetail.page.results;">&rdetail.start;</a>
+                                               <a class='np_nav_link classic_link hide_me' id='np_prev'
+                                                       href='javascript:rdetailPrev();' title='&rdetail.page.previous;'>&lt;&lt; &rdetail.page.previous;</a>
+                                               <span> </span>
+                                               <a  class='np_nav_link classic_link hide_me' id='np_next'
+                                                       href='javascript:rdetailNext();' title='&rdetail.page.next;'>&rdetail.page.next; &gt;&gt;</a>
+                                               <a class='np_nav_link classic_link hide_me' id='np_end'
+                                                       href='javascript:rdetailEnd();' title="&rdetail.page.last;">&rdetail.end;</a>
+                                       </span>
+       
+                               </td>
+                       </tr>
+               </tbody>
+       </table>
+
+       <table style='' class='rdetail_header color_1' width='100%'>
+               <tbody>
+
+                       <tr>
+                               <td width='33%' align='left'>
+                                       <span>&rdetail.detailMain.headerLabel;</span>
+                               </td>
+
+                               <td align='right' style='padding-right: 7px;' width='33%'>
+                                       <span id='rdetail_exp_refworks_span' class='hide_me' style='padding-right: 7px;'>
+                                               <a id='rdetail_exp_refworks'>&opac.holds.exportRefWorks;</a>
+                                       </span>
+                                       <span style='padding-right: 7px;'>
+                                               <a id='rdetail_place_hold' class='classic_link'>&opac.holds.placeHold;</a>
+                                       </span>
+                                       <span style='padding-right: 7px;' class='hide_me' id='rdetail_more_actions'>
+                                               <select id='rdetail_more_actions_selector' style='max-width: 11em;'>
+                                                       <option value='start'>&rdetail.more;</option>
+                                                       <option disabled='disabled'>--------------</option>
+                                                       <option disabled='disabled'>&rdetail.bookbag.add;</option>
+                                                       <option disabled='disabled'>--------------</option>
+                                                       <option value='new_bookbag' onclick='rdetailNewBookbag();'>&rdetail.bookbag.create;</option>
+                                               </select>
+                                       </span>
+
+                               </td>
+                       </tr>
+               </tbody>
+       </table>
+
+       <div style='font-weight: bold; padding: 5px; margin: 5px; width: 100%;' 
+               class='hide_me color_4' id='rdetail_deleted_exp'>
+               &rdetail.record.deleted;
+       </div>
+
+       <!--#include virtual="rdetail/rdetail_subset_summary.xml"-->
+       <!--#include virtual="rdetail/rdetail_extras.xml"-->
+
+       <div class='hide_me' id='rdetail_bb_none'>&rdetail.none;</div>
+       <div class='hide_me' id='rdetail_bb_item_success'>&rdetail.bookbag.add.success;</div>
+       <div class='hide_me' id='rdetail_bb_new'>&rdetail.bookbag.name;</div>
+       <div class='hide_me' id='rdetail_bb_success'>&rdetail.bookbag.create.success;</div>
+
+</div>
diff --git a/web/opac/skin/uwin/xml/rdetail/rdetail_subset_summary.xml b/web/opac/skin/uwin/xml/rdetail/rdetail_subset_summary.xml
new file mode 100644 (file)
index 0000000..b548efb
--- /dev/null
@@ -0,0 +1,471 @@
+
+<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>
+       <span class='hide_me' id='rdetail_edition'></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_ite' 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, 'http://sfx.scholarsportal.info/windsor');        
+                                       req.oncomplete = function(r) {
+                                               var msg;
+                                               dojo.forEach(r.recv().content(), function(entry) {
+                                                       var resolverInfo = entry.public_name + "_" + entry.target_coverage;
+                                                       //uwin has a lot of duplicates for some reason
+                                                       if (url_list.indexOf(resolverInfo) == -1) {
+                                                               if (first_issn) {
+                                                                       dojo.query('#rdetail_sfx *').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_sfx');
+                                                               dojo.query('#rdetail_sfx_row').removeClass('hide_me');
+                                                               url_list += resolverInfo;
+                                                       }//if url_list
+                                               });
+                                       }
+                                       req.send();
+
+                                       return '<span>' + issn + '</span><br/>';
+                                   ]]></script>
+                               </td>
+
+                       </tr>
+
+                       <tr class='hide_me' id='tag250'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.edition;</td>
+                               <td type='opac/slot-data' query='datafield[tag=250]' class='rdetail_item'>
+                                   <script type='opac/slot-format'><![CDATA[
+                                       dojo.query('#tag250').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.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');
+                               var text = '';
+                               var list = dojo.query( 'subfield:not([code=4])', item );
+                               for (var i =0; i < list.length; i++) {
+                                       text += dojox.data.dom.textContent(list[i]) + ' ';
+                               }
+                               return '<span>' + text + '</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 id='rdetail_sfx_row' class="hide_me">
+                               <td nowrap='nowrap' class='rdetail_desc'>
+                               <div class='sfx_image'>
+                                <img align='left' src='../local/images/sfxinfo.gif' alt=''/>
+                                </div>
+                               SFX E-Journals</td>
+                        <!-- *** 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 class='rdetail_item result_table_sfx_cell resolver_item' id='rdetail_sfx'>
+                        </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;
+        var url_list = "";
+
+        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:not([code=2])', item );
+           var main_subject = '';
+            for (var i =0; i < list.length; i++) {
+               var current = "";
+                total += dojox.data.dom.textContent(list[i]) + ' ';
+               if (i > 0)
+                       current +='>> ';
+                current += '<span><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]);
+                }
+               if (i > 0) {
+                       current += '">' + main_subject + dojox.data.dom.textContent(list[i]) + '</a>'
+               } else {
+                       current += '">' + dojox.data.dom.textContent(list[i]) + '</a>'
+               }
+                       
+               main_subject += dojox.data.dom.textContent(list[i]) + ' -- ';
+               current +=  '</span><br/>';
+                output.push(current);
+            }
+               
+           return output.join(' &nbsp;&nbsp;');
+        }
+
+        dojo.addOnLoad( function () {
+            var here = findOrgUnit(getLocation());
+            if (getDepth() > 0 || getDepth === 0 ) {
+                while (getDepth() < findOrgDepth(here))
+                    here = findOrgUnit( here.parent_ou() );
+            }
+
+            new bibtemplate({ record : new CGI().param('r'), org_unit : here.shortname() }).render();
+        });
+       ]]></script>
+
+</div> <!-- details_body -->
+
index 462f852..7d2de9e 100644 (file)
             var total = '';
             var output = [];
             var list = dojo.query( 'subfield:not([code=2])', item );
+           var main_subject = '';
             for (var i =0; i < list.length; i++) {
+               var current = "";
                 total += dojox.data.dom.textContent(list[i]) + ' ';
-                var current = '<a class="search_link" href="rresult.xml?rt=subject&tp=subject&t=' + total;
+               if (i > 0)
+                       current +='>> ';
+                current += '<span><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>'
+               if (i > 0) {
+                       current += '">' + main_subject + dojox.data.dom.textContent(list[i]) + '</a>'
+               } else {
+                       current += '">' + dojox.data.dom.textContent(list[i]) + '</a>'
+               }
+                       
+               main_subject += dojox.data.dom.textContent(list[i]) + ' -- ';
+               current +=  '</span><br/>';
                 output.push(current);
             }
-            return '<span>' + output.join(' &#x2d;&#x2d; ') + '</span><br/>';
+               
+           return output.join(' &nbsp;&nbsp;');
         }
 
         dojo.addOnLoad( function () {
index e64b270..9bccc9c 100644 (file)
@@ -16,6 +16,9 @@
 <!--#elif expr="$DOCUMENT_NAME='rdetail.xml'"-->
        <!--#set var='OILS_TITLE' value='opac.title.rdetail'-->
 
+<!--#elif expr="$DOCUMENT_NAME='rsdetail.xml'"-->
+       <!--#set var='OILS_TITLE' value='opac.title.rsdetail'-->
+
 <!--#elif expr="$DOCUMENT_NAME='myopac.xml'"-->
        <!--#set var='OILS_TITLE' value='opac.title.myopac'-->