Do not use schema.org extensions
authorDan Scott <dscott@laurentian.ca>
Mon, 19 Aug 2013 14:43:36 +0000 (10:43 -0400)
committerDan Scott <dscott@laurentian.ca>
Mon, 19 Aug 2013 14:43:36 +0000 (10:43 -0400)
The "/" extension mechanism only works for schema.org, and only for
processors that really care about schema.org. So... don't use it.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/templates/opac/parts/misc_util.tt2
Open-ILS/src/templates/opac/parts/record/copy_counts.tt2
Open-ILS/src/templates/opac/parts/record/copy_table.tt2

index f5e8dd1..cdea2ad 100644 (file)
             IF node AND node.textContent;
                 type = node.textContent;
                 args.format_label = node.getAttribute('coded-value')
-                args.schema.itemtype = schema_typemap.$type;
+                args.schema.itemtype = schema_typemap.$type || 'CreativeWork';
                 args.format_icon = ctx.media_prefix _ '/images/format_icons/' _ icon_style _ '/' _ type _ '.png';
                 LAST;
             END;
index c5e89fb..fd97eab 100644 (file)
@@ -19,7 +19,7 @@
     %]
     <li property="offers" typeof="AggregateOffer">
         <meta property="offerCount" content="[% ou_avail %]">
-        <meta property="seller/library" content="[% ou_name | html %]">
+        <meta property="seller" content="[% ou_name | html %]">
     [% l('[quant,_1,copy,copies] at [_2].', ou_avail, ou_name) | html %]
     [%- this_depth = ctx.get_aou(ou_id).ou_type.depth;
         IF ou_avail > 0 && this_depth != ctx.copy_depth %]
index 491a5b3..d38c61e 100644 (file)
@@ -93,7 +93,7 @@ END; # FOREACH bib
             [%- IF serial_holdings %]<td header='copy_header_holding_label' class='rdetail-issue-issue'>
                 [%- copy_info.holding_label | html; -%]
             </td>
-            [%- ELSE %]<td header='copy_header_library' property="seller/library">
+            [%- ELSE %]<td header='copy_header_library' property="seller">
             [%-
                 org_name = ctx.get_aou(copy_info.circ_lib).name;
                 lib_url = ctx.get_org_setting(copy_info.circ_lib, 'lib.info_url');
@@ -102,20 +102,20 @@ END; # FOREACH bib
                 IF lib_url; '</a>'; END;
             -%]
             </td>[% END %]
-            <td header='copy_header_callnumber'><span property="sku/callNumber">[% callnum | html %]</span> [% IF ctx.get_org_setting(CGI.param('loc') OR ctx.aou_tree.id, 'sms.enable') == 1 %](<a href="[% mkurl(ctx.opac_root _ '/sms_cn', {copy_id => copy_info.id}) %]">Text</a>)[% END %]</td>
+            <td header='copy_header_callnumber'><span property="sku">[% callnum | html %]</span> [% IF ctx.get_org_setting(CGI.param('loc') OR ctx.aou_tree.id, 'sms.enable') == 1 %](<a href="[% mkurl(ctx.opac_root _ '/sms_cn', {copy_id => copy_info.id}) %]">Text</a>)[% END %]</td>
             [%- IF has_parts == 'true' %]
             <td header='copy_header_part'>[% copy_info.part_label | html %]</td>
             [%- END %]
-            <td header='copy_header_barcode' property="serialNumber/barcode">
+            <td header='copy_header_barcode' property="serialNumber">
                 [%- IF ctx.is_staff -%]
                     <a href="javascript:void(0)" onclick="xulG.new_tab(xulG.urls.XUL_COPY_STATUS, {}, {'from_item_details_new': true, 'barcodes': ['[%- copy_info.barcode | html | replace('\'', '\\\'') -%]']})">[% copy_info.barcode | html %]</a>
                 [%- ELSE -%][% copy_info.barcode | html %]
                 [%- END -%]
                 [%- IF attrs.gtin13;
-                    '<meta property="gtin13/isbn13" content="' _ attrs.gtin13 _ '" />';
+                    '<meta property="gtin13" content="' _ attrs.gtin13 _ '" />';
                 END; -%]
             </td>
-            <td header='copy_header_shelfloc' property="availableAtOrFrom/shelvingLocation">[% copy_info.copy_location | html %]</td>
+            <td header='copy_header_shelfloc' property="availableAtOrFrom">[% copy_info.copy_location | html %]</td>
             [%- IF ctx.is_staff %]
             <td header='copy_header_age_hold'>
                 [% copy_info.age_protect ?
@@ -212,7 +212,7 @@ END; # FOREACH bib
         attrs = {marc_xml => bib};
         PROCESS get_marc_attrs args=attrs %]
 [%- IF attrs.bibid != ctx.bre_id; %]
-    <li property="isRelatedTo/boundWith" typeof="Product">
+    <li property="isRelatedTo" typeof="Product">
         <a property="url" href="[% mkurl(ctx.opac_root _ '/record/' _ attrs.bibid) %]">
             <span class="bib_peer_title" property="name">[% attrs.title | html %]</span>
             / <span class="bib_peer_author">[% attrs.author | html %]</span>