[open-ils-commits] [GIT] Evergreen ILS branch master updated. ad0da8c8fed4699e8a881d0e1e85cba1742e64bf

Evergreen Git git at git.evergreen-ils.org
Mon Aug 26 12:17:33 EDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  ad0da8c8fed4699e8a881d0e1e85cba1742e64bf (commit)
       via  21bc07079d265b90c5e0a780718810ac3b384b4d (commit)
       via  c3cfcf3c2943a3a9c5cf417d72cd6dbcb72809be (commit)
       via  1f55d0e4764e06d9b6170ef4977cd26a9431214c (commit)
       via  3732a7f7629a3ca5be60465b9daf4f641448efcc (commit)
      from  3613e273d1d0d399e35389a009affc7d31b83f79 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ad0da8c8fed4699e8a881d0e1e85cba1742e64bf
Author: Dan Scott <dscott at laurentian.ca>
Date:   Sun Aug 25 00:41:37 2013 -0400

    Schema.org authors: relate properties to the right context
    
    While the approach of using the existing <a href> to launch a new search
    based on the author name was workable, it may have been confusing for
    schema.org processors such as Google Rich Snippets who expected that URI
    to identify a resource for the author, not a set of search results.
    
    Using @resource / @about attribute pairing, and wrapping the whole type
    in an extra <span> element, enables us to avoid associating the
    properties within the <a href> with the implicitly chained type.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/templates/opac/parts/record/authors.tt2 b/Open-ILS/src/templates/opac/parts/record/authors.tt2
index 6d25b3c..a13843d 100644
--- a/Open-ILS/src/templates/opac/parts/record/authors.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/authors.tt2
@@ -2,6 +2,7 @@
 
 PROCESS "opac/parts/relators.tt2";
 
+author_cnt = 0;
 authors = [
     {
         type => 'author', 
@@ -24,9 +25,11 @@ authors = [
 
 BLOCK build_author_links;
     FOR node IN ctx.marc_xml.findnodes(xpath);
+        author_cnt = author_cnt + 1;
+        contrib_ref = '#schemacontrib' _ author_cnt;
+        iprop = '';
         term = '';
         qterm = '';
-        iprop = '';
         tlabel = '';
         birthdate = '';
         deathdate = '';
@@ -81,17 +84,17 @@ BLOCK build_author_links;
                 iprop = ' typeOf="Organization" property="contributor"';
             END;
         END;
-        '<a href="' _ url _ '"' _ iprop _ '>';
-        IF iprop; '<span property="name">'; END;
+        '<span' _ iprop _ ' resource="' _ contrib_ref _ '"><a href="' _ url _ '">';
+        IF iprop; '<span property="name" about="' _ contrib_ref _ '">'; END;
         term.replace('^\s+', '');
         IF iprop; '</span>'; END;
         IF birthdate;
-            ' <span property="birthDate">' _ birthdate _ '</span>-';
+            ' <span property="birthDate" about="' _ contrib_ref _ '">' _ birthdate _ '</span>-';
         END;
         IF deathdate;
-            '<span property="deathDate">' _ deathdate _ '</span>';
+            '<span property="deathDate" about="' _ contrib_ref _ '">' _ deathdate _ '</span>';
         END;
-        '</a>';
+        '</a>'; # End search link
         FOREACH link880 IN graphics;
             diratt = '';
             IF link880.dir;
@@ -101,7 +104,8 @@ BLOCK build_author_links;
             link880.value | html;
             '</span>';
         END;
-        ' (' _ author_type _ '). ';
+        ' (<span property="description" about="' _ contrib_ref _ '">' _ author_type _ '</span>). ';
+        '</span>'; # End author span
     END;
 END;
 %]

commit 21bc07079d265b90c5e0a780718810ac3b384b4d
Author: Dan Scott <dscott at laurentian.ca>
Date:   Thu Aug 22 18:30:34 2013 -0400

    Schema.org: relate offers to record explicitly
    
    Although schema.org defines the nested child elements as implicit
    relationships that should be good enough for the Offer-to-Product
    relationship, defining that relationship explicitly can't hurt.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/templates/opac/parts/record/body.tt2 b/Open-ILS/src/templates/opac/parts/record/body.tt2
index b8ba910..bdb5f41 100644
--- a/Open-ILS/src/templates/opac/parts/record/body.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/body.tt2
@@ -4,7 +4,7 @@
     stop_parms = ['expand','cnoffset','copy_offset','copy_limit'];
     ctx.record_attrs = attrs; # capture for JS
 %]
-<div id='canvas_main' class='canvas' vocab="http://schema.org/" typeof='[% args.schema.itemtype %] Product'>
+<div id='canvas_main' class='canvas' vocab="http://schema.org/" typeof='[% args.schema.itemtype %] Product' resource="#schemarecord">
     [%- INCLUDE "opac/parts/record/navigation.tt2" %]
     [%- IF ctx.bib_is_dead %]
     <div id='rdetail_deleted_exp'>
diff --git a/Open-ILS/src/templates/opac/parts/record/copy_counts.tt2 b/Open-ILS/src/templates/opac/parts/record/copy_counts.tt2
index fd97eab..9f86bc7 100644
--- a/Open-ILS/src/templates/opac/parts/record/copy_counts.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/copy_counts.tt2
@@ -18,6 +18,7 @@
             displayed_ous.$ou_name = 1;
     %]
     <li property="offers" typeof="AggregateOffer">
+        <link property="itemOffered" href="#schemarecord">
         <meta property="offerCount" content="[% ou_avail %]">
         <meta property="seller" content="[% ou_name | html %]">
     [% l('[quant,_1,copy,copies] at [_2].', ou_avail, ou_name) | html %]
@@ -38,6 +39,7 @@
     %]
     [%- IF attrs.plib_copy_counts.$depth.count > 0; %]
     <li class="preferred" property="offers" typeof="AggregateOffer">
+        <link property="itemOffered" href="#schemarecord">
         <meta property="offerCount" content="[% ou_avail %]">
         <meta property="seller" content="[% ou_name | html %]">
     [%-
diff --git a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2
index b275c9f..41268f3 100644
--- a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2
@@ -102,6 +102,7 @@ END; # FOREACH bib
                 IF lib_url; '</a>'; END;
             -%]
                 <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
+                <link property="itemOffered" href="#schemarecord">
             </td>[% END %]
             <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' %]

commit c3cfcf3c2943a3a9c5cf417d72cd6dbcb72809be
Author: Dan Scott <dscott at laurentian.ca>
Date:   Tue Aug 20 12:45:44 2013 -0400

    Map the bound-with relationship in schema.org
    
    We don't know what type the target record is, so fall back to Product
    and just point at it. At least this way schema.org processors will know
    that the target bib is related to the current bib.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2
index 57d1d41..b275c9f 100644
--- a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2
@@ -203,8 +203,14 @@ END; # FOREACH bib
     FOREACH bib IN copy_info.peer_bib_marc;
         attrs = {marc_xml => bib};
         PROCESS get_marc_attrs args=attrs %]
-[%- IF attrs.bibid != ctx.bre_id; %]
-    <li><a href="[% mkurl(ctx.opac_root _ '/record/' _ attrs.bibid) %]">[% attrs.title | html %] / [% attrs.author | html %]</a></li>
+[%- IF attrs.bibid != ctx.bre_id; -%]
+    <li property="isRelatedTo" typeof="Product">
+        [%- # Map the bound-with relationship -%]
+        <a href="[% mkurl(ctx.opac_root _ '/record/' _ attrs.bibid) %]" property="url">
+            <span class="bib_peer_title" property="name">[% attrs.title | html %]</span>
+            / <span class="bib_peer_author">[% attrs.author | html %]</span>
+        </a>
+    </li>
 [%- END; # IF attrs.bibid %]
 [%- END; # FOREACH bib in copy_info.peer_bib_marc
 '</ul>';

commit 1f55d0e4764e06d9b6170ef4977cd26a9431214c
Author: Dan Scott <dscott at laurentian.ca>
Date:   Sun Aug 25 00:40:46 2013 -0400

    Add structured data for holdings via http://schema.org/Offer
    
    Map library name to Offer/seller, shelving location to
    Offer/availableAtOrFrom, call number to Offer/sku, barcode to
    Offer/serialNumber, copy status to Offer/availability, and ISBN-13 to
    gtin13. Use the additionalType of Product to give these offers an
    obvious relationship.
    
    Surface copy counts as AggregateOffer instances.
    
    Cut over to RDFa Lite instead of microdata for schema.org, as RDFa Lite
    is more easily extensible with other vocabularies, and is as accepted as
    microdata by schema.org processors.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
index 00d7bf2..5a6d385 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
@@ -1961,6 +1961,7 @@ sub basic_opac_copy_query {
                 {column => 'holdable', alias => 'location_holdable'}
             ],
             ccs => [
+                {column => 'id', alias => 'status_code'},
                 {column => 'name', alias => 'copy_status'},
                 {column => 'holdable', alias => 'status_holdable'}
             ],
diff --git a/Open-ILS/src/templates/opac/parts/ac_google_books.tt2 b/Open-ILS/src/templates/opac/parts/ac_google_books.tt2
index 3dbb5f9..cbec24f 100644
--- a/Open-ILS/src/templates/opac/parts/ac_google_books.tt2
+++ b/Open-ILS/src/templates/opac/parts/ac_google_books.tt2
@@ -100,7 +100,7 @@ function GBShowHidePreview(from_button) {
 dojo.addOnLoad(function() {
   var spans = dojo.query('li.rdetail_isbns span.rdetail_value');
   for (var i = 0; i < spans.length; i++) {
-    var prop = spans[i].getAttribute('itemprop');
+    var prop = spans[i].getAttribute('property');
     if (!prop) {
       continue;
     }
diff --git a/Open-ILS/src/templates/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/opac/parts/misc_util.tt2
index 3f31205..363318d 100644
--- a/Open-ILS/src/templates/opac/parts/misc_util.tt2
+++ b/Open-ILS/src/templates/opac/parts/misc_util.tt2
@@ -91,6 +91,17 @@
         schema_typemap.e = 'http://schema.org/Map';
         schema_typemap.j = 'http://schema.org/MusicAlbum';
 
+        # Hard-coded to match defaults in config.copy_status for all OPAC-visible statuses
+        schema_copy_status = {};
+        schema_copy_status.0 = '<link property="availability" href="http://schema.org/InStock" />'; # Available
+        schema_copy_status.1 = '<link property="availability" href="http://schema.org/OutOfStock" />'; # Checked out
+        schema_copy_status.5 = '<link property="availability" href="http://schema.org/PreOrder" />'; # In process
+        schema_copy_status.6 = '<link property="availability" href="http://schema.org/PreOrder" />'; # In transit
+        schema_copy_status.7 = '<link property="availability" href="http://schema.org/InStock" />'; # Reshelving
+        schema_copy_status.8 = '<link property="availability" href="http://schema.org/OutOfStock" />'; # On holds shelf
+        schema_copy_status.9 = '<link property="availability" href="http://schema.org/PreOrder" />'; # On order
+        schema_copy_status.12 = '<link property="availability" href="http://schema.org/InStoreOnly" />'; # Reserves
+
         args.isbns = [];
         FOR isbn IN xml.findnodes('//*[@tag="020"]/*[@code="a"]');
             args.isbns.push(isbn.textContent);
@@ -228,6 +239,14 @@
 
         # clean up the ISBN
         args.isbn_clean = args.isbns.0.replace('\ .*', '');
+        FOR isbn IN args.isbns;
+            clean_isbn = isbn.replace('\ .*', '');
+            clean_isbn = clean_isbn.replace('-', '');
+            IF clean_isbn.length == 13;
+                args.gtin13 = clean_isbn;
+                LAST;
+            END;
+        END;
 
         # Extract the 856 URLs that are not otherwise represented by asset.uri's
         args.online_res = [];
@@ -366,6 +385,7 @@
                         location => loc.textContent,
                         library => circlib.textContent,
                         status => status.textContent,
+                        status_code => status.getAttribute('ident'),
                         barcode => copy.getAttribute('barcode'),
                         owner => volume.getAttribute('lib')
                     };
@@ -408,7 +428,7 @@
             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;
diff --git a/Open-ILS/src/templates/opac/parts/record/authors.tt2 b/Open-ILS/src/templates/opac/parts/record/authors.tt2
index 005b48a..6d25b3c 100644
--- a/Open-ILS/src/templates/opac/parts/record/authors.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/authors.tt2
@@ -68,28 +68,28 @@ BLOCK build_author_links;
         # schema.org changes
         IF type == 'author';
             IF tag.substr(1,2) == '10' && args.schema.itemtype && args.schema.itemtype.match('MusicAlbum');
-                iprop = ' itemtype="http://schema.org/MusicGroup" itemscope itemprop="byArtist"';
+                iprop = ' typeof="MusicGroup" property="byArtist"';
             ELSIF tag.substr(1,2) == '00';
-                iprop = ' itemtype="http://schema.org/Person" itemscope itemprop="author"';
+                iprop = ' typeof="Person" property="author"';
             ELSE;
-                iprop = ' itemtype="http://schema.org/Organization" itemscope itemprop="author"';
+                iprop = ' typeof="Organization" property="author"';
             END;
         ELSIF type == 'added';
             IF tag.substr(1,2) == '00';
-                iprop = ' itemtype="http://schema.org/Person" itemscope itemprop="contributor"';
+                iprop = ' typeOf="Person" property="contributor"';
             ELSE;
-                iprop = ' itemtype="http://schema.org/Organization" itemscope itemprop="contributor"';
+                iprop = ' typeOf="Organization" property="contributor"';
             END;
         END;
         '<a href="' _ url _ '"' _ iprop _ '>';
-        IF iprop; '<span itemprop="name">'; END;
+        IF iprop; '<span property="name">'; END;
         term.replace('^\s+', '');
         IF iprop; '</span>'; END;
         IF birthdate;
-            ' <span itemprop="birthDate">' _ birthdate _ '</span>-';
+            ' <span property="birthDate">' _ birthdate _ '</span>-';
         END;
         IF deathdate;
-            '<span itemprop="deathDate">' _ deathdate _ '</span>';
+            '<span property="deathDate">' _ deathdate _ '</span>';
         END;
         '</a>';
         FOREACH link880 IN graphics;
diff --git a/Open-ILS/src/templates/opac/parts/record/body.tt2 b/Open-ILS/src/templates/opac/parts/record/body.tt2
index 2e74d66..b8ba910 100644
--- a/Open-ILS/src/templates/opac/parts/record/body.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/body.tt2
@@ -4,7 +4,7 @@
     stop_parms = ['expand','cnoffset','copy_offset','copy_limit'];
     ctx.record_attrs = attrs; # capture for JS
 %]
-<div id='canvas_main' class='canvas' itemscope itemtype='[% args.schema.itemtype %]'>
+<div id='canvas_main' class='canvas' vocab="http://schema.org/" typeof='[% args.schema.itemtype %] Product'>
     [%- INCLUDE "opac/parts/record/navigation.tt2" %]
     [%- IF ctx.bib_is_dead %]
     <div id='rdetail_deleted_exp'>
diff --git a/Open-ILS/src/templates/opac/parts/record/contents.tt2 b/Open-ILS/src/templates/opac/parts/record/contents.tt2
index fcf9e54..29fc33b 100644
--- a/Open-ILS/src/templates/opac/parts/record/contents.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/contents.tt2
@@ -187,7 +187,7 @@ END
 -%]
 <tr>
     <td class='rdetail_content_type'>[% cont.label %]</td>
-    <td class='rdetail_content_value' itemprop='keywords'>[% content %]</td>
+    <td class='rdetail_content_value' property='keywords'>[% content %]</td>
 </tr>
         [%- END; %]
     [%- END; %]
diff --git a/Open-ILS/src/templates/opac/parts/record/copy_counts.tt2 b/Open-ILS/src/templates/opac/parts/record/copy_counts.tt2
index a400aad..fd97eab 100644
--- a/Open-ILS/src/templates/opac/parts/record/copy_counts.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/copy_counts.tt2
@@ -17,7 +17,9 @@
             ou_name = cp_org_unit.name;
             displayed_ous.$ou_name = 1;
     %]
-    <li>
+    <li property="offers" typeof="AggregateOffer">
+        <meta property="offerCount" content="[% ou_avail %]">
+        <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 %]
@@ -35,7 +37,10 @@
         UNLESS depth < 0 || displayed_ous.exists(ou_name);
     %]
     [%- IF attrs.plib_copy_counts.$depth.count > 0; %]
-    <li class="preferred">[%
+    <li class="preferred" property="offers" typeof="AggregateOffer">
+        <meta property="offerCount" content="[% ou_avail %]">
+        <meta property="seller" content="[% ou_name | html %]">
+    [%-
         l('[_1] of [quant,_2,copy,copies] available at [_3].',
             attrs.plib_copy_counts.$depth.available,
             attrs.plib_copy_counts.$depth.count,
diff --git a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2
index 5bab2b7..57d1d41 100644
--- a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2
@@ -89,11 +89,11 @@ END; # FOREACH bib
                 callnum = callnum  _ " " _ callnum_suffix;
             END;
         -%]
-        <tr>
+        <tr property="offers" typeof="Offer">
             [%- 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'>
+            [%- 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');
@@ -101,17 +101,22 @@ END; # FOREACH bib
                 org_name | html;
                 IF lib_url; '</a>'; END;
             -%]
+                <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
             </td>[% END %]
-            <td header='copy_header_callnumber'>[% callnum | html %] [% 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'>
+            <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 -%]</td>
-            <td header='copy_header_shelfloc'>[% copy_info.copy_location | html %]</td>
+                [%- END -%]
+                [%- IF attrs.gtin13;
+                    '<meta property="gtin13" content="' _ attrs.gtin13 _ '" />';
+                END; -%]
+            </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 ?
@@ -171,7 +176,10 @@ END; # FOREACH bib
                     l("Not holdable");
                 END %]</td>
             [%- END %]
-            <td header='copy_header_status'>[% copy_info.copy_status | html %]</td>
+            <td header='copy_header_status'>[%-
+                schema_copy_status.${copy_info.status_code};
+                copy_info.copy_status | html;
+            -%]</td>
             <td header='due_date'>[%
                 IF copy_info.due_date;
                     date.format(
@@ -185,7 +193,7 @@ END; # FOREACH bib
 
         [% IF copy_info.notes; %]
             [% FOREACH note IN copy_info.notes; %]
-                <tr><td>&nbsp;</td><td class="copy_note" colspan="4"><strong>[% note.title | html %]:</strong> [% note.value | html %]</td></tr>
+                <tr><td>&nbsp;</td><td class="copy_note" colspan="4" property="description"><strong>[% note.title | html %]:</strong> [% note.value | html %]</td></tr>
             [% END %]
         [% END %]
 
diff --git a/Open-ILS/src/templates/opac/parts/record/subjects.tt2 b/Open-ILS/src/templates/opac/parts/record/subjects.tt2
index 3914908..5812690 100644
--- a/Open-ILS/src/templates/opac/parts/record/subjects.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/subjects.tt2
@@ -68,7 +68,7 @@
             <tbody>
                 <tr>
                     <td class='rdetail_subject_type'>[% subj.label %]</td>
-                    <td class='rdetail_subject_value' itemprop='keywords'>[% content %]</td>
+                    <td class='rdetail_subject_value' property='keywords'>[% content %]</td>
                 </tr>
             </tbody>
         </table>
diff --git a/Open-ILS/src/templates/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/opac/parts/record/summary.tt2
index a38bd54..b9a91a8 100644
--- a/Open-ILS/src/templates/opac/parts/record/summary.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/summary.tt2
@@ -61,7 +61,7 @@
             <img alt="[% attrs.format_label %]" title="[% attrs.format_label | html %]" src="[% attrs.format_icon %]" />
         </div>
         [%- END %]
-        <h1 id='rdetail_title' itemprop="name">[% attrs.title_extended | html %]</h1>
+        <h1 id='rdetail_title' property="name">[% attrs.title_extended | html %]</h1>
         [%-
             FOR link880 IN attrs.graphic_titles;
                 FOR alt IN link880.graphic;
@@ -108,8 +108,14 @@ IF num_uris > 0;
 <div class="rdetail_uris">
     [%- IF num_uris > 1 %]<ul>[% END %]
     [%- FOR uri IN merged_uris %]
-        [%- IF num_uris == 1 %]<p class="rdetail_uri">[% ELSE %]<li class="rdetail_uri">[% END %]
+        [%- IF num_uris == 1 -%]
+            <p class="rdetail_uri" property="offers" vocab="http://schema.org/" typeof="Offer">
+        [%- ELSE -%]
+            <li class="rdetail_uri" property="offers" vocab="http://schema.org/" typeof="Offer">
+        [%- END -%]
         <a href="[% uri.href %]">[% uri.link %]</a>[% ' - ' _ uri.note IF uri.note %]
+        <link property="availability" href="http://schema.org/OnlineOnly" />
+        [%- IF attrs.gtin13; '<meta property="gtin13" content="' _ attrs.gtin13 _ '" />'; END; %]
         [%- IF num_uris == 1 %]</p>[% ELSE %]</li>[% END %]
     [%- END %]
     [%- IF num_uris > 1 %]</ul>[% END %]
@@ -148,7 +154,7 @@ IF num_uris > 0;
     [%- IF attrs.isbns.0; FOR isbn IN attrs.isbns %]
     <li class='rdetail_isbns'>
         <strong class='rdetail_label'>[% l('ISBN:'); %]</strong>
-        <span class='rdetail_value' itemprop='isbn'>[% isbn | html  %]</span>
+        <span class='rdetail_value' property='isbn'>[% isbn | html  %]</span>
     </li>
         [%- END %]
     [%- END %]
@@ -189,14 +195,14 @@ IF num_uris > 0;
     [%- IF attrs.publisher %]
     <li id='rdetail_publisher'>
         <strong class='rdetail_label'>[% l("Publisher:") %]</strong>
-        <span class='rdetail_value' itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
+        <span class='rdetail_value' property="publisher" typeof="Organization">
         [%- IF attrs.pubplace; %]
-            <span itemprop="location">[% attrs.pubplace | html; %]</span>
+            <span property="location">[% attrs.pubplace | html; %]</span>
         [%- END; %]
-            <span itemprop="name">[% attrs.publisher | html; %]</span>
+            <span property="name">[% attrs.publisher | html; %]</span>
         </span>
         [%- IF attrs.pubdate; %]
-            <span itemprop="datePublished">[% attrs.pubdate | html; %]</span>
+            <span property="datePublished">[% attrs.pubdate | html; %]</span>
         [%- END; %]
         [%-
         IF attrs.graphic_pubinfos.size > 0;

commit 3732a7f7629a3ca5be60465b9daf4f641448efcc
Author: Dan Scott <dscott at laurentian.ca>
Date:   Sun Aug 25 00:39:46 2013 -0400

    Schema.org: improve MusicGroup vs. Person parsing
    
    Take a stricter approach to defining MusicGroups instead of Persons for
    the main authors of MusicAlbums. Music groups are generally catalogued
    as a 110 or 710 tag, and this avoids defining birthDates and deathDates
    for groups (which, however valid that might be in the real world, is not
    valid for schema.org).
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/templates/opac/parts/record/authors.tt2 b/Open-ILS/src/templates/opac/parts/record/authors.tt2
index d2adff0..005b48a 100644
--- a/Open-ILS/src/templates/opac/parts/record/authors.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/authors.tt2
@@ -67,7 +67,7 @@ BLOCK build_author_links;
         
         # schema.org changes
         IF type == 'author';
-            IF args.schema.itemtype && args.schema.itemtype.match('MusicAlbum');
+            IF tag.substr(1,2) == '10' && args.schema.itemtype && args.schema.itemtype.match('MusicAlbum');
                 iprop = ' itemtype="http://schema.org/MusicGroup" itemscope itemprop="byArtist"';
             ELSIF tag.substr(1,2) == '00';
                 iprop = ' itemtype="http://schema.org/Person" itemscope itemprop="author"';

-----------------------------------------------------------------------

Summary of changes:
 .../perlmods/lib/OpenILS/Application/AppUtils.pm   |    1 +
 .../src/templates/opac/parts/ac_google_books.tt2   |    2 +-
 Open-ILS/src/templates/opac/parts/misc_util.tt2    |   22 ++++++++++++-
 .../src/templates/opac/parts/record/authors.tt2    |   30 +++++++++-------
 Open-ILS/src/templates/opac/parts/record/body.tt2  |    2 +-
 .../src/templates/opac/parts/record/contents.tt2   |    2 +-
 .../templates/opac/parts/record/copy_counts.tt2    |   11 +++++-
 .../src/templates/opac/parts/record/copy_table.tt2 |   35 ++++++++++++++------
 .../src/templates/opac/parts/record/subjects.tt2   |    2 +-
 .../src/templates/opac/parts/record/summary.tt2    |   20 +++++++----
 10 files changed, 90 insertions(+), 37 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list