Adding ability for collate by class to work with display limit. NIHVIVO-118

This commit is contained in:
bdc34 2010-03-29 19:25:36 +00:00
parent 1e7f260253
commit 17116c547b

View file

@ -154,72 +154,66 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
${collateCurrentClassName } ${collateCurrentClassName }
<ul class='properties'><!-- collateClasses --> <ul class='properties'><!-- collateClasses -->
</c:if> </c:if>
<c:if test="${stmtCounter == displayLimit}"><!-- set up toggle div and expandable continuation div --> <c:if test="${stmtCounter == displayLimit}"><!-- set up toggle div and expandable continuation div -->
</ul> <c:if test="${ collateByClass }"> </ul></li></c:if>
<c:if test="${ ! collateByClass }"> </ul></c:if>
<c:set var="hiddenDivCount" value="${hiddenDivCount+1}"/> <c:set var="hiddenDivCount" value="${hiddenDivCount+1}"/>
<c:url var="themePath" value="/${themeDir}site_icons" /> <c:url var="themePath" value="/${themeDir}site_icons" />
<div class="navlinkblock "> <div class="navlinkblock ">
<span class="entityMoreSpan"> <span class="entityMoreSpan">
<c:out value='${objRows - stmtCounter}' /> <c:out value='${objRows - stmtCounter}' />
<c:choose> <c:choose>
<c:when test='${displayLimit==0}'> entries</c:when> <c:when test='${displayLimit==0}'> entries</c:when>
<c:otherwise> more</c:otherwise> <c:otherwise> more</c:otherwise>
</c:choose> </c:choose>
</span> </span>
<div class="extraEntities"> <div class="extraEntities">
<ul class="properties"> <c:if test="${ collateByClass }"> <li></c:if>
<ul class="properties">
</c:if> </c:if>
<li><span class="statementWrap"> <li>
<c:set var="opStmt" value="${objPropertyStmt}" scope="request"/> <span class="statementWrap">
<c:url var="propertyLink" value="/entity"> <c:set var="opStmt" value="${objPropertyStmt}" scope="request"/>
<c:param name="home" value="${portal.portalId}"/> <c:url var="propertyLink" value="/entity">
<c:param name="uri" value="${objPropertyStmt.object.URI}"/> <c:param name="home" value="${portal.portalId}"/>
<%-- <c:param name="uri" value="${objPropertyStmt.object.URI}"/>
<% ObjectPropertyStatement oStmt = (ObjectPropertyStatement)request.getAttribute("opStmt"); </c:url>
if (oStmt!=null) { <c:remove var="opStmt" scope="request"/>
Individual obj= (Individual)oStmt.getObject(); <c:forEach items="${objPropertyStmt.object.VClasses}" var="type">
if (obj != null) { <c:if test="${!empty type.customShortView}">
if (!obj.doesFlag1Match(currentPortalId)) {%> <c:set var="altRenderJsp" value="${type.customShortView}"/>
<c:param name="jump" value="true"/> </c:if>
<% } </c:forEach>
} <c:choose>
}%> <c:when test="${!empty altRenderJsp}">
--%> <c:set scope="request" var="individual" value="${objPropertyStmt.object}"/>
</c:url> <c:set scope="request" var="predicateUri" value="${objProp.URI}"/>
<c:remove var="opStmt" scope="request"/> <jsp:include page="${altRenderJsp}" flush="true"/>
<c:forEach items="${objPropertyStmt.object.VClasses}" var="type"> <c:remove var="altRenderJsp"/>
<c:if test="${!empty type.customShortView}"> </c:when>
<c:set var="altRenderJsp" value="${type.customShortView}"/> <c:otherwise>
</c:if> <a class="propertyLink" href='<c:out value="${propertyLink}"/>'><p:process><c:out value="${objPropertyStmt.object.name}"/></p:process></a>
</c:forEach> <c:if test="${!empty objPropertyStmt.object.moniker}">
<c:choose> <p:process><c:out value="| ${objPropertyStmt.object.moniker}"/></p:process>
<c:when test="${!empty altRenderJsp}"> </c:if>
<c:set scope="request" var="individual" value="${objPropertyStmt.object}"/> </c:otherwise>
<c:set scope="request" var="predicateUri" value="${objProp.URI}"/> </c:choose>
<jsp:include page="${altRenderJsp}" flush="true"/> <c:if test="${showSelfEdits || showCuratorEdits}">
<c:remove var="altRenderJsp"/> <c:set var="editLinks"><edLnk:editLinks item="${objPropertyStmt}" icons="false"/></c:set>
</c:when> <c:if test="${!empty editLinks}"><span class="editLinks">${editLinks}&nbsp;</span></c:if>
<c:otherwise> <c:if test="${empty editLinks}"><em class="nonEditable">(non-editable) </em></c:if>
<a class="propertyLink" href='<c:out value="${propertyLink}"/>'><p:process><c:out value="${objPropertyStmt.object.name}"/></p:process></a> </c:if>
<c:if test="${!empty objPropertyStmt.object.moniker}"> </span>
<p:process><c:out value="| ${objPropertyStmt.object.moniker}"/></p:process> </li>
</c:if>
</c:otherwise>
</c:choose>
<c:if test="${showSelfEdits || showCuratorEdits}">
<c:set var="editLinks"><edLnk:editLinks item="${objPropertyStmt}" icons="false"/></c:set>
<c:if test="${!empty editLinks}"><span class="editLinks">${editLinks}&nbsp;</span></c:if>
<c:if test="${empty editLinks}"><em class="nonEditable">(non-editable) </em></c:if>
</c:if>
</span></li>
<c:set var="stmtCounter" value="${stmtCounter+1}"/> <c:set var="stmtCounter" value="${stmtCounter+1}"/>
</c:forEach> </c:forEach>
<c:if test="${ collateClassesShownCount > 0 }"></ul></li><!-- collateClasses 2 --></c:if>
<c:if test="${objRows > 0}"></ul></c:if> <c:if test="${objRows > 0}"></ul></c:if>
<c:if test="${stmtCounter > displayLimit}"> <c:if test="${ collateClassesShownCount > 0 }"></li><!-- collateClasses 2 --></c:if>
<c:if test="${ stmtCounter > displayLimit}">
</div><%-- navlinkblock --%> </div><%-- navlinkblock --%>
</div><%-- extraEntities --%></c:if> </div><%-- extraEntities --%></c:if>
</div><!-- ${objProp.localNameWithPrefix} --> </div><!-- ${objProp.localNameWithPrefix} -->