merge from nihvivo-rel-1.1-maint branch: moving the individual rendering changes back to the vitro
This commit is contained in:
parent
23007ba45e
commit
fa77c80a91
2 changed files with 151 additions and 71 deletions
|
@ -110,13 +110,13 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
|
|||
<c:if test="${group.statementCount==0}"><c:set var="groupStyle" value="display: block"/></c:if>
|
||||
|
||||
|
||||
<%-- Getting the count of properties in each group --%>
|
||||
<%-- Getting the count of properties in each group --%>
|
||||
<c:set var="counter" value="0"/>
|
||||
<c:set var="propTotal" value="0"/>
|
||||
<c:set var="propTotal" value="0"/>
|
||||
<% int propTotal = g.getPropertyList().size(); %>
|
||||
<c:set var="propTotal" value="<%=propTotal%>" />
|
||||
|
||||
|
||||
<c:if test="${propTotal>0}">
|
||||
<div class="propsCategory" id="<%=g.getLocalName()%>">
|
||||
<h3><strong><%=g.getName()%></strong></h3>
|
||||
<div class="propsWrap">
|
||||
|
@ -141,13 +141,53 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
|
|||
See NIHVIVO-512. --%>
|
||||
|
||||
<c:set var="objRows" value="${fn:length(objProp.objectPropertyStatements)}"/>
|
||||
<c:if test="${objRows==0}"><c:set var="objStyle" value="display: block;"/></c:if>
|
||||
<c:if test="${editableInSomeWay || objRows>0}">
|
||||
<c:if test="${objRows==0}"><c:set var="objStyle" value="display: block;"/></c:if>
|
||||
<%-- nac26 Changing the test on objRows here to be GTE so that properties marked with an update level of "nobody" are still rendered --%>
|
||||
<c:if test="${editableInSomeWay || objRows>=0}">
|
||||
<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>
|
||||
<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}">
|
||||
<c:url var="propertyEditLink" value="/propertyEdit">
|
||||
<c:param name="home" value="${portal.portalId}"/>
|
||||
<c:param name="uri" value="${objProp.URI}"/>
|
||||
</c:url>
|
||||
<c:choose>
|
||||
<c:when test="${!empty objProp.hiddenFromDisplayBelowRoleLevel.label}"><c:set var="displayCue" value="${objProp.hiddenFromDisplayBelowRoleLevel.label}"/></c:when>
|
||||
<c:otherwise><c:set var="displayCue" value="unspecified"/></c:otherwise>
|
||||
</c:choose>
|
||||
<c:choose>
|
||||
<c:when test="${!empty objProp.prohibitedFromUpdateBelowRoleLevel.label}"><c:set var="updateCue" value="${objProp.prohibitedFromUpdateBelowRoleLevel.label}"/></c:when>
|
||||
<c:otherwise><c:set var="updateCue" value="unspecified"/></c:otherwise>
|
||||
</c:choose>
|
||||
<c:choose>
|
||||
<c:when test="${!empty objProp.localNameWithPrefix}"><c:set var="localName" value="${objProp.localNameWithPrefix}"/></c:when>
|
||||
<c:otherwise><c:set var="localName" value="no local name"/></c:otherwise>
|
||||
</c:choose>
|
||||
<c:choose>
|
||||
<c:when test="${!empty objProp.domainDisplayTier}"><c:set var="displayTier" value="${objProp.domainDisplayTier}"/></c:when>
|
||||
<c:otherwise><c:set var="displayTier" value="blank"/></c:otherwise>
|
||||
</c:choose>
|
||||
<c:choose>
|
||||
<c:when test="${!empty objProp.groupURI}">
|
||||
<% PropertyGroup pg = pgDao.getGroupByURI(op.getGroupURI());
|
||||
if (pg!=null && pg.getName()!=null) {
|
||||
request.setAttribute("groupName",pg.getName());%>
|
||||
<span class="verbosePropertyListing"><a class="propertyLink" href="${propertyEditLink}"/>${localName}</a> (object property); display tier ${displayTier} within group ${groupName}; display level: ${displayCue}; update level: ${updateCue}</span>
|
||||
<% } else {%>
|
||||
<span class="verbosePropertyListing"><a class="propertyLink" href="${propertyEditLink}"/>${localName}</a> (object property); display tier ${displayTier}; display level: ${displayCue}; update level: ${updateCue}</span>
|
||||
<% } %>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<span class="verbosePropertyListing"><a class="propertyLink" href="${propertyEditLink}"/>${localName}</a> (object property); display tier ${displayTier}; display level: ${displayCue}; update level: ${updateCue}</span>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
<%-- end Verbose property display additions for object properties --%>
|
||||
|
||||
<c:set var="displayLimit" value="${objProp.domainDisplayLimit}"/>
|
||||
|
||||
<c:if test="${displayLimit<0}">
|
||||
|
@ -162,13 +202,13 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
|
|||
<c:set var="opStmt" value="${objPropertyStmt}" scope="request"/>
|
||||
<c:url var="propertyLink" value="/entity">
|
||||
<c:param name="home" value="${portal.portalId}"/>
|
||||
<c:param name="uri" value="${objPropertyStmt.object.URI}"/>
|
||||
<c:param name="uri" value="${objPropertyStmt.object.URI}"/>
|
||||
</c:url>
|
||||
|
||||
<% String customShortView = MiscWebUtils.getCustomShortView(request); %>
|
||||
<c:set var="altRenderJsp" value="<%= customShortView %>" />
|
||||
<c:remove var="opStmt" scope="request"/>
|
||||
|
||||
|
||||
<c:choose>
|
||||
<c:when test="${!empty altRenderJsp}">
|
||||
<c:set scope="request" var="individual" value="${objPropertyStmt.object}"/>
|
||||
|
@ -221,6 +261,46 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
|
|||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
|
||||
<%-- Verbose property display additions for data properties, using context variable verbosePropertyListing --%>
|
||||
<c:if test="${showCuratorEdits && verbosePropertyListing}">
|
||||
<c:url var="propertyEditLink" value="/datapropEdit">
|
||||
<c:param name="home" value="${portal.portalId}"/>
|
||||
<c:param name="uri" value="${dataProp.URI}"/>
|
||||
</c:url>
|
||||
<c:choose>
|
||||
<c:when test="${!empty dataProp.hiddenFromDisplayBelowRoleLevel.label}"><c:set var="displayCue" value="${dataProp.hiddenFromDisplayBelowRoleLevel.label}"/></c:when>
|
||||
<c:otherwise><c:set var="displayCue" value="unspecified"/></c:otherwise>
|
||||
</c:choose>
|
||||
<c:choose>
|
||||
<c:when test="${!empty dataProp.prohibitedFromUpdateBelowRoleLevel.label}"><c:set var="updateCue" value="${dataProp.prohibitedFromUpdateBelowRoleLevel.label}"/></c:when>
|
||||
<c:otherwise><c:set var="updateCue" value="unspecified"/></c:otherwise>
|
||||
</c:choose>
|
||||
<c:choose>
|
||||
<c:when test="${!empty dataProp.localNameWithPrefix}"><c:set var="localName" value="${dataProp.localNameWithPrefix}"/></c:when>
|
||||
<c:otherwise><c:set var="localName" value="no local name"/></c:otherwise>
|
||||
</c:choose>
|
||||
<c:choose>
|
||||
<c:when test="${!empty dataProp.displayTier}"><c:set var="displayTier" value="${dataProp.displayTier}"/></c:when>
|
||||
<c:otherwise><c:set var="displayTier" value="blank"/></c:otherwise>
|
||||
</c:choose>
|
||||
<c:choose>
|
||||
<c:when test="${!empty dataProp.groupURI}">
|
||||
<% PropertyGroup pg = pgDao.getGroupByURI(dp.getGroupURI());
|
||||
if (pg!=null && pg.getName()!=null) {
|
||||
request.setAttribute("groupName",pg.getName());%>
|
||||
<span class="verbosePropertyListing"><a class="propertyLink" href="${propertyEditLink}"/>${localName}</a> (data property); display tier ${displayTier} within group ${groupName}; display level: ${displayCue}; update level: ${updateCue}</span>
|
||||
<% } else {%>
|
||||
<span class="verbosePropertyListing"><a class="propertyLink" href="${propertyEditLink}"/>${localName}</a> (data property); display tier ${displayTier}; display level: ${displayCue}; update level: ${updateCue}</span>
|
||||
<% } %>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<span class="verbosePropertyListing"><a class="propertyLink" href="${propertyEditLink}"/>${localName}</a> (data property); display tier ${displayTier}; display level: ${displayCue}; update level: ${updateCue}</span>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
<%-- end Verbose property display additions for data properties --%>
|
||||
|
||||
<c:if test="${displayLimit<0}">
|
||||
<%-- set to an arbitrary but high positive limit if unset on property, i.e. -1 --%>
|
||||
<c:set var="displayLimit" value="32"/>
|
||||
|
@ -240,7 +320,7 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
|
|||
<c:when test='${dataRows==1}'>
|
||||
<span class="statementWrap">
|
||||
${dataPropertyStmt.data}
|
||||
<c:if test='${displayLimit>1 && (showSelfEdits || showCuratorEdits)}'>
|
||||
<c:if test='${showSelfEdits || showCuratorEdits}'>
|
||||
<c:set var="editLinks"><edLnk:editLinks item="${dataPropertyStmt}" icons="false"/></c:set>
|
||||
<c:if test="${!empty editLinks}"><span class="editLinks">${editLinks}</span></c:if>
|
||||
<c:if test="${empty editLinks}"><em class="nonEditable">(non-editable)</em></c:if>
|
||||
|
@ -285,6 +365,7 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
|
|||
%>
|
||||
</div><!-- propsWrap -->
|
||||
</div><!-- class="propsCategory" -->
|
||||
</c:if>
|
||||
<c:if test="${showSelfEdits || showCuratorEdits}">
|
||||
<a class="backToTop" href="#wrap" title="jump to top of the page">back to top</a>
|
||||
</c:if>
|
||||
|
@ -292,5 +373,4 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
|
|||
} else {
|
||||
log.debug("incoming groups list with merged properties not found as request attribute for subject "+subject.getName()+"\n");
|
||||
}
|
||||
%>
|
||||
|
||||
%>
|
Loading…
Add table
Add a link
Reference in a new issue