diff --git a/productMods/config/listViewConfig-informationResourceInAuthorship.xml b/productMods/config/listViewConfig-informationResourceInAuthorship.xml index 762b3b7c..b2d8181a 100644 --- a/productMods/config/listViewConfig-informationResourceInAuthorship.xml +++ b/productMods/config/listViewConfig-informationResourceInAuthorship.xml @@ -12,7 +12,7 @@ PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> - SELECT DISTINCT ?subclass + SELECT DISTINCT ?subclass ?authorship ?author ?authorName WHERE { @@ -21,13 +21,12 @@ OPTIONAL { ?authorship core:relates ?author . ?author a foaf:Agent . ?author rdfs:label ?authorName - + OPTIONAL { ?authorship core:relates ?author . ?author a foaf:Agent . ?author vitro:mostSpecificType ?subclass . ?subclass rdfs:subClassOf foaf:Agent } - } OPTIONAL { ?authorship core:relates ?author . ?author a vcard:Kind . @@ -39,13 +38,12 @@ bind ( COALESCE(?middleName, "") As ?middleName1) . bind ( COALESCE(?lastName, "") As ?lastName1) . bind (concat(str(?lastName1 + ", "),str(?middleName1 + " "),str(?firstName1)) as ?authorName) . - + OPTIONAL { ?authorship core:relates ?author . ?author a vcard:Kind . ?author vitro:mostSpecificType ?subclass . ?subclass rdfs:subClassOf vcard:Kind } - } FILTER ( bound(?author) ) diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-informationResourceInAuthorship.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-informationResourceInAuthorship.ftl index 78581373..67a810a2 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-informationResourceInAuthorship.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-informationResourceInAuthorship.ftl @@ -13,7 +13,11 @@ next statement --> <#macro showAuthorship statement> <#if statement.author??> - ${statement.authorName} + <#if statement.subclass?? && statement.subclass?contains("vcard")> + ${statement.authorName} + <#else> + ${statement.authorName} + <#else> <#-- This shouldn't happen, but we must provide for it --> ${i18n().missing_author}