NIHVIVO-379 Merge vitro nihvivo-rel-1.0 r4753, vitro rel-1.0-maint r477: Remove front end editing capabilities from moniker, blurb, and citation.

This commit is contained in:
rjy7 2010-04-14 15:09:12 +00:00
parent 4965958602
commit 16496437c9
2 changed files with 34 additions and 97 deletions

View file

@ -117,31 +117,17 @@ if (VitroRequestPrep.isSelfEditing(request) || LoginFormBean.loggedIn(request, L
</div> </div>
</div> </div>
<%-- Moniker. Wrap in the div only if editing. If not editing, displays inline next to label. --%> <%-- Moniker--%>
<c:if test="${showEdits}">
<c:set var="monikerAddLinks"><edLnk:editLinks item="<%= VitroVocabulary.MONIKER %>" icons="false"/></c:set>
<c:if test="${!empty monikerAddLinks }">
<div id="dprop-vitro-moniker" class="propsItem ${editingClass}">
<h3 class="propertyName">moniker</h3>${monikerAddLinks}
</c:if>
</c:if>
<c:if test="${!empty entity.moniker}"> <c:if test="${!empty entity.moniker}">
<div class="datatypeProperties"> <div class="datatypeProperties">
<div class="datatypePropertyValue" id="moniker"> <div class="datatypePropertyValue" id="moniker">
<div class="statementWrap"> <div class="statementWrap">
<p:process><em class="moniker">${entity.moniker}</em></p:process> <p:process><em class="moniker">${entity.moniker}</em></p:process>
<c:if test="${showEdits}">
<c:set var="editLinks"><edLnk:editLinks item="<%= VitroVocabulary.MONIKER %>" data="${entity.moniker}" icons="false"/></c:set>
<c:if test="${!empty editLinks}"><span class="editLinks">${editLinks}</span></c:if>
</c:if>
</div> </div>
</div> </div>
</div> </div>
</c:if> </c:if>
<c:if test="${showEdits && !empty monikerEditLinks}"></div></c:if> <%-- end dprop-vitro-moniker --%>
</c:otherwise> </c:otherwise>
</c:choose> </c:choose>
</div> <!-- end labelAndMoniker --> </div> <!-- end labelAndMoniker -->
@ -240,45 +226,12 @@ if (VitroRequestPrep.isSelfEditing(request) || LoginFormBean.loggedIn(request, L
</div> </div>
<%-- Citation --%> <%-- Citation --%>
<jsp:include page="entityCitation.jsp"> <jsp:include page="entityCitation.jsp" />
<jsp:param name="showEdits" value="${showEdits}" />
</jsp:include>
</c:if> </c:if>
</div> </div>
</c:if> </c:if>
<%-- Blurb --%>
<c:if test="${showEdits || !empty entity.blurb}">
<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: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">
<div class="statementWrap">
<div class="description"><p:process>${entity.blurb}</p:process></div>
<c:if test="${showEdits && !empty editLinksForExistingBlurb}">
<span class="editLinks">${editLinksForExistingBlurb}</span>
</c:if>
</div>
</div>
</div>
</c:if>
<c:if test="${ mayEditBlurb || ! empty entity.blurb }">
</div>
</c:if>
</c:if>
<%-- Description --%> <%-- Description --%>
<c:if test="${ showEdits || !empty entity.description}"> <c:if test="${ showEdits || !empty entity.description}">
<c:if test="${not empty entity.description }"> <c:if test="${not empty entity.description }">
@ -310,8 +263,7 @@ if (VitroRequestPrep.isSelfEditing(request) || LoginFormBean.loggedIn(request, L
</c:if> </c:if>
<%-- Ontology properties --%>
<%-- Properties --%>
<c:import url="${entityMergedPropsListJsp}"> <c:import url="${entityMergedPropsListJsp}">
<c:param name="mode" value="${showEdits ? 'edit' : ''}"/> <c:param name="mode" value="${showEdits ? 'edit' : ''}"/>
<c:param name="grouped" value="false"/> <c:param name="grouped" value="false"/>
@ -319,21 +271,27 @@ if (VitroRequestPrep.isSelfEditing(request) || LoginFormBean.loggedIn(request, L
<c:param name="unassignedPropsGroupName" value=""/> <c:param name="unassignedPropsGroupName" value=""/>
</c:import> </c:import>
<p:process> <%-- Blurb --%>
<c:if test="${!empty entity.blurb}">
<div class="datatypeProperties">
<div class="datatypePropertyValue">
<div class="statementWrap">
<p:process><div class="description">${entity.blurb}</div></p:process>
</div>
</div>
</div>
</c:if>
<%-- Citation, if no thumbnail --%> <%-- Citation, if no thumbnail --%>
<c:if test="${empty entity.imageThumb}"> <c:if test="${empty entity.imageThumb}">
<jsp:include page="entityCitation.jsp"> <jsp:include page="entityCitation.jsp" />
<jsp:param name="showEdits" value="${showEdits}" />
</jsp:include>
</c:if> </c:if>
<%-- Keywords --%> <%-- Keywords --%>
<c:if test="${!empty entity.keywordString}"> <c:if test="${!empty entity.keywordString}">
<p id="keywords">Keywords: ${entity.keywordString}</p> <p:process><p id="keywords">Keywords: ${entity.keywordString}</p></p:process>
</c:if> </c:if>
</p:process>
${requestScope.servletButtons} ${requestScope.servletButtons}
<!-- <!--

View file

@ -1,35 +1,14 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> <%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary" %>
<%@ taglib uri="http://vitro.mannlib.cornell.edu/vitro/tags/PropertyEditLink" prefix="edLnk" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<c:if test="${showEdits || !empty entity.citation}">
<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: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}"> <c:if test="${!empty entity.citation}">
<div class="datatypeProperties"> <div class="datatypeProperties">
<div class="datatypePropertyValue"> <div class="datatypePropertyValue">
<div class="statementWrap"> <div class="statementWrap">
<p:process>${entity.citation}</p:process> <p:process><div class="citation">${entity.citation}</div></p:process>
<c:if test="${showEdits && !empty editLinksForExisting}">
<span class="editLinks">${editLinksForExisting}</span>
</c:if>
</div> </div>
</div> </div>
</div> </div>
</c:if> </c:if>
<c:if test="${ !empty entity.citation || mayEditCitation }">
</div>
</c:if>
</c:if>