Fixing vitro namespace property edit hiding for blurb, description and citation. NIHVIVO-274

This commit is contained in:
bdc34 2010-04-05 17:26:14 +00:00
parent e31c551260
commit 103cf1ec18
2 changed files with 49 additions and 37 deletions

View file

@ -251,15 +251,17 @@ if (VitroRequestPrep.isSelfEditing(request) || LoginFormBean.loggedIn(request, L
<%-- Blurb --%>
<c:if test="${showEdits || !empty entity.blurb}">
<div id="dprop-vitro-blurb" class="propsItem ${editingClass}">
<c:if test="${not empty entity.blurb }">
<c:set var="editLinksForExistingBlurb"><edLnk:editLinks item="<%= VitroVocabulary.BLURB %>" data="${entity.blurb}" icons="false"/></c:set>
</c:if>
<c:set var="editLinksForNewBlurb"><edLnk:editLinks item="<%= VitroVocabulary.BLURB %>" icons="false"/></c:set>
<c:if test="${showEdits || (( empty entity.blurb and not empty editLinksForNewBlurb) or ( not empty entity.blurb and not empty editLinksForExistingBlurb)) }">
<h3 class="propertyName">blurb</h3>
${editLinksForNewBlurb}
<c:set var="mayEditBlurb" value="${showEdits && (( empty entity.blurb and not empty editLinksForNewBlurb) or ( not empty entity.blurb and not empty editLinksForExistingBlurb)) }"/>
<c:if test="${ mayEditBlurb || ! empty entity.blurb }">
<div id="dprop-vitro-blurb" class="propsItem ${editingClass}">
<h3 class="propertyName">blurb</h3> ${editLinksForNewBlurb}
</c:if>
<c:if test="${!empty entity.blurb}">
<div class="datatypeProperties">
<div class="datatypePropertyValue">
@ -272,21 +274,24 @@ if (VitroRequestPrep.isSelfEditing(request) || LoginFormBean.loggedIn(request, L
</div>
</div>
</c:if>
<c:if test="${ mayEditBlurb || ! empty entity.blurb }">
</div>
</c:if>
</c:if>
<%-- Description --%>
<c:if test="${ showEdits || !empty entity.description}">
<div id="dprop-vitro-description" class="propsItem ${editingClass}">
<c:if test="${not empty entity.description }">
<c:set var="editLinksForExisitngDesc"><edLnk:editLinks item="<%= VitroVocabulary.DESCRIPTION %>" data="${entity.description}" icons="false"/></c:set>
</c:if>
<c:set var="editLinksForNewDesc"><edLnk:editLinks item="<%= VitroVocabulary.DESCRIPTION %>" icons="false"/></c:set>
<c:set var="mayEditDesc" value="${showEdits && ((empty entity.description and not empty editLinksForNewDesc) or (not empty entity.description and not empty editLinksForExisitngDesc))}"/>
<c:if test="${showEdits || ((empty entity.description and not empty editLinksForNewDesc) or (not empty entity.description and not empty editLinksForExisitngDesc))}">
<h3 class="propertyName">description</h3>
${editLinksForNewDesc}
<c:if test="${mayEditDesc || ! empty entity.description }">
<div id="dprop-vitro-description" class="propsItem ${editingClass}">
<h3 class="propertyName">description</h3> ${editLinksForNewDesc}
</c:if>
<c:if test="${!empty entity.description}">
<div class="datatypeProperties">
<div class="datatypePropertyValue">
@ -299,8 +304,10 @@ if (VitroRequestPrep.isSelfEditing(request) || LoginFormBean.loggedIn(request, L
</div>
</div>
</c:if>
<c:if test="${mayEditDesc || ! empty entity.description }">
</div>
</c:if>
</c:if>

View file

@ -5,15 +5,18 @@
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<c:if test="${showEdits || !empty entity.citation}">
<div id="dprop-vitro-citation" class="propsItem ${editingClass}">
<c:if test="${not empty entity.citation }">
<c:set var="editLinksForExisting"><edLnk:editLinks item="<%= VitroVocabulary.CITATION %>" data="${entity.citation}" icons="false"/></c:set>
</c:if>
<c:set var="editLinksForNew"><edLnk:editLinks item="<%= VitroVocabulary.CITATION %>" icons="false"/></c:set>
<c:if test="${showEdits or (( empty entity.citation and !empty editLinksForNew) or ( ! empty entity.citation and !empty editLinksForExisting)) }">
<h3 class="propertyName">citation</h3>
${editLinksForNew}
<c:set var="mayEditCitation" value="${showEdits and (( empty entity.citation and !empty editLinksForNew) or ( ! empty entity.citation and !empty editLinksForExisting)) }"/>
<c:if test="${ !empty entity.citation || mayEditCitation }">
<div id="dprop-vitro-citation" class="propsItem ${editingClass}">
<h3 class="propertyName">citation</h3> ${editLinksForNew}
</c:if>
<c:if test="${!empty entity.citation}">
<div class="datatypeProperties">
<div class="datatypePropertyValue">
@ -26,5 +29,7 @@
</div>
</div>
</c:if>
<c:if test="${ !empty entity.citation || mayEditCitation }">
</div>
</c:if>
</c:if>