From: Dan Scott Date: Sun, 7 Apr 2013 22:14:58 +0000 (-0400) Subject: TPAC schema.org: Add Organization types for contributors X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d87a117dab9abe66fe1106a3ccdd7199af0c916a;p=contrib%2FConifer.git 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 Signed-off-by: Mike Rylander --- 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;