NIHVIVO-147 Moved citation display to a separate jsp, since it's used twice in entityBasic.jsp.

Renamed some siteAdmin jsp files.
This commit is contained in:
rjy7 2010-03-24 15:39:02 +00:00
parent 15e45f4474
commit ac1a9d4cb4
5 changed files with 116 additions and 105 deletions

View file

@ -79,8 +79,8 @@ public class SiteAdminController extends BaseEditController {
request.setAttribute("singlePortal",new Boolean(vreq.getWebappDaoFactory().getPortalDao().isSinglePortal())); request.setAttribute("singlePortal",new Boolean(vreq.getWebappDaoFactory().getPortalDao().isSinglePortal()));
RequestDispatcher rd = request.getRequestDispatcher(Controllers.BASIC_JSP); RequestDispatcher rd = request.getRequestDispatcher(Controllers.BASIC_JSP);
request.setAttribute("bodyJsp","/siteAdmin/main.jsp"); request.setAttribute("bodyJsp","/siteAdmin/siteAdminMain.jsp");
request.setAttribute("scripts","/siteAdmin/scripts.jsp"); request.setAttribute("scripts","/siteAdmin/siteAdminScripts.jsp");
request.setAttribute("title",((Portal)request.getAttribute("portalBean")).getAppName() + " Site Administration"); request.setAttribute("title",((Portal)request.getAttribute("portalBean")).getAppName() + " Site Administration");
request.setAttribute("epoKey",epo.getKey()); request.setAttribute("epoKey",epo.getKey());
try { try {

View file

@ -60,8 +60,8 @@ if (VitroRequestPrep.isSelfEditing(request) || LoginFormBean.loggedIn(request, L
<c:set var="showCuratorEdits" value="${true}"/> <c:set var="showCuratorEdits" value="${true}"/>
</c:if> </c:if>
<c:set var="showEdits" value="${showSelfEdits || showCuratorEdits}" /> <c:set var="showEdits" value="${showSelfEdits || showCuratorEdits}" scope="request"/>
<c:set var="editingClass" value="${showEdits ? 'editing' : ''}" /> <c:set var="editingClass" value="${showEdits ? 'editing' : ''}" scope="request"/>
<c:set var='imageDir' value='images' /> <c:set var='imageDir' value='images' />
<c:set var="themeDir"><c:out value="${portalBean.themeDir}" /></c:set> <c:set var="themeDir"><c:out value="${portalBean.themeDir}" /></c:set>
@ -125,7 +125,7 @@ RY Description not working - FIX
<%-- Moniker. Wrap in the div only if editing. If not editing, displays inline next to label. --%> <%-- Moniker. Wrap in the div only if editing. If not editing, displays inline next to label. --%>
<c:if test="${showEdits}"> <c:if test="${showEdits}">
<div id="dprop-vitro-moniker" class="propsItem editing"> <div id="dprop-vitro-moniker" class="propsItem ${editingClass}">
<h3 class="propertyName">moniker</h3> <h3 class="propertyName">moniker</h3>
<edLnk:editLinks item="<%= VitroVocabulary.MONIKER %>" icons="false"/> <edLnk:editLinks item="<%= VitroVocabulary.MONIKER %>" icons="false"/>
</c:if> </c:if>
@ -149,91 +149,86 @@ RY Description not working - FIX
</div> <!-- end labelAndMoniker --> </div> <!-- end labelAndMoniker -->
<%-- Links --%> <%-- Links --%>
<c:if test="${ (!empty entity.anchor) || (!empty entity.linksList) }"> <c:if test="${ showEdits || !empty entity.anchor || !empty entity.linksList }">
<div class="datatypePropertyValue"> <div id="dprop-vitro-link" class="propsItem ${editingClass}">
<div class="statementWrap"> <c:if test="${showEdits}">
<ul class="externalLinks"> <h3 class="propertyName">links</h3>
<c:if test="${!empty entity.anchor}"> <edLnk:editLinks item="<%= VitroVocabulary.LINK_ANCHOR %>" icons="false" />
<c:choose> </c:if>
<c:when test="${!empty entity.url}"> <div class="datatypeProperties">
<c:url var="entityUrl" value="${entity.url}" /> <div class="datatypePropertyValue">
<li class="primary"><a class="externalLink" href="<c:out value="${entityUrl}"/>"><p:process>${entity.anchor}</p:process></a></li> <div class="statementWrap">
</c:when> <ul class="externalLinks">
<c:otherwise> <c:if test="${!empty entity.anchor}">
<li class="primary"><span class="externalLink"><p:process>${entity.anchor}</p:process></span></li> <c:choose>
</c:otherwise> <c:when test="${!empty entity.url}">
</c:choose> <c:url var="entityUrl" value="${entity.url}" />
<%-- <li class="primary"><a class="externalLink" href="<c:out value="${entityUrl}"/>"><p:process>${entity.anchor}</p:process></a></li>
<c:if test="${showEdits}"> </c:when>
<c:set var="editLinks"><edLnk:editLinks item="<%= VitroVocabulary.LINK_ANCHOR %>" data="${entity.anchor}" icons="false"/></c:set> <c:otherwise>
<c:if test="${!empty editLinks}"><span class="editLinks">${editLinks}</span></c:if> <li class="primary"><span class="externalLink"><p:process>${entity.anchor}</p:process></span></li>
</c:if> </c:otherwise>
--%> </c:choose>
</c:if> <%--
<c:if test="${!empty entity.linksList }"> <c:if test="${showEdits}">
<c:forEach items="${entity.linksList}" var='link' varStatus="count"> <c:set var="editLinks"><edLnk:editLinks item="<%= VitroVocabulary.LINK_ANCHOR %>" data="${entity.anchor}" icons="false"/></c:set>
<c:url var="linkUrl" value="${link.url}" /> <c:if test="${!empty editLinks}"><span class="editLinks">${editLinks}</span></c:if>
<c:choose> </c:if>
<c:when test="${empty entity.url && count.first==true}"><li class="first"></c:when> --%>
<c:otherwise><li></c:otherwise> </c:if>
</c:choose> <c:if test="${!empty entity.linksList }">
<a class="externalLink" href="<c:out value="${linkUrl}"/>"><p:process>${link.anchor}</p:process></a></li> <c:forEach items="${entity.linksList}" var='link' varStatus="count">
</c:forEach> <c:url var="linkUrl" value="${link.url}" />
</c:if> <c:choose>
</ul> <c:when test="${empty entity.url && count.first==true}"><li class="first"></c:when>
<c:otherwise><li></c:otherwise>
</c:choose>
<a class="externalLink" href="<c:out value="${linkUrl}"/>"><p:process>${link.anchor}</p:process></a></li>
</c:forEach>
</c:if>
</ul>
</div>
</div>
</div> </div>
</div> </div>
</c:if> </c:if>
<%-- Thumbnail (with citation) --%> <%-- Thumbnail (with citation) --%>
<div id="dprop-vitro-image" class="propsItem ${editingClass}"> <c:if test="${showEdits || !empty entity.imageThumb}">
<c:if test="${showEdits}"> <div id="dprop-vitro-image" class="propsItem ${editingClass}">
<h3 class="propertyName">image</h3> <c:if test="${showEdits}">
<edLnk:editLinks item="<%= VitroVocabulary.IMAGETHUMB %>" icons="false" /> <h3 class="propertyName">image</h3>
</c:if> <edLnk:editLinks item="<%= VitroVocabulary.IMAGETHUMB %>" icons="false" />
<c:if test="${!empty entity.imageThumb}"> </c:if>
<div class="datatypeProperties"> <c:if test="${!empty entity.imageThumb}">
<div class="datatypePropertyValue"> <div class="datatypeProperties">
<div class="statementWrap thumbnail"> <div class="datatypePropertyValue">
<c:set var="imageTitle" value="${entity.name}" /> <div class="statementWrap thumbnail">
<c:if test="${!empty entity.imageFile}"> <c:set var="imageTitle" value="${entity.name}" />
<c:url var="imageUrl" value="/${imageDir}/${entity.imageFile}" /> <c:if test="${!empty entity.imageFile}">
<a class="image" href="${imageUrl}"> <c:url var="imageUrl" value="/${imageDir}/${entity.imageFile}" />
<c:set var="imageTitle" value="click to view larger image in new window" /> <a class="image" href="${imageUrl}">
</c:if> <c:set var="imageTitle" value="click to view larger image in new window" />
<c:url var="imageSrc" value='/${imageDir}/${entity.imageThumb}'/> </c:if>
<img src="<c:out value="${imageSrc}"/>" title="${imageTitle}" alt="" width="150"/> <c:url var="imageSrc" value='/${imageDir}/${entity.imageThumb}'/>
<c:if test="${!empty entity.imageFile}"></a></c:if> <img src="<c:out value="${imageSrc}"/>" title="${imageTitle}" alt="" width="150"/>
<c:if test="${showEdits}"> <c:if test="${!empty entity.imageFile}"></a></c:if>
<c:set var="editLinks"><edLnk:editLinks item="<%= VitroVocabulary.IMAGETHUMB %>" data="${entity.imageThumb}" icons="false"/></c:set> <c:if test="${showEdits}">
<c:if test="${!empty editLinks}"><span class="editLinks">${editLinks}</span></c:if> <c:set var="editLinks"><edLnk:editLinks item="<%= VitroVocabulary.IMAGETHUMB %>" data="${entity.imageThumb}" icons="false"/></c:set>
</c:if> <c:if test="${!empty editLinks}"><span class="editLinks">${editLinks}</span></c:if>
</div> </c:if>
</div> </div>
</div> </div>
</div>
<%-- Citation --%> <%-- Citation --%>
<div id="dprop-vitro-citation" class="propsItem ${editingClass}"> <jsp:include page="entityCitation.jsp">
<c:if test="${showEdits}"> <jsp:param name="showEdits" value="${showEdits}" />
<h3 class="propertyName">citation</h3> </jsp:include>
<edLnk:editLinks item="<%= VitroVocabulary.CITATION %>" icons="false"/>
</c:if> </c:if>
<c:if test="${!empty entity.citation}"> </div>
<div class="datatypeProperties"> </c:if>
<div class="datatypePropertyValue">
<div class="statementWrap">
${entity.citation}
<c:if test="${showEdits}">
<c:set var="editLinks"><edLnk:editLinks item="<%= VitroVocabulary.CITATION %>" data="${entity.citation}" icons="false"/></c:set>
<c:if test="${!empty editLinks}"><span class="editLinks">${editLinks}</span></c:if>
</c:if>
</div>
</div>
</div>
</c:if>
</div>
</c:if>
</div>
<p:process> <p:process>
@ -295,31 +290,20 @@ RY Description not working - FIX
<p:process> <p:process>
<%-- Citation, if no thumbnail --%> <%-- Citation, if no thumbnail --%>
<c:if test="${empty entity.imageThumb}"> <c:if test="${empty entity.imageThumb}">
<div id="dprop-vitro-citation" class="propsItem ${editingClass}"> <jsp:include page="entityCitation.jsp">
<c:if test="${showEdits}"> <jsp:param name="showEdits" value="${showEdits}" />
<h3 class="propertyName">citation</h3> </jsp:include>
<edLnk:editLinks item="<%= VitroVocabulary.CITATION %>" icons="false"/> </c:if>
</c:if>
<c:if test="${!empty entity.citation}"> <%-- Keywords --%>
<div class="datatypeProperties">
<div class="datatypePropertyValue">
<div class="statementWrap">
${entity.citation}
<c:if test="${showEdits}">
<c:set var="editLinks"><edLnk:editLinks item="<%= VitroVocabulary.CITATION %>" data="${entity.citation}" icons="false"/></c:set>
<c:if test="${!empty editLinks}"><span class="editLinks">${editLinks}</span></c:if>
</c:if>
</div>
</div>
</div>
</c:if>
</div>
</c:if>
<c:if test="${!empty entity.keywordString}"> <c:if test="${!empty entity.keywordString}">
<p id="keywords">Keywords: ${entity.keywordString}</p> <p id="keywords">Keywords: ${entity.keywordString}</p>
</c:if> </c:if>
</p:process> </p:process>
${requestScope.servletButtons} ${requestScope.servletButtons}
</div> <!-- contents --> </div> <!-- contents -->
</div> <!-- content --> </div> <!-- content -->

View file

@ -0,0 +1,27 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary" %>
<%@ 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="${showEdits}">
<h3 class="propertyName">citation</h3>
<edLnk:editLinks item="<%= VitroVocabulary.CITATION %>" icons="false"/>
</c:if>
<c:if test="${!empty entity.citation}">
<div class="datatypeProperties">
<div class="datatypePropertyValue">
<div class="statementWrap">
${entity.citation}
<c:if test="${showEdits}">
<c:set var="editLinks"><edLnk:editLinks item="<%= VitroVocabulary.CITATION %>" data="${entity.citation}" icons="false"/></c:set>
<c:if test="${!empty editLinks}"><span class="editLinks">${editLinks}</span></c:if>
</c:if>
</div>
</div>
</div>
</c:if>
</div>
</c:if>