diff --git a/productMods/templates/entity/entityBasic.jsp b/productMods/templates/entity/entityBasic.jsp deleted file mode 100644 index 4b43c06a..00000000 --- a/productMods/templates/entity/entityBasic.jsp +++ /dev/null @@ -1,318 +0,0 @@ -<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> - -<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.VClass" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditConfiguration" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditSubmission" %> -<%@ page import="edu.cornell.mannlib.vedit.beans.LoginFormBean" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest"%> -<%@ page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Link" %> - -<%@ page import="org.apache.commons.logging.Log" %> -<%@ page import="org.apache.commons.logging.LogFactory" %> - -<%@ page import="java.util.List" %> - -<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> -<%@ taglib uri="http://vitro.mannlib.cornell.edu/vitro/tags/StringProcessorTag" prefix="p" %> -<%@ taglib uri="http://vitro.mannlib.cornell.edu/vitro/tags/PropertyEditLink" prefix="edLnk" %> - -<%@ page errorPage="/error.jsp"%> -<%! -public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.templates.entity.entityBasic.jsp"); -%> -<% - log.debug("Starting entityBasic.jsp"); - Individual entity = (Individual)request.getAttribute("entity"); -%> - - - - - - - - <% - try { - VitroRequest vreq = new VitroRequest(request); - entity = vreq.getWebappDaoFactory().getIndividualDao().getIndividualByURI((String)request.getAttribute("myEntityURI")); - } catch (Exception e) { - e.printStackTrace(); - } - %> - - -<% - -if (entity == null){ - String e="entityBasic.jsp expects that request attribute 'entity' be set to the Entity object to display."; - throw new JspException(e); -} - -if (VitroRequestPrep.isSelfEditing(request) || LoginFormBean.loggedIn(request, LoginFormBean.NON_EDITOR) /* minimum level*/) { - request.setAttribute("showSelfEdits",Boolean.TRUE); -}%> - - - - - - - - -<% - //anytime we are at an entity page we shouldn't have an editing config or submission - session.removeAttribute("editjson"); - EditConfiguration.clearAllConfigsInSession(session); - EditSubmission.clearAllEditSubmissionsInSession(session); -%> - -<%/* just moving this into page scope for easy use */ %> - - - - - - - -
-
- - -
- -
- - -

${relatingPredicate.domainPublic} for ${relatedSubject.name}

- - - - -

← return to ${relatedSubject.name}

-
- - - <%-- Label --%> -
-
-

${entity.name}

- - - ${editLinks} - -
-
- - <%-- Moniker--%> - -
-
-
- ${entity.moniker} -
-
-
-
- -
-
-
- - - - - - <%-- Thumbnail --%> - - - - - - -
-

image

- ${imageLinks} -
-
-
- -
-
-
-
- - - ${imageLinks} - -
-
-
-
-
- <%-- hasImage --%> -
-
-
-
- - - - - ${imageLinks} - -
-
-
-
- -
-
- - <%-- Links --%> - - - - - <%-- Description --%> - <%-- - - - - - - - - -
-

description

${editLinksForNewDesc} - - - -
-
-
-
${entity.description}
- - ${editLinksForExistingDesc} - -
-
-
-
- -
-
-
- --%> - - <%-- Ontology properties --%> - - - - <%-- unless a value is provided, properties not assigned to a group will not have a tab or appear on the page --%> - - - - <%-- Blurb --%> - -
-
-
-
${entity.blurb}
-
-
-
-
- - <%-- Citation, if no thumbnail --%> - - - - - <%-- Keywords --%> - -

Keywords: ${entity.keywordString}

-
- - ${requestScope.servletButtons} - - -
-
-
- - - - diff --git a/productMods/templates/entity/entityMergedPropsList.jsp b/productMods/templates/entity/entityMergedPropsList.jsp deleted file mode 100644 index e80948fe..00000000 --- a/productMods/templates/entity/entityMergedPropsList.jsp +++ /dev/null @@ -1,376 +0,0 @@ -<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> - -<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> -<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> -<%@ taglib uri="http://vitro.mannlib.cornell.edu/vitro/tags/PropertyEditLink" prefix="edLnk" %> -<%@ taglib uri="http://vitro.mannlib.cornell.edu/vitro/tags/StringProcessorTag" prefix="p" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Portal" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.PropertyInstanceDao" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.DataPropertyDao" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.PropertyInstance" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Property" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.KeywordProperty" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.PropertyGroup" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.PropertyGroupDao" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.ObjectPropertyStatement" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.ObjectPropertyDao" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.DataProperty" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.RdfLiteralHash" %> -<%@ page import="java.util.Collection" %> -<%@ page import="java.util.Collections" %> -<%@ page import="java.util.Comparator" %> -<%@ page import="java.util.List" %> -<%@ page import="java.util.ArrayList" %> -<%@ page import="java.util.Iterator" %> -<%@ page import="java.util.HashSet" %> -<%@ page import="org.apache.commons.logging.Log" %> -<%@ page import="org.apache.commons.logging.LogFactory" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep" %> -<%@ page import="edu.cornell.mannlib.vedit.beans.LoginFormBean" %> - -<%@page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils"%> -<%! -public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.templates.entity.entityMergedPropsList.jsp"); -%> -<% if( VitroRequestPrep.isSelfEditing(request) ) { - log.debug("setting showSelfEdits true");%> - -<% } - if (loginHandler!=null && loginHandler.getLoginStatus()=="authenticated" && Integer.parseInt(loginHandler.getLoginRole())>=loginHandler.getNonEditor()) { - log.debug("setting showCuratorEdits true");%> - - -<% } - String unassignedPropGroupName=null; - String unassignedName = (String) request.getAttribute("unassignedPropsGroupName"); - if (unassignedName != null && unassignedName.length()>0) { - unassignedPropGroupName=unassignedName; - log.debug("found temp group attribute \""+unassignedName+"\" for unassigned properties"); - }%> - <%-- just moving this into page scope for easy use --%> - <%-- likewise --%> - -<% Individual subject = (Individual) request.getAttribute("entity"); - if (subject==null) { - throw new Error("Subject individual must be in request scope for entityMergedPropsList.jsp"); - } - - - // Nick wants not to use explicit parameters to trigger visibility of a div, but for now we don't just want to always show the 1st one - String openingGroupLocalName = (String) request.getParameter("curgroup"); - VitroRequest vreq = new VitroRequest(request); - // added to permit distinguishing links outside the current portal - int currentPortalId = -1; - Portal currentPortal = vreq.getPortal(); - if (currentPortal!=null) { - currentPortalId = currentPortal.getPortalId(); - } - - WebappDaoFactory wdf = vreq.getWebappDaoFactory(); - PropertyGroupDao pgDao = wdf.getPropertyGroupDao(); - ArrayList groupsList = (ArrayList) request.getAttribute("groupsList"); - if (groupsList!=null && groupsList.size()>0) { // first do the list of headers - if (groupsList.size()==1) { - for (PropertyGroup pg : groupsList) { - if (unassignedPropGroupName != null && !unassignedPropGroupName.equalsIgnoreCase(pg.getName())) { - log.debug("only one group ["+pg.getName() +"] so rendering without group headers"); - } - request.setAttribute("mergedList",pg.getPropertyList()); - } - %><% - return; - }%> - - <%-- -
    -<% for (PropertyGroup pg : groupsList ) { - if (openingGroupLocalName == null || openingGroupLocalName.equals("")) { - openingGroupLocalName = pg.getLocalName(); - } - String styleStr = "display: inline;"; - if (openingGroupLocalName.equals(pg.getLocalName())) {%> -
  • <%=pg.getName()%>
  • -<% } else { %> -
  • <%=pg.getName()%>
  • -<% } - } %> -
- --%> - - -<% // now display the properties themselves, by group - for (PropertyGroup g : groupsList) {%> - - - - - - <%-- Getting the count of properties in each group --%> - - - <% int propTotal = g.getPropertyList().size(); %> - - - -
-

<%=g.getName()%>

-
-<% for (Property p : g.getPropertyList()) {%> -<% if (p instanceof ObjectProperty) { - ObjectProperty op = (ObjectProperty)p;%> - - - - - - - - - - - <%-- rjy7 We have a logic problem here: if the custom short view dictates that the item NOT be rendered, - and because of this there are NO items to render, we shouldn't show the label when not in edit mode. - Example: people ( = positionHistory) of an organization don't render if the position end date is in the past. - So the organization might not have any current people, in which case we shouldn't show the "people" label. - We need to compute objRows on the basis of the rendering, not the number of objectPropertyStatements. - See NIHVIVO-512. --%> - - - - <%-- nac26 Changing the test on objRows here to be GTE so that properties marked with an update level of "nobody" are still rendered --%> - - - -
-

${objProp.editLabel}

- - <%-- Verbose property display additions for object properties, using context variable verbosePropertyListing --%> - - - - - - - - - - - - - - - - - - - - - - - - <% PropertyGroup pg = pgDao.getGroupByURI(op.getGroupURI()); - if (pg!=null && pg.getName()!=null) { - request.setAttribute("groupName",pg.getName());%> - ${localName} (object property); display tier ${displayTier} within group ${groupName}; display level: ${displayCue}; update level: ${updateCue} - <% } else {%> - ${localName} (object property); display tier ${displayTier}; display level: ${displayCue}; update level: ${updateCue} - <% } %> - - - ${localName} (object property); display tier ${displayTier}; display level: ${displayCue}; update level: ${updateCue} - - - - <%-- end Verbose property display additions for object properties --%> - - - - - <% /* arbitrary limit if value is unset, i.e. -1 */ %> - - - -
    - - -
  • - - - - - - - <% String customShortView = MiscWebUtils.getCustomShortView(request); %> - - - - - - - - - - - - - - - - - - - - ${editLinks} - (non-editable) - -
  • -
    -
-
-
-<% } else if (p instanceof DataProperty) { - DataProperty dp = (DataProperty)p;%> - - - - - - - - - - - -
-

${dataProp.editLabel}

- - - - <%-- just put in a single "edit" link, not an "add" link that expands to reveal edit/delete links --%> - - ${editLinks} - (non-editable) - - <%-- creates an add link, even if displayLimit is unset, i.e. -1 --%> - - - - - - <%-- Verbose property display additions for data properties, using context variable verbosePropertyListing --%> - - - - - - - - - - - - - - - - - - - - - - - - <% PropertyGroup pg = pgDao.getGroupByURI(dp.getGroupURI()); - if (pg!=null && pg.getName()!=null) { - request.setAttribute("groupName",pg.getName());%> - ${localName} (data property); display tier ${displayTier} within group ${groupName}; display level: ${displayCue}; update level: ${updateCue} - <% } else {%> - ${localName} (data property); display tier ${displayTier}; display level: ${displayCue}; update level: ${updateCue} - <% } %> - - - ${localName} (data property); display tier ${displayTier}; display level: ${displayCue}; update level: ${updateCue} - - - - <%-- end Verbose property display additions for data properties --%> - - - <%-- set to an arbitrary but high positive limit if unset on property, i.e. -1 --%> - - - - <%-- don't leave just one statement to expand --%> - - - <%-- c:if test="${displayLimit < 0}"> - -
-
    -
    - - - - - - ${dataPropertyStmt.data} - - - ${editLinks} - (non-editable) - - - - -
  • - ${dataPropertyStmt.data} - - - - ${editLinks} - (non-editable) - - -
  • -
    -
    -
    -
    - -
    -
- -
-
-
- -<% } else { // keyword property -- ignore - if (p instanceof KeywordProperty) {%> -

Not expecting keyword properties here.

-<% } else { - log.warn("unexpected unknown property type found");%> -

Unknown property type found

-<% } - } - - %><% - - } // end for (Property p : g.getPropertyList() - %> -
-
-
- - back to top - -<% } // end for (PropertyGroup g : groupsList) - } else { - log.debug("incoming groups list with merged properties not found as request attribute for subject "+subject.getName()+"\n"); - } -%> \ No newline at end of file