Pull call number from XML holdings, not MARC record
authorDan Scott <dan@coffeecode.net>
Mon, 2 May 2011 02:06:50 +0000 (22:06 -0400)
committerDan Scott <dan@coffeecode.net>
Mon, 2 May 2011 02:06:50 +0000 (22:06 -0400)
KCLS uses call numbers in the MARC record, but most other sites
use the call numbers from asset.call_number. For now, just display
the first returned call number; eventually the display will probably
need to be adjusted to handle call number / shelving location / library
/ status like the current AjaxPAC does.

Also note that ##URI## call numbers should be filtered out but are
not yet.

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

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

index 3e6b175..0e7cd2c 100644 (file)
         # clean up the ISBN
         args.isbn_clean = args.isbn.replace('\ .*', '');
 
-        args.holdsing = [];
+        args.holdings = [];
         FOR holding IN xml.findnodes('//*[local-name()="volumes"]/*[local-name()="volume"]');
-            args.holdings.push({
-                # TODO
-            });
+            args.holdings.push(
+                holding.getAttribute('label')
+            );
         END;
 
         # Extract the copy count summary
index 3ce5ffa..8110fcf 100644 (file)
                                                     <table cellpadding="0" cellspacing="0" border="0"
                                                         class="results_info_table">
                                                         <tr name='bib_cn_list' class='result_table_title_cell'>
-                                                            <td colspan='2'>
-                                                                <strong>Call number:</strong>[% args.marc_cn %][%# XXX KCLS %]
+                                                            <td valign='top'>
+                                                                <strong>[% l('Call number:') %]</strong>
                                                             </td>
+                                                            <td>[% args.holdings.0 %]</td>
                                                         </tr>
                                                         <tr name="results_pub_tr" class="[% attrs.publisher ? '' : 'hide_me' %]">
                                                             <td valign="top">
-                                                                <strong>Publisher:</strong>
+                                                                <strong>[% l('Publisher:') %]</strong>
                                                             </td>
                                                             <td>[% attrs.publisher; %]</td>
                                                         </tr>
                                                         <tr name="results_isbn_tr" class="[% attrs.isbn ? '' : 'hide_me' %]">
                                                             <td valign="top">
-                                                                <strong>ISBN:</strong>
+                                                                <strong>[% l('ISBN:') %]</strong>
                                                             </td>
                                                             <td>[% attrs.isbn %]</td>
                                                         </tr>
                                                         <tr name="results_edition_tr" class="[% attrs.edition ? '' : 'hide_me' %]">
                                                             <td valign="top">
-                                                                <strong>Edition:</strong>
+                                                                <strong>[% l('Edition:') %]</strong>
                                                             </td>
                                                             <td>[% attrs.edition %]</td>
                                                         </tr>
                                                         <tr name="results_phys_desc_tr" class="[% attrs.phys_desc ? '' : 'hide_me' %]">
                                                             <td nowrap="nowrap" valign="top">
-                                                                <strong>Phys. Desc.:</strong>
+                                                                <strong>[% l('Phys. Desc.:') %]</strong>
                                                             </td>
                                                             <td>
                                                                 [% args.phys_desc %]
                                                 <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>
+                                                    <abbr class="unapi-id">&nbsp;</abbr>
                                                 </span>
 
                                                 <!-- Empty span used for creating Google Book Search-->