NIHVIVO-1333 Handle property group for unassigned properties, and case where no property groups are defined
This commit is contained in:
parent
61bc9486fb
commit
f6ff54120d
15 changed files with 155 additions and 109 deletions
|
@ -147,7 +147,7 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
|
|||
<c:set var="first" value=""/><c:if test="${counter == 0}"><c:set var="first" value=" first"/></c:if>
|
||||
<c:set var="last" value=""/><c:if test="${(counter+1) == propTotal}"><c:set var="last" value=" last"/></c:if>
|
||||
<div class="propsItem${first}${last}" id="${objProp.localName}">
|
||||
<h4>${objProp.editLabel}</h4>
|
||||
<h4>${objProp.label}</h4>
|
||||
<c:if test="${showSelfEdits || showCuratorEdits}"><edLnk:editLinks item="${objProp}" icons="false" /></c:if>
|
||||
<%-- Verbose property display additions for object properties, using context variable verbosePropertyListing --%>
|
||||
<c:if test="${showCuratorEdits && verbosePropertyListing}">
|
||||
|
@ -272,7 +272,7 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
|
|||
<c:set var="addable" value=""/><c:if test="${dataRows >= 1 && displayLimit > 1}"><c:set var="addable" value=" addable"/></c:if>
|
||||
|
||||
<div id="${dataProp.localName}" class="propsItem dataItem${first}${last}${multiItem}${addable}" style="${dataStyle}">
|
||||
<h4>${dataProp.editLabel}</h4>
|
||||
<h4>${dataProp.label}</h4>
|
||||
<c:if test="${showSelfEdits || showCuratorEdits}">
|
||||
<c:choose>
|
||||
<c:when test="${dataRows == 1 && displayLimit==1 }">
|
||||
|
|
|
@ -96,7 +96,7 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
|
|||
<c:if test="${showSelfEdits || showCuratorEdits}"><c:set var="classForEditControls" value=" editing"/></c:if>
|
||||
<c:set var="uniqueOpropDivName" value="${fn:replace(objProp.localNameWithPrefix,':','-')}"/>
|
||||
<div class="propsItem ${classForEditControls}" id="${'oprop-'}${uniqueOpropDivName}">
|
||||
<h3 class="propertyName">${objProp.editLabel}</h3>
|
||||
<h3 class="propertyName">${objProp.label}</h3>
|
||||
<c:if test="${showSelfEdits || showCuratorEdits}"><edLnk:editLinks item="${objProp}" icons="false" /></c:if>
|
||||
|
||||
<%-- Verbose property display additions for object properties, using context variable verbosePropertyListing --%>
|
||||
|
@ -227,7 +227,7 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
|
|||
<c:if test="${showSelfEdits || showCuratorEdits}"><c:set var="classForEditControls" value=" editing"/></c:if>
|
||||
<c:set var="uniqueDpropDivName" value="${fn:replace(dataProp.localNameWithPrefix,':','-')}"/>
|
||||
<div id="${'dprop-'}${uniqueDpropDivName}" class="propsItem ${classForEditControls}" style="${dataStyle}">
|
||||
<h3 class="propertyName">${dataProp.editLabel}</h3>
|
||||
<h3 class="propertyName">${dataProp.label}</h3>
|
||||
<c:if test="${showSelfEdits || showCuratorEdits}"><edLnk:editLinks item="${dataProp}" icons="false"/></c:if>
|
||||
<%-- Verbose property display additions for data properties, using context variable verbosePropertyListing --%>
|
||||
<c:if test="${showCuratorEdits && verbosePropertyListing}">
|
||||
|
|
|
@ -2,4 +2,28 @@
|
|||
|
||||
<#-- Template for property listing on individual profile page -->
|
||||
|
||||
<#assign properties = individual.propertyList>
|
||||
<#assign propertyGroups = individual.propertyList>
|
||||
|
||||
<#list propertyGroups as group>
|
||||
|
||||
<#-- Display the group heading -->
|
||||
<#-- If there are no groups, a dummy group has been created with a null name. -->
|
||||
<#if ! group.name??>
|
||||
<#-- Here you might just do nothing and proceed to list the properties as in the grouped case,
|
||||
or you might choose different markup for the groupless case. -->
|
||||
<#-- This is the group for properties not assigned to any group. It has an empty name. -->
|
||||
<#elseif group.name?length == 0>
|
||||
<h3>other</h3>
|
||||
<#else>
|
||||
<h3>${group.name}</h3>
|
||||
</#if>
|
||||
|
||||
<#-- Now list the properties in the group -->
|
||||
<p>Number of properties in group: ${group.propertyList?size}</p> <#-- testing -->
|
||||
<#--
|
||||
<#list group.properties as property>
|
||||
|
||||
</#list>
|
||||
-->
|
||||
|
||||
</#list>
|
|
@ -72,7 +72,8 @@
|
|||
</div>
|
||||
</#if>
|
||||
|
||||
<#-- <#include "individual-properties.ftl"> -->
|
||||
<#-- Ontology properties -->
|
||||
<#include "individual-properties.ftl">
|
||||
|
||||
<#-- Keywords -->
|
||||
<#if individual.keywords?has_content>
|
||||
|
@ -187,8 +188,7 @@
|
|||
${stylesheets.addFromTheme("/css/entity.css")}
|
||||
|
||||
<#-- RY Figure out which of these scripts really need to go into the head, and which are needed at all (e.g., tinyMCE??) -->
|
||||
${headScripts.add("/js/jquery.js",
|
||||
"/js/jquery_plugins/getUrlParam.js",
|
||||
${headScripts.add("/js/jquery_plugins/getUrlParam.js",
|
||||
"/js/jquery_plugins/colorAnimations.js",
|
||||
"/js/propertyGroupSwitcher.js",
|
||||
"/js/jquery_plugins/jquery.form.js",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue