diff --git a/webapp/web/templates/freemarker/body/individual/individual-vitro.ftl b/webapp/web/templates/freemarker/body/individual/individual-vitro.ftl index fa9bc9d99..e35f99593 100644 --- a/webapp/web/templates/freemarker/body/individual/individual-vitro.ftl +++ b/webapp/web/templates/freemarker/body/individual/individual-vitro.ftl @@ -5,7 +5,12 @@
<#-- Image --> - <@p.imageLinks individual propertyGroups namespaces editable /> + <@p.imageLinks individual=individual + propertyGroups=propertyGroups + namespaces=namespaces + editable=editable + showPlaceholder="with_add_link" + placeholder="${urls.images}/placeholders/person.thumbnail.jpg" />
<#if individual.showAdminPanel> diff --git a/webapp/web/templates/freemarker/body/partials/individual/lib-properties.ftl b/webapp/web/templates/freemarker/body/partials/individual/lib-properties.ftl index 46f7df73a..59d503966 100644 --- a/webapp/web/templates/freemarker/body/partials/individual/lib-properties.ftl +++ b/webapp/web/templates/freemarker/body/partials/individual/lib-properties.ftl @@ -118,7 +118,8 @@ name will be used as the label. --> <#-- Main image links --> -<#macro imageLinks individual propertyGroups namespaces editable placeholderImage=""> +<#-- Values for showPlaceholderImage: "always", "never", "with_add_link" --> +<#macro imageLinks individual propertyGroups namespaces editable showPlaceholder="never" placeholder=""> <#local mainImage = propertyGroups.getPropertyAndRemoveFromList("${namespaces.vitroPublic}mainImage")!> <#local thumbUrl = individual.thumbUrl!> <#-- Don't assume that if the mainImage property is populated, there is a thumbnail image (though that is the general case). @@ -127,9 +128,12 @@ name will be used as the label. --> ${individual.name} <@p.editingLinks "${mainImage.localName}" mainImage.statements[0] editable /> <#else> - <@p.addLinkWithLabel mainImage editable "Photo" /> - <#if placeholderImage?has_content> - placeholder image + <#local imageLabel><@p.addLinkWithLabel mainImage editable "Photo" /> + ${imageLabel} + <#if placeholder?has_content> + <#if showPlaceholder == "always" || (showPlaceholder="with_add_link" && imageLabel?has_content)> + placeholder image +