adding a simplistic example of URI rendering.
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 3 May 2009 11:48:33 +0000 (11:48 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 3 May 2009 11:48:33 +0000 (11:48 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@13041 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml

index 4e05c43..4232542 100644 (file)
 
                        <tr class='hide_me' id='rdetail_online_row'>
                                <td nowrap='nowrap' class='rdetail_desc'>&rdetail.summary.online;</td>
-                               <td class='rdetail_item' id='rdetail_online'> </td>
+                               <td class='rdetail_item' id='rdetail_online'></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' 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') + '">' + item.getAttribute('label') + '</a>';
+                        if (item.getAttribute('use_restriction')) link += ' (Use restriction: ' + item.getAttribute('use_restriction') + ')';
+                        return link;
+                    ]]></script>
+                </td>
+            -->
+
                        </tr>
 
                </tbody>
                <!-- unAPI URI goes here -->
        </abbr>
 
-       <script language='javascript' type='text/javascript'>
+       <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.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')}).render();
+            new openils.BibTemplate({ record : new CGI().param('r'), org_unit : here.shortname() }).render();
         });
-       </script>
+       ]]></script>
 
 </div> <!-- details_body -->