format/mat-type start
authorsenator <lebbeous@esilibrary.com>
Thu, 27 Jan 2011 20:04:07 +0000 (15:04 -0500)
committersenator <lebbeous@esilibrary.com>
Thu, 27 Jan 2011 20:04:07 +0000 (15:04 -0500)
Open-ILS/web/templates/default/opac/marc_attrs.tt2
Open-ILS/web/templates/default/opac/myopac/holds.tt2

index 9cdad34..73f12c3 100644 (file)
@@ -10,6 +10,7 @@
         args.author = xml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
         args.publisher = xml.findnodes('//*[@tag="260"]/*[@code="b"]').textContent;
         args.pubdate = xml.findnodes('//*[@tag="260"]/*[@code="c"]').textContent;
+        args.mattype = xml.findnodes('//*[@tag="998"]/*[@code="d"]').textContent; # XXX this is KCLS-specific and will need to change
 
         # clean up the ISBN
         args.isbn_clean = args.isbn.replace('\ .*', '');
index 1151614..4d57ed6 100644 (file)
             <tr>
                 <td>[% attrs.title %]</td>
                 <td>[% attrs.author %]</td>
-                <td>[% hold.hold.hold.holdable_formats %]<!-- see _myOPACFleshHoldTitle(), search for "mods_formats" in skin/default/js/myopac.js; holdable_formats is wrong --></td>
+                <td>
+                    [% format_desc = ctx.find_citm(attrs.mattype).value; %]<!-- XXX in situations where we might show M-type holds, this won't be good enough -->
+                    <img alt="[% format_desc %]" title="[% format_desc %]"
+                        src="[% ctx.icon_by_mattype(attrs.mattype) %]" />
+                </td>
                 <td>[% ctx.find_aou(hold.hold.hold.pickup_lib).name %]</td>
                 <td>[% hold.hold.hold.status %]<!-- see myOShowHoldStatus() in skin/default/js/myopac.js --></td>
                 <td>[% IF hold.hold.hold.frozen == 't' %] No [% ELSE %] Yes [% END %]</td>