Improve html structure for testing

This commit is contained in:
Graham Triggs 2017-09-28 13:50:40 +01:00
parent 1ffe30fb4b
commit 7c27b74fd6
3 changed files with 38 additions and 26 deletions

View file

@ -146,4 +146,12 @@ ul#individual-personInPosition li {
ul#individual-personInPosition li:last-child { ul#individual-personInPosition li:last-child {
padding-bottom: 5px; padding-bottom: 5px;
}
section.vcard {
float: left;
}
section#preferredTitle {
float: left;
} }

View file

@ -53,29 +53,32 @@
<div class="col-md-10 person-details"> <div class="col-md-10 person-details">
<div class="row title"> <div class="row title">
<div class="col-md-12"> <div class="col-md-12">
<h1 class="vcard foaf-person"> <section class="vcard person">
<#-- Label --> <h1 class="foaf-person">
<span itemprop="name" class="fn"><@p.label individual editable labelCount localesCount/></span> <#-- Label -->
<span itemprop="name" class="fn"><@p.label individual editable labelCount localesCount/></span>
<#-- Display preferredTitle if it exists; otherwise mostSpecificTypes --> </h1>
<#assign title = propertyGroups.pullProperty("http://purl.obolibrary.org/obo/ARG_2000028","http://www.w3.org/2006/vcard/ns#Title")!> <section id="preferredTitle">
<#if title?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> <#-- Display preferredTitle if it exists; otherwise mostSpecificTypes -->
<#if (title.statements?size < 1) > <#assign title = propertyGroups.pullProperty("http://purl.obolibrary.org/obo/ARG_2000028","http://www.w3.org/2006/vcard/ns#Title")!>
<@p.addLinkWithLabel title editable /> <#if title?has_content> <#-- true when the property is in the list, even if not populated (when editing) -->
<#elseif editable> <#if (title.statements?size < 1) >
<h2>${title.name?capitalize!}</h2> <@p.addLinkWithLabel title editable />
<@p.verboseDisplay title /> <#elseif editable>
<h2>${title.name?capitalize!}</h2>
<@p.verboseDisplay title />
</#if>
<#list title.statements as statement>
<span itemprop="jobTitle" class="display-title<#if editable>-editable</#if>">${statement.preferredTitle}</span>
<@p.editingLinks "${title.localName}" "${title.name}" statement editable title.rangeUri />
</#list>
</#if> </#if>
<#list title.statements as statement> <#-- If preferredTitle is unpopulated, display mostSpecificTypes -->
<span itemprop="jobTitle" class="display-title<#if editable>-editable</#if>">${statement.preferredTitle}</span> <#if ! (title.statements)?has_content>
<@p.editingLinks "${title.localName}" "${title.name}" statement editable title.rangeUri /> <@p.mostSpecificTypes individual />
</#list> </#if>
</#if> </section>
<#-- If preferredTitle is unpopulated, display mostSpecificTypes --> </section>
<#if ! (title.statements)?has_content>
<@p.mostSpecificTypes individual />
</#if>
</h1>
<span id="iconControlsRightSide"> <span id="iconControlsRightSide">
<img id="uriIcon" title="${individual.uri}" src="${urls.images}/individual/uriIcon.gif" alt="${i18n().uri_icon}"/> <img id="uriIcon" title="${individual.uri}" src="${urls.images}/individual/uriIcon.gif" alt="${i18n().uri_icon}"/>
<#if checkNamesResult?has_content > <#if checkNamesResult?has_content >

View file

@ -73,12 +73,13 @@
<h1 class="foaf-person"> <h1 class="foaf-person">
<#-- Label --> <#-- Label -->
<span itemprop="name" class="fn"><@p.label individual editable labelCount localesCount/></span> <span itemprop="name" class="fn"><@p.label individual editable labelCount localesCount/></span>
</h1>
<section id="preferredTitle">
<#-- Display preferredTitle if it exists; otherwise mostSpecificTypes --> <#-- Display preferredTitle if it exists; otherwise mostSpecificTypes -->
<#assign title = propertyGroups.pullProperty("http://purl.obolibrary.org/obo/ARG_2000028","http://www.w3.org/2006/vcard/ns#Title")!> <#assign title = propertyGroups.pullProperty("http://purl.obolibrary.org/obo/ARG_2000028","http://www.w3.org/2006/vcard/ns#Title")!>
<#if title?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> <#if title?has_content> <#-- true when the property is in the list, even if not populated (when editing) -->
<#if (title.statements?size < 1) > <#if (title.statements?size < 1) >
<@p.addLinkWithLabel title editable /> <@p.addLinkWithLabel title editable />
<#elseif editable> <#elseif editable>
<h2>${title.name?capitalize!}</h2> <h2>${title.name?capitalize!}</h2>
<@p.verboseDisplay title /> <@p.verboseDisplay title />
@ -91,8 +92,8 @@
<#-- If preferredTitle is unpopulated, display mostSpecificTypes --> <#-- If preferredTitle is unpopulated, display mostSpecificTypes -->
<#if ! (title.statements)?has_content> <#if ! (title.statements)?has_content>
<@p.mostSpecificTypes individual /> <@p.mostSpecificTypes individual />
</#if> </#if>
</h1> </section>
</#if> </#if>
<!-- Positions --> <!-- Positions -->
<#include "individual-positions.ftl"> <#include "individual-positions.ftl">