Enable unAPI support in TT OPAC
authorDan Scott <gitorious@coffeecode.net>
Sun, 1 May 2011 15:55:11 +0000 (11:55 -0400)
committerberick <berick@esilibrary.com>
Sun, 1 May 2011 16:24:40 +0000 (12:24 -0400)
We have enough information available from the context and date
plugin to construct valid unAPI IDs - so let's do it and take
one more XXX off the table. (This is good for Zotero support!)

Sadly, Zotero doesn't seem to recognize more than one unAPI
ID on the search results page; in theory it should give the
user the ability to add all of the search results at once,
but in practice it doesn't display anything.

At the same time, we can remove the duplicate unAPI placeholders
and remove unnecessary <span> elements.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: berick <berick@esilibrary.com>

Open-ILS/web/templates/default/opac/parts/record/summary.tt2
Open-ILS/web/templates/default/opac/parts/result/table.tt2

index 9d08781..21a083a 100644 (file)
@@ -1,5 +1,5 @@
 <!-- ****************** rdetail_summary.xml ***************************** -->
-<abbr class="unapi-id" title='tag:HTTP_HOST,OILS_TIME_YEAR:biblio-record_entry/OILS_OPAC_RID'></abbr><!-- XXX FIXME or remove -->
+<abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% ctx.bre_id %]'></abbr>
 <!-- This holds the record summary information -->
 
 <table width="100%" border="0" cellpadding="0" cellspacing="0" id="rdetail_details_table">
             </tr>
         </tbody>
     </table>
-    <!-- Empty span used for creating unAPI links -->
-    <abbr name="unapi" class="unapi-id"> <!-- unAPI URI goes here --> </abbr>
 </div> <!-- details_body -->
 
 <!-- ****************** end: rdetail_summary.xml ***************************** -->
index 3ce5ffa..6477ef6 100644 (file)
                                                 <img title="[% attrs.format_label %]" alt="[% attrs.format_label %]" src="[% attrs.format_icon %]" />
                                                 [% END %]
 
-                                                <!-- Empty span used for creating unAPI links -->
-                                                <span class="hide_me">
-                                                    <abbr style='padding-left: 8px;' name="unapi" class="unapi-id">
-                                                    <!-- unAPI URI goes here -->
-                                                    </abbr>
-                                                </span>
+                                                <!-- unAPI link -->
+                                                <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% rec.id %]'></abbr>
 
                                                 <!-- Empty span used for creating Google Book Search-->
                                                 <span name="googleBooksLink" class="hide_me">