]]></script>\r
</td>\r
</tr>\r
-\r
- <tr class='hide_me' id='rdetail_online_row'>\r
- <!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock\r
- *** summary screen with complex information, such as location-specific URIs (856$9). -->\r
- <td nowrap='nowrap' class='rdetail_desc'>&rdetail.summary.online;\r
- <span class='hide_me' type='opac/slot-data' query='datafield[tag=856] subfield[code=9]'>\r
- <script type='opac/slot-format'><![CDATA[\r
- // There exists at least one localized URI. Clear all links.\r
- dojo.query('*:not([type^=opac])', 'rdetail_online').orphan();\r
- return '';\r
- ]]></script>\r
- </span>\r
- </td>\r
- <td class='rdetail_item' id='rdetail_online' type='opac/slot-data' query='volumes > volume > uris > uri' join=", ">\r
- <script type='opac/slot-format'><![CDATA[\r
- var link = '<a href="' + item.getAttribute('href') + '" class="classic_link">' + item.getAttribute('label') + '</a>';\r
- if (item.getAttribute('use_restriction'))\r
- link += ' (' + item.getAttribute('use_restriction') + ') <br />';\r
- return link;\r
- ]]></script>\r
- </td>\r
- </tr>\r
-\r
- </tbody>\r
- </table>\r
+ <tr class='hide_me' id='rdetail_online_row'>\r
+ <!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock\r
+ *** summary screen with complex information, such as location-specific URIs (856$9). -->\r
+ <td nowrap='nowrap' class='rdetail_desc'>&rdetail.summary.online;</td>\r
+ <td class='rdetail_item' id='rdetail_online' type='opac/slot-data' query='volumes volume uris uri'>\r
+ <script type='opac/slot-format'><![CDATA[\r
+ dojo.query('*:not([type^=opac])', 'rdetail_online').orphan();\r
+ var uri = new Object;\r
+ uri.href = item.getAttribute('href');\r
+ uri.label = item.getAttribute('label');\r
+ uri.use = item.getAttribute('use_restriction');\r
+ if (uri.href == uri.label) {\r
+ if (uri.use && uri.use != uri.label) {\r
+ uri.label = uri.use;\r
+ uri.use = null;\r
+ }\r
+ }\r
+ var link = '<a class="search_link" href="' + uri.href + '">' + uri.label + '</a>';\r
+ if (uri.use) {\r
+ link += ' (' + uri.use + ')';\r
+ }\r
+ return '<span>' + link + '</span><br/>';\r
+ ]]></script>\r
+ </td>\r
+ </tr>\r
+ </tbody>\r
+ </table>\r
\r
<!-- Empty span used for creating unAPI links -->\r
<abbr name="unapi" class="unapi-id">\r