From de48f2bd2a943aa52303a605592bcdb5f11c028d Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Sun, 7 Apr 2013 18:14:58 -0400 Subject: [PATCH] TPAC schema.org: Add Organization types for contributors Given a 110 / 710 field, when generating the record details for authors and contributors we can declare an http://schema.org/Organization itemtype rather than just jamming the name under the "contributor" property. This is more in accordance with schema.org directions. Signed-off-by: Dan Scott --- Open-ILS/src/templates/opac/parts/record/authors.tt2 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/templates/opac/parts/record/authors.tt2 b/Open-ILS/src/templates/opac/parts/record/authors.tt2 index 94a887b7db..7205e8f0ae 100644 --- a/Open-ILS/src/templates/opac/parts/record/authors.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/authors.tt2 @@ -69,11 +69,17 @@ BLOCK build_author_links; IF type == 'author'; IF args.schema.itemtype && args.schema.itemtype.match('MusicAlbum'); iprop = ' itemtype="http://schema.org/MusicGroup" itemscope itemprop="byArtist"'; - ELSE; + ELSIF tag.substr(1,2) == '00'; iprop = ' itemtype="http://schema.org/Person" itemscope itemprop="author"'; + ELSE; + iprop = ' itemtype="http://schema.org/Organization" itemscope itemprop="author"'; END; ELSIF type == 'added'; - iprop = ' itemprop="contributor"'; + IF tag.substr(1,2) == '00'; + iprop = ' itemtype="http://schema.org/Person" itemscope itemprop="contributor"'; + ELSE; + iprop = ' itemtype="http://schema.org/Organization" itemscope itemprop="contributor"'; + END; END; ''; IF iprop; ''; END; -- 2.11.0