[open-ils-commits] r13041 - trunk/Open-ILS/web/opac/skin/default/xml/rdetail (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun May 3 07:48:34 EDT 2009
Author: miker
Date: 2009-05-03 07:48:33 -0400 (Sun, 03 May 2009)
New Revision: 13041
Modified:
trunk/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml
Log:
adding a simplistic example of URI rendering.
Modified: trunk/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml 2009-05-03 05:51:20 UTC (rev 13040)
+++ trunk/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml 2009-05-03 11:48:33 UTC (rev 13041)
@@ -103,7 +103,20 @@
<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>
@@ -114,7 +127,8 @@
<!-- 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';
@@ -128,10 +142,16 @@
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 -->
More information about the open-ils-commits
mailing list