Changes for NIHVIVO-2231 and NIHVIVO-2664: setting up menu page editing and retrieval of individuals for class intersections
This commit is contained in:
parent
91db1ad147
commit
9214b285a5
23 changed files with 501 additions and 66 deletions
|
@ -29,10 +29,11 @@
|
|||
|
||||
<#macro dataPropertyList property editable>
|
||||
<#list property.statements as statement>
|
||||
<@propertyListItem property statement editable>${statement.value}</@propertyListItem>
|
||||
<@propertyListItem property statement editable >${statement.value}</@propertyListItem>
|
||||
</#list>
|
||||
</#macro>
|
||||
|
||||
|
||||
<#macro objectProperty property editable template=property.template>
|
||||
<#if property.collatedBySubclass> <#-- collated -->
|
||||
<@collatedObjectPropertyList property editable template />
|
||||
|
@ -44,14 +45,15 @@
|
|||
</#if>
|
||||
</#macro>
|
||||
|
||||
<#macro collatedObjectPropertyList property editable template=property.template>
|
||||
|
||||
<#macro collatedObjectPropertyList property editable template=property.template >
|
||||
<#assign subclasses = property.subclasses>
|
||||
<#list subclasses?keys as subclass>
|
||||
<#if subclass?has_content>
|
||||
<li class="subclass" role="listitem">
|
||||
<h3>${subclass?lower_case}</h3>
|
||||
<ul class="subclass-property-list">
|
||||
<@objectPropertyList property editable subclasses[subclass] template/>
|
||||
<@objectPropertyList property editable subclasses[subclass] template />
|
||||
</ul>
|
||||
</li>
|
||||
<#else>
|
||||
|
@ -73,7 +75,7 @@ Assumes property is non-null. -->
|
|||
|
||||
<#macro objectPropertyList property editable statements=property.statements template=property.template>
|
||||
<#list statements as statement>
|
||||
<@propertyListItem property statement editable><#include "${template}"></@propertyListItem>
|
||||
<@propertyListItem property statement editable><#include "${template}"></@propertyListItem>
|
||||
</#list>
|
||||
</#macro>
|
||||
|
||||
|
@ -90,6 +92,7 @@ name will be used as the label. -->
|
|||
|
||||
<#macro addLink property editable label="${property.name}" extraParams="">
|
||||
<#if editable>
|
||||
<#--@dump var="property"/-->
|
||||
<#local url = property.addUrl>
|
||||
<#if url?has_content>
|
||||
<@showAddLink property.localName label addParamsToEditUrl(url, extraParams) />
|
||||
|
@ -114,10 +117,11 @@ name will be used as the label. -->
|
|||
<h2 id="${property.localName}">${label} <@verboseDisplay property /></h2>
|
||||
</#macro>
|
||||
|
||||
<#macro propertyListItem property statement editable>
|
||||
|
||||
<#macro propertyListItem property statement editable >
|
||||
<li role="listitem">
|
||||
<#nested>
|
||||
<@editingLinks "${property.localName}" statement editable />
|
||||
<@editingLinks "${property.localName}" statement editable/>
|
||||
</li>
|
||||
</#macro>
|
||||
|
||||
|
@ -217,7 +221,7 @@ name will be used as the label. -->
|
|||
<#-- Don't assume that if the mainImage property is populated, there is a thumbnail image (though that is the general case).
|
||||
If there's a mainImage statement but no thumbnail image, treat it as if there is no image. -->
|
||||
<#if (mainImage.statements)?has_content && thumbUrl?has_content>
|
||||
<a href="${individual.imageUrl}"><img class="individual-photo" src="${thumbUrl}" title="click to view larger image" alt="${individual.name}" width="160" /></a>
|
||||
<a href="${individual.imageUrl}"><img class="individual-photo" src="${tlhumbUrl}" title="click to view larger image" alt="${individual.name}" width="160" /></a>
|
||||
<@editingLinks "${mainImage.localName}" mainImage.first editable extraParams />
|
||||
<#else>
|
||||
<#local imageLabel><@addLinkWithLabel mainImage editable "Photo" extraParams /></#local>
|
||||
|
@ -235,4 +239,6 @@ name will be used as the label. -->
|
|||
<#local label = individual.nameStatement>
|
||||
${label.value}
|
||||
<@editingLinks "label" label editable />
|
||||
</#macro>
|
||||
</#macro>
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue