Improve output: distinguish between failed assertions (failures) and unexpected exceptions (errors), and print a filtered stack trace for any exception.

This commit is contained in:
jeb228 2010-01-29 22:13:57 +00:00
commit 4f2e303079
1839 changed files with 235630 additions and 0 deletions

View file

@ -0,0 +1,4 @@
templates directory is for jsp files that are used
to format data. They are views, templates and such.
bdc34.

View file

@ -0,0 +1,48 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page import="org.apache.commons.logging.Log" %>
<%@ page import="org.apache.commons.logging.LogFactory" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Portal" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %><%/* this odd thing points to something in web.xml */ %>
<%@ page errorPage="/error.jsp"%>
<% /***********************************************
alphaIndex.jsp will just display the just the index, no entites.
request attributres:
'alpha' - set to currently displaying alpha, 'none' or 'all'
'tabParam' - parameter for tab
'count' - count of entites in the index
'letters' - List of STrings, letters for index.
'servlet' - name of servlet to put in links.
put something like this in for debuggin: < % = MiscWebUtils.getReqInfo(request) % >
bdc34 2006-02-06
**********************************************/
/***************************************************
nac26 2008-05-09 following brian's lead from menu.jsp to get the portalId so it can be added to the alpha index links */
final Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.web.alphaIndex.jsp");
Portal portal = (Portal)request.getAttribute("portalBean");
int portalId = -1;
if (portal==null) {
log.error("Attribute 'portalBean' missing or null; portalId defaulted to 1");
portalId=1;
} else {
portalId=portal.getPortalId();
}
/**************************************************/
%>
<c:set var="portalId" value="<%=portalId%>" />
<c:if test="${requestScope.alpha != 'none'}">
<div class='alphaIndex'>
<c:forEach items='${requestScope.letters}' var='letter'>
<a <c:if test="${letter == requestScope.alpha}">class='selected' </c:if> href='<c:url value=".${requestScope.servlet}?home=${portalId}&amp;alpha=${letter}&amp;${requestScope.tabParam}"/>'>${letter} </a>
</c:forEach>
<c:if test='${not empty requestScope.count}'>
(${requestScope.count})
</c:if>
</div>
</c:if>

View file

@ -0,0 +1,85 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.VClassGroup,edu.cornell.mannlib.vitro.webapp.beans.VClass" %>
<%@ page import="java.net.URLEncoder" %>
<%@ page import="java.util.Collection" %>
<%@ page import="java.util.Iterator" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %><%/* this odd thing points to something in web.xml */ %>
<%@ page errorPage="/error.jsp"%>
<jsp:useBean id="loginHandler" class="edu.cornell.mannlib.vedit.beans.LoginFormBean" scope="session" />
<% /***********************************************
Display Browse Results (the "Index" menu command)
request.attributes:
a List with the name "classgroups"
collatedGroupNames
additionalParameterStr
request.parameters:
None yet.
Consider sticking < % = MiscWebUtils.getReqInfo(request) % > in the html output
for debugging info.
**********************************************/
if (request.getAttribute("classgroups") == null){
String e="browsesGroup.jsp expects that request attribute 'classgroups' be set to a List of classgroups to display.";
throw new JspException(e);
}
if (request.getAttribute("portalState") == null){
String e="browsesGroup.jsp expects that request attribute 'portalState' be set to a portal state [PortalFlag] object.";
throw new JspException(e);
}
String additionalParameterStr = ""; //we expect this to already be encoded as a url.
if(request.getAttribute("passthru") != null){
additionalParameterStr = (String)request.getAttribute("passthru");
}
if( request.getAttribute("classgroupsIsEmpty") != null && ((Boolean)request.getAttribute("classgroupsIsEmpty")) == true){
%>
<div id="content" class="siteMap">
<p>There not yet any items in the system.</p>
</div> <!-- content -->
<% } else { %>
<div id="content" class="siteMap">
<form name="filterForm" action="browsecontroller" method="post" class="padded" >
<jsp:include page="portalFlagChoices.jsp" flush="true" >
<jsp:param name="action" value="browse" />
</jsp:include>
</form>
<%
Collection classgroupList = (Collection) request.getAttribute("classgroups");
if (classgroupList != null) {
Iterator groupIter = classgroupList.iterator();
Object groupObj = null;
while (groupIter.hasNext()) {
groupObj = groupIter.next();
if (groupObj != null && groupObj instanceof VClassGroup) {
VClassGroup theGroup = (VClassGroup) groupObj; %>
<h2><%=theGroup.getPublicName()%></h2>
<% if (theGroup.getVitroClassList()!=null && theGroup.getVitroClassList().size()>0) {%>
<ul>
<% Iterator classIter=theGroup.getVitroClassList().iterator();
Object classObj=null;
while (classIter.hasNext()) {
classObj = classIter.next();
if (classObj!=null && classObj instanceof VClass) {
VClass theClass=(VClass)classObj;
String linkStr=response.encodeURL("entitylist");
if (theClass.getURI() == null)
theClass.setURI("null://null");
String queryStr="?vclassId="+URLEncoder.encode(theClass.getURI(),"UTF-8")+additionalParameterStr; %>
<li><a href="<%=linkStr+queryStr%>"><%=theClass.getName()%></a> (<%=theClass.getEntityCount()%>)</li>
<% }
}%>
</ul>
<% } else {%>
<ul><li>no entities</li></ul>
<% }
}
}
}%>
</div> <!-- content -->
<% } %>

View file

@ -0,0 +1,201 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page import="java.lang.Integer"%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.flags.PortalFlagChoices" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.flags.AuthFlag" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.flags.PortalFlag" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.ApplicationBean" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Portal" %>
<%@ page errorPage="/error.jsp"%>
<%
/***********************************************
Display A Form for filling out Portal Flags
request.attributes:
PortalFlag object via attribute "portalState".
request.parameters:
None yet.
Consider sticking < % = MiscWebUtils.getReqInfo(request) % > in the html output for debugging info.
This was written by jc55 and split into this file from browseGroups.jsp by bdc34.
**********************************************/
PortalFlag portalFilterState = (PortalFlag) request.getAttribute("portalFlag");
if (portalFilterState == null) {
String e = "portalFlagChoices.jsp expects that request attribute 'portalFlag' be set to a portal state [PortalFlag] object.";
throw new JspException(e);
}
AuthFlag authFlag = (AuthFlag) request.getAttribute("authFlag");
if (authFlag == null) {
String e = "portalFlagChoices.jsp expects that request attribute 'authFlag' be set to a authorization state [AuthFlag] object.";
throw new JspException(e);
}
ApplicationBean appBean = (ApplicationBean) request.getAttribute("appBean");
if (appBean == null) {
String e = "portalFlagChoices.jsp expects request attribute 'appBean' be set to an application bean object";
throw new JspException(e);
}
Portal portal = (Portal) request.getAttribute("portalBean");
if( portal == null )
portal = new Portal();
int portalId = portal.getPortalId();
%>
<script type="text/javascript" language="Javascript" >
//<!--
function submitFilterValue(element) {
if (element.value==-1) {
; // do nothing
} else {
document.filterForm.filter.value=element.value;
document.filterForm.submit();
}
}
function checkAllFlag1( whichForm ) {
if (whichForm.flag1.length) {
for (i=0; i<whichForm.flag1.length; i++) {
whichForm.flag1[i].checked="checked";
}
} else {
whichForm.flag1.checked="checked";
}
}
function unCheckAllFlag1( whichForm ) {
if (whichForm.flag1.length) {
for (i=0; i<whichForm.flag1.length; i++) {
whichForm.flag1[i].checked="";
}
} else {
whichForm.flag1.checked="";
}
}
function checkAllFlag2( whichForm ) {
if (whichForm.flag2.length) {
for (i=0; i<whichForm.flag2.length; i++) {
whichForm.flag2[i].checked="checked";
}
} else {
whichForm.flag2.checked="checked";
}
}
function unCheckAllFlag2( whichForm ) {
if (whichForm.flag2.length) {
for (i=0; i<whichForm.flag2.length; i++) {
whichForm.flag2[i].checked="";
}
} else {
whichForm.flag2.checked="";
}
}
function checkAllFlag3( whichForm ) {
if (whichForm.flag3.length) {
for (i=0; i<whichForm.flag3.length; i++) {
whichForm.flag3[i].checked="checked";
}
} else {
whichForm.flag3.checked="checked";
}
}
function unCheckAllFlag3( whichForm ) {
if (whichForm.flag3.length) {
for (i=0; i<whichForm.flag3.length; i++) {
whichForm.flag3[i].checked="";
}
} else {
whichForm.flag3.checked="";
}
}
//-->
</script>
<%
String width1Str=request.getParameter("width1");
int width1=14;
if (width1Str!=null && !width1Str.equals("")) {
try {
width1=Integer.parseInt(width1Str);
} catch (NumberFormatException ex) {
throw new JspException("Error: width1 parameter cannot be decoded as integer in portalFlagChoices.jsp");
}
}
%>
<div class="browseFilter">
<table width="100%" border="0" cellspacing="0" cellpadding="5" align="center" >
<%
// Draw the appropriate checkboxes if they have been populated
// We are dealing with 3 situations for showing portal options in browsing:
// #1 For normal browsing (not in one of the application's shared portals [the CALS research portals] the user has 2 radio button choices:
// ___ [portal appName] only OR ___ don't filter
//
// #2 When browsing in one of the application's shared portals [1 of the 4 CALS research portals or the composite "All CALS Research" portal],
// the user has the same number of checkbox choices as there are shared portals (e.g, 4 for CALS)
// Optionally limit to:
// ___ New life sciences ___ Environmental sciences ___ Land grant mission ___ Applied social sciences
//
// #3 When an editor has logged in and starts browsing, all portals with an id less <= the application's maxPortalId are always shown as options
// unless filters are turned completely off by an incoming request parameter
boolean haveFlag1Choices=false;
if (appBean.isFlag1Active()&& appBean.getFlag1List()!=null && appBean.getFlag1List().size()>1) {
if (portalFilterState.getFlag1DisplayStatus()==PortalFlag.SHOW_SHARED_PORTALS || authFlag.getUserSecurityLevel()>=ApplicationBean.FILTER_SECURITY_LEVEL) {
haveFlag1Choices=true;%>
<tr valign="top" align="left">
<td width="<%=width1%>%" class="form-item">
<input type="radio" name="omit1" value="false" <%=portalFilterState.getFlag1Exclusive()?"":"checked='checked'"%> /> limit to
<input type="radio" name="omit1" value="true" <%=portalFilterState.getFlag1Exclusive()?"checked='checked'":""%> /> omit
</td>
<td class="form-item">
<%=PortalFlagChoices.getFlag1Choices(portalFilterState,appBean,portalId)%>
</td></tr>
<% }
}
String actionStr=request.getParameter("action");
boolean haveFlag2Choices=false;
if (appBean.isFlag2Active() && appBean.getFlag2List()!=null
&& appBean.getFlag2List().size()>1
&& (actionStr==null || (actionStr.equals("browse") && authFlag.getUserSecurityLevel()>=ApplicationBean.FILTER_SECURITY_LEVEL))) {
haveFlag2Choices=true;%>
<tr valign="top" align="left">
<td class="form-item">
<input type="radio" name="omit2" value="false" <%=portalFilterState.getFlag2Exclusive()?"":"checked='checked'"%> /> limit to
<input type="radio" name="omit2" value="true" <%=portalFilterState.getFlag2Exclusive()?"checked='checked'":""%> /> omit
</td><td class="form-item">
<%=PortalFlagChoices.getFlag2Choices(portalFilterState, appBean)%>
</td></tr><%
}
boolean haveFlag3Choices=false;
if (appBean.isFlag3Active() && appBean.getFlag3List()!=null
&& appBean.getFlag3List().size()>1
&& (actionStr==null || (actionStr.equals("browse") && authFlag.getUserSecurityLevel()>=ApplicationBean.FILTER_SECURITY_LEVEL))) {
haveFlag3Choices=true;%>
<tr valign="top" align="left">
<td class="form-item">
<input type="radio" name="omit3" value="false" <%=portalFilterState.getFlag3Exclusive()?"":"checked='checked'"%> /> limit to
<input type="radio" name="omit3" value="true" <%=portalFilterState.getFlag3Exclusive()?"checked='checked'":""%> /> omit
</td><td class="form-item">
<%=PortalFlagChoices.getFlag3Choices(portalFilterState,appBean,portal)%>
</td></tr><%
}
//if (actionStr!=null && actionStr.equals("browse")){
if (haveFlag1Choices || haveFlag2Choices || haveFlag3Choices) {%>
<tr><td colspan="2">
<input type="radio" name="filter" value="true" onclick="submitFilterValue(this);" /> filter as indicated above
<% if (authFlag.getUserSecurityLevel()>=appBean.FILTER_SECURITY_LEVEL) {%>
<input type="radio" name="filter" value="false" onclick="submitFilterValue(this);" /> don't filter at all<%
}%>
</td></tr><%
}%>
</table>
</div><!--browseFilter-->

View file

@ -0,0 +1,3 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
${formHtml}

View file

@ -0,0 +1,115 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page isThreadSafe = "false" %>
<%@ page import="java.util.*,java.lang.String.*" %>
<% if (request.getAttribute("title") != null) { %>
<h2><%=request.getAttribute("title")%></h2>
<% } %>
<%
String headerStr = (String)request.getAttribute("header");
if ( headerStr == null || (!headerStr.equalsIgnoreCase("noheader")) ) { %>
<% } %>
<jsp:useBean id="results" class="java.util.ArrayList" scope="request" />
<jsp:useBean id="loginHandler" class="edu.cornell.mannlib.vedit.beans.LoginFormBean" scope="session"/>
<%
int rows = 0;
String minEditRoleStr = (String)request.getAttribute("min_edit_role");
String firstValue = "null";
Integer columnCount = (Integer)request.getAttribute("columncount");
rows = columnCount.intValue();
String clickSortStr = (String)request.getAttribute("clicksort");
if ( rows > 0 && results.size() > rows ) { // avoid divide by zero error in next statement
String suppressStr = null;
int columns = results.size() / rows;
if ( ( suppressStr = (String)request.getAttribute("suppressquery")) == null ) { // only inserted into request if true %>
<p><i><b><%= columns - 1 %></b> results were retrieved in <b><%= rows %></b> rows for query "<%=request.getAttribute("querystring")%>".</i></p>
<% }
if ( clickSortStr != null && clickSortStr.equals("true")) {
if ( columns > 2 ) { %>
<p><i>Click on the row header to sort columns by that row.</i></p>
<% }
} %>
<table border="0" cellpadding="2" cellspacing="0" width="100%">
<% String[] resultsArray = new String[results.size()]; // see Core Java Vol. 1 p.216
results.toArray( resultsArray );
firstValue = resultsArray[ rows ];
request.setAttribute("firstvalue",firstValue);
//secondValue= resultsArray[ rows + 1 ];
String classString = "";
boolean[] postQHeaderCols = new boolean[ columns ];
for ( int eachcol=0; eachcol < columns; eachcol++ ) {
postQHeaderCols[ eachcol ] = false;
}
for ( int thisrow = 0; thisrow < rows; thisrow++ ) {
//int currentPostQCol = 0;
boolean dropRow = false;
for ( int thiscol = 0; thiscol < columns; thiscol++ ) {
String thisResult= resultsArray[ (rows * thiscol) + thisrow ];
if ( "+".equals(thisResult) ) { /* occurs all in first row, so postQHeaderCols should be correctly initialized */
classString = "postheaderright";
postQHeaderCols[ thiscol ] = true;
//++currentPostQCol;
thisResult="&nbsp;";
} else if ( thisResult != null && thisResult.indexOf("@@")== 0) {
classString="postheadercenter";
thisResult ="query values"; //leave as follows for diagnostics: thisResult.substring(2);
thisResult = thisResult.substring(2);
} else {
if ( postQHeaderCols[ thiscol ] == true )
classString = "postheaderright";
else if ( thiscol == 1 && thisrow < 1 ) // jc55 was thisrow<2
classString = "rowbold";
else
classString = "row";
if ( thisResult == null || "".equals(thisResult) )
thisResult="&nbsp;";
}
if ( thiscol == 0 ) { // 1st column of new row
if ( thisrow > 0 ) { // first must close prior row %>
</tr>
<% if ("XX".equals(thisResult) ) {
dropRow = true;
} %>
<tr valign="top" class="rowvert"> <!-- okay to start even a dropRow because it will get no <td> elements -->
<% } else { %>
<tr valign="top" class="header"> <!-- okay to start even a dropRow because it will get no <td> elements -->
<% }
if ( !dropRow ) { %>
<td width="15%" class="verticalfieldlabel">
<%=thisResult%>
<% }
} else { // 2nd or higher column
if ( !dropRow ) { %>
<td class="<%=classString%>" >
<% if ("XX".equals(thisResult) ) { %>
<%="&nbsp;"%>
<% } else { %>
<%=thisResult%>
<% }
}
}
if ( !dropRow ) { %>
</td>
<% }
}
} %>
</tr>
</table>
<%
} else {
System.out.println("No results reported when " + rows + " rows and a result array size of " + results.size()); %>
No results retrieved for query "<%=request.getAttribute("querystring")%>".
<% Iterator errorIter = results.iterator();
while ( errorIter.hasNext()) {
String errorResult = (String)errorIter.next(); %>
<p>Error returned: <%= errorResult%></p>
<% }
} %>

View file

@ -0,0 +1,7 @@
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<script language="JavaScript" type="text/javascript">
function confirmDelete() {
var msg="Are you SURE you want to delete this record? If in doubt, CANCEL."
return confirm(msg);
}
</script>

View file

@ -0,0 +1,74 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div class="editingForm">
<c:set var="colspan">
<c:out value="${colspan}" default="3"/>
</c:set>
<c:set var="onSubmit">
<c:out value="${formOnSubmit}" default="return true;"/>
</c:set>
<c:set var="action">
<c:out value="${editAction}" default="doEdit"/>
</c:set>
<form id="editForm" name="editForm" action="${action}" method="post" onsubmit="${onSubmit}">
<input type="hidden" name="_epoKey" value="${epoKey}" />
<div align="center">
<table cellpadding="4" cellspacing="2">
<tr><th colspan="${colspan}">
<div class="entryFormHead">
<h2>${title}</h2>
<c:choose>
<c:when test='${_action == "insert"}'>
<h3>Creating New Record</h3>
</c:when>
<c:otherwise>
<h3>Editing Existing Record</h3>
</c:otherwise>
</c:choose>
<span class="entryFormHeadInstructions">(<sup>*</sup> Required Fields)</span>
</div><!--entryFormHead-->
</th></tr>
<tr><td><span class="warning">${globalErrorMsg}</span></td></tr>
<jsp:include page="${formJsp}"/>
<tr class="editformcell">
<td colspan="${colspan}" align="center">
<c:choose>
<c:when test='${_action == "insert"}'>
<input id="primaryAction" type="submit" class="form-button" name="_insert" value="Create New Record"/>
</c:when>
<c:otherwise>
<input id="primaryAction" type="submit" class="form-button" name="_update" value="Submit Changes"/>
<c:if test="${ ! (_cancelButtonDisabled == 'disabled') }">
<input type="submit" class="form-button" name="_delete" onclick="return confirmDelete();" value="Delete"/>
</c:if>
</c:otherwise>
</c:choose>
<input type="reset" class="form-button" value="Reset"/>
<c:choose>
<c:when test="${!empty formOnCancel}">
<input type="submit" class="form-button" name="_cancel" onclick="${formOnCancel}" value="Cancel"/>
</c:when>
<c:otherwise>
<input type="submit" class="form-button" name="_cancel" value="Cancel"/>
</c:otherwise>
</c:choose>
</td>
</tr>
</table>
</div><!--alignCenter-->
</form>
</div><!--editingform-->

View file

@ -0,0 +1,13 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<tr class="editformcell">
<td>
<b>all values from</b><br/>
<select name="ValueClass">
<form:option name="ValueClass"/>
<!-- TODO: button to create new anonymous class expression -->
</select>
</td>
</tr>

View file

@ -0,0 +1,33 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<tr class="editformcell">
<td>
<c:choose>
<c:when test="${restrictionType eq 'minCardinality'}">
minimum cardinality
</c:when>
<c:otherwise>
<c:choose>
<c:when test="${restrictionType eq 'maxCardinality'}">
maximum cardinality
</c:when>
<c:otherwise>
<c:if test="${restrictionType eq 'cardinality' }">
exact cardinality
</c:if>
</c:otherwise>
</c:choose>
</c:choose>
<select name="cardinalityType">
<option value="minCardinality">minimum cardinality</option>
<option value="maxCardinaltiy">maximum cardinatlity</option>
<option value="cardinality">cardinality (exact)</option>
</select>
</td>
<td>
<input name="cardinality"/>
</td>
</tr>

View file

@ -0,0 +1,22 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<tr class="editformcell">
<td valign="top">
<b>Superclass<sup>*</sup></b><br/>
<select name="SuperclassURI">
<form:option name="SuperclassURI"/>
</select>
<span class="warning"><form:error name="SuperclassURI"/></span>
</td>
</tr>
<tr class="editformcell">
<td valign="top">
<b>Subclass<sup>*</sup></b><br/>
<select name="SubclassURI" >
<form:option name="SubclassURI"/>
</select>
<span class="warning"><form:error name="SubclassURI"/></span>
</td>
</tr>

View file

@ -0,0 +1,327 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:form="http://vitro.mannlib.cornell.edu/edit/tags"
version="2.0">
<jsp:directive.page import="edu.cornell.mannlib.vitro.webapp.beans.VClass"/>
<jsp:directive.page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary"/>
<div class="editingForm">
<jsp:include page="/templates/edit/fetch/vertical.jsp"/>
<!--
/**
*
* @version 1.00
* @author Jon Corson-Rikert
*
* UPDATES:
* JCR 2005-11-06 : added code to show properties of parent class(es) as adapted from props_retry.jsp
* BJL 2007-07-XX : general overhaul to remove database tags and scriptlets
*/
-->
<div align="center">
<table class="form-background" border="0" cellpadding="2" cellspacing="2">
<tr valign="bottom" align="center">
<td valign="bottom">
<form action="listVClassWebapps" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="submit" class="form-button" value="Show All Classes"/>
</form>
<form action="showClassHierarchy" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="submit" class="form-button" value="Show Class Hierarchy"/>
</form>
<form action="showClassHierarchy" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="vclassUri" value="${VClass.URI}"/>
<input type="submit" class="form-button" value="Show Hierarchy below This Class"/>
</form>
<form action="listIndividuals" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="VClassURI" value="${VClass.URI}" />
<input type="submit" class="form-button" value="Show All Individuals in This Class"/>
</form>
<form action="listIndividuals" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="VClassURI" value="${VClass.URI}" />
<input type="hidden" name="assertedOnly" value="true"/>
<input type="submit" class="form-button" value="Show Individuals Asserted To Be in This Class"/>
</form>
</td>
<td valign="bottom" align="center">
<form action="vclass_retry" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input name="uri" type = "hidden" value="${VClass.URI}" />
<input type="submit" class="form-button" value="Edit Class"/>
</form>
</td>
<td valign="bottom">
<form action="vclass_retry" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="submit" class="form-button" value="Add New Class"/>
</form>
<form action="editForm" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="submit" class="form-button" value="Add New Individual in This Class"/>
<input type="hidden" name="controller" value="Entity"/>
<input type="hidden" name="VClassURI" value="${VClass.URI}"/>
</form>
<form action="editForm" method="get">
<input type="submit" class="form-button" value="Change URI"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="oldURI" value="${VClass.URI}"/>
<input type="hidden" name="mode" value="renameResource"/>
<input type="hidden" name="controller" value="Refactor"/>
</form>
<form action="editForm" method="get">
<input type="submit" class="form-button" value="Move Instances to Another Class"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="VClassURI" value="${VClass.URI}"/>
<c:choose>
<c:when test="${VClass.namespace eq 'http://vitro.mannlib.cornell.edu/ns/bnode#'}">
<input type="hidden" name="VClassName" value="this anonymous class"/>
</c:when>
<c:otherwise>
<input type="hidden" name="VClassName" value="${VClass.localNameWithPrefix}"/>
</c:otherwise>
</c:choose>
<input type="hidden" name="mode" value="moveInstances"/>
<input type="hidden" name="controller" value="Refactor"/>
</form>
</td>
</tr>
<tr><td colspan="3"><hr/></td></tr>
<!-- _____________________________________________ superclasses __________________________________________ -->
<tr valign="bottom" align="center">
<td colspan="2" valign="bottom" align="left">
<c:if test="${!empty superclasses}">
<form action="classes2ClassesOp" method="post">
<ul style="list-style-type:none;">
<c:forEach var="superclass" items="${superclasses}">
<c:url var="superclassURL" value="vclassEdit">
<c:param name="home" value="${portalBean.portalId}"/>
<c:param name="uri" value="${superclass.URI}"/>
</c:url>
<li><input type="checkbox" name="SuperclassURI" value="${superclass.URI}" class="form-item"/>
<c:choose>
<c:when test="${!superclass.anonymous}">
<a href="${superclassURL}">${superclass.localNameWithPrefix}</a>
</c:when>
<c:otherwise>
${superclass.localNameWithPrefix}
</c:otherwise>
</c:choose>
</li>
</c:forEach>
</ul>
<input type="hidden" name="SubclassURI" value="${VClass.URI}"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="operation" value="remove"/>
<input type="hidden" name="_epoKey" value="${epoKey}"/>
<input type="submit" class="form-button" value="Remove Checked Superclass Links"/>
</form>
</c:if>
</td>
<td>
<form action="editForm" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="SubclassURI" value="${VClass.URI}"/>
<input type="hidden" name="controller" value="Classes2Classes"/>
<input type="submit" class="form-button" value="New Link to Superclass"/>
</form>
</td>
</tr>
<tr><td colspan="3"><hr/></td></tr>
<!-- _______________________________________________ subclasses _____________________________________________ -->
<tr valign="bottom" align="center">
<td colspan="2" valign="bottom" align="left">
<c:if test="${!empty subclasses}">
<form action="classes2ClassesOp" method="post">
<ul style="list-style-type:none;">
<c:forEach var="subclass" items="${subclasses}">
<c:url var="subclassURL" value="vclassEdit">
<c:param name="home" value="${portalBean.portalId}"/>
<c:param name="uri" value="${subclass.URI}"/>
</c:url>
<li><input type="checkbox" name="SubclassURI" value="${subclass.URI}" class="form-item"/>
<c:choose>
<c:when test="${!subclass.anonymous}">
<a href="${subclassURL}"> ${subclass.localNameWithPrefix} </a>
</c:when>
<c:otherwise>
${subclass.localNameWithPrefix}
</c:otherwise>
</c:choose>
</li>
</c:forEach>
</ul>
<input type="hidden" name="SuperclassURI" value="${VClass.URI}"/>
<input type="submit" class="form-button" value="Remove Checked Subclass Links"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="operation" value="remove"/>
<input type="hidden" name="_epoKey" value="${epoKey}"/>
</form>
</c:if>
</td>
<td valign="bottom">
<form action="editForm" method="get">
<input type="hidden" name="controller" value="Classes2Classes"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="SuperclassURI" value="${VClass.URI}"/>
<input type="submit" class="form-button" value="New Link to Subclass"/>
</form>
<form action="vclass_retry" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="superclassUri" value="${VClass.URI}" />
<input type="submit" class="form-button" value="Add New Subclass of This Class"/>
</form>
</td>
</tr>
<tr><td colspan="3"><hr/></td></tr>
<!-- _______________________________________________ equivalent classes _____________________________________________ -->
<tr valign="bottom" align="center">
<td colspan="2" valign="bottom" align="left">
<c:if test="${!empty equivalentClasses}">
<form action="classes2ClassesOp" method="post">
<input type="hidden" value="equivalentClass" name="opMode"/>
<ul style="list-style-type:none;">
<c:forEach var="subclass" items="${equivalentClasses}">
<c:url var="subclassURL" value="vclassEdit">
<c:param name="home" value="${portalBean.portalId}"/>
<c:param name="uri" value="${subclass.URI}"/>
</c:url>
<li><input type="checkbox" name="SubclassURI" value="${subclass.URI}" class="form-item"/>
<c:choose>
<c:when test="${!subclass.anonymous}">
<a href="${subclassURL}"> ${subclass.localNameWithPrefix} </a>
</c:when>
<c:otherwise>
${subclass.localNameWithPrefix}
</c:otherwise>
</c:choose>
</li>
</c:forEach>
</ul>
<input type="hidden" name="SuperclassURI" value="${VClass.URI}"/>
<input type="submit" class="form-button" value="Remove Checked Equivalent Classes"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="operation" value="remove"/>
<input type="hidden" name="_epoKey" value="${epoKey}"/>
</form>
</c:if>
</td>
<td valign="bottom">
<form action="editForm" method="get">
<input type="hidden" name="controller" value="Classes2Classes"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="SuperclassURI" value="${VClass.URI}"/>
<input type="hidden" name="opMode" value="equivalentClass"/>
<input type="submit" class="form-button" value="Assert Class Equivalence"/>
</form>
</td>
</tr>
<tr><td colspan="3"><hr/></td></tr>
<!-- _______________________________________________ disjoint classes _____________________________________________ -->
<tr valign="bottom" align="center">
<td colspan="2" valign="bottom" align="left">
<c:if test="${!empty disjointClasses}">
<form action="classes2ClassesOp" method="post">
<input type="hidden" value="disjointWith" name="opMode"/>
<ul style="list-style-type:none;">
<c:forEach var="subclass" items="${disjointClasses}">
<c:url var="subclassURL" value="vclassEdit">
<c:param name="home" value="${portalBean.portalId}"/>
<c:param name="uri" value="${subclass.URI}"/>
</c:url>
<li><input type="checkbox" name="SubclassURI" value="${subclass.URI}" class="form-item"/>
<c:choose>
<c:when test="${!subclass.anonymous}">
<a href="${subclassURL}"> ${subclass.localNameWithPrefix} </a>
</c:when>
<c:otherwise>
${subclass.localNameWithPrefix}
</c:otherwise>
</c:choose>
</li>
</c:forEach>
</ul>
<input type="hidden" name="SuperclassURI" value="${VClass.URI}"/>
<input type="submit" class="form-button" value="Remove Checked Disjoint Classes"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="operation" value="remove"/>
<input type="hidden" name="_epoKey" value="${epoKey}"/>
</form>
</c:if>
</td>
<td valign="bottom">
<form action="editForm" method="get">
<input type="hidden" name="controller" value="Classes2Classes"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="SuperclassURI" value="${VClass.URI}"/>
<input type="hidden" name="opMode" value="disjointWith"/>
<input type="submit" class="form-button" value="New Disjointness Axiom"/>
</form>
</td>
</tr>
<tr><td colspan="3"><hr/></td></tr>
<!-- ___________________________________________ domain properties ___________________________________ -->
<tr valign="top" align="center">
<td>
<form action="listPropertyWebapps" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="submit" class="form-button" value="Show All Object Properties Applicable to This Class"/>
<input type="hidden" name="vclassUri" value="${VClass.URI}"/>
<input type="hidden" name="propsForClass" value="true"/>
</form><br/>
<form action="listDatatypeProperties" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="submit" class="form-button" value="Show All Data Properties Applicable to This Class"/>
<input type="hidden" name="vclassUri" value="${VClass.URI}"/>
<input type="hidden" name="propsForClass" value="true"/>
</form><br/>
</td>
<td></td>
<td valign="bottom">
<form action="editForm" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="domainClassUri" value="${VClass.URI}"/>
<input type="hidden" name="controller" value="Property"/>
<input type="submit" class="form-button" value="Define New Domain Property at This Class"/>
</form>
</td>
</tr>
<tr>
<td colspan="2">
<form action="editForm" method="get">
<input type="hidden" name="controller" value="Restriction"/>
<select name="restrictionType">
<option value="allValuesFrom">all values from</option>
<option value="someValuesFrom">some values from</option>
<option value="hasValue">has value</option>
<option value="minCardinality">minimum cardinality</option>
<option value="maxCardinality">maximum cardinality</option>
<option value="cardinality">exact cardinality</option>
</select>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="submit" class="form-button" value="Apply Restriction"/>
<input type="hidden" name="VClassURI" value="${VClass.URI}"/>
<p>Restrict:
<input type="radio" name="propertyType" value="object" checked="checked"/> object property
<input type="radio" name="propertyType" value="data"/> data property
</p>
</form>
</td>
</tr>
</table>
</div>
</div>
</jsp:root>

View file

@ -0,0 +1,17 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<tr class="editformcell">
<td valign="top" colspan="3">
<b>Class group name</b> (max 120 characters)<br />
<input type="text" name="PublicName" value="<form:value name="PublicName"/>" size="50" maxlength="120" />
<font size="2" color="red"><form:error name="Name"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="top" colspan="3">
<b>Display rank </b> (lower number displays first)<br />
<input type="text" name="DisplayRank" value="<form:value name="DisplayRank"/>" size="3" maxlength="11" />
<font size="2" color="red"><form:error name="DisplayRank"/></font>
</td>
</tr>

View file

@ -0,0 +1,58 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%
int DEFAULT_PORTAL_ID=1;
String portalIdStr=(portalIdStr=(String)request.getAttribute("home"))==null ?
((portalIdStr=request.getParameter("home"))==null?String.valueOf(DEFAULT_PORTAL_ID):portalIdStr):portalIdStr;
%>
<div class="editingForm"/>
<jsp:include page="/templates/edit/fetch/vertical.jsp"/>
<hr/>
<p/>
<div align="center">
<table class="form-background" border="0" cellpadding="2" cellspacing="2">
<tr valign="bottom" align="center">
<td>
<form action="fetch" method="get">
<input type="submit" class="form-button" value="display this class group's record"/>
<input type="hidden" name="home" value="<%=portalIdStr%>" />
<input type="hidden" name="queryspec" value="private_classgroup"/>
<input type="hidden" name="header" value="titleonly"/>
<input type="hidden" name="linkwhere" value="classgroups.id=<%=request.getAttribute("firstvalue")%>"/>
</form>
<form action="fetch" method="get">
<input type="submit" class="form-button" value="see all class groups"/>
<input type="hidden" name="home" value="<%=portalIdStr%>" />
<input type="hidden" name="queryspec" value="private_classgroups"/>
<input type="hidden" name="header" value="titleonly"/>
</form>
</td>
<td valign="bottom" align="center">
<form action="editForm" method="get">
<input name="id" type = "hidden" value="<%=request.getAttribute("firstvalue")%>" />
<input type="submit" class="form-button" value="edit class group <%=request.getAttribute("firstvalue")%>"/>
<input type="hidden" name="home" value="<%=portalIdStr%>" />
<input type="hidden" name="controller" value="Classgroup"/>
</form>
</td>
<td valign="bottom">
<form action="editForm" method="get">
<input type="hidden" name="home" value="<%=portalIdStr%>" />
<input type="hidden" name="controller" value="Classgroup"/>
<input type="submit" class="form-button" value="add new class group"/>
</form>
<form action="editForm" method="get">
<input type="hidden" name="home" value="<%=portalIdStr%>" />
<input type="hidden" name="controller" value="Vclass"/>
<input type="hidden" name="GroupId" value="<%=request.getAttribute("firstvalue")%>"/>
<input type="submit" class="form-button" value="add new class to this group"/>
</form>
</td>
</tr>
<tr><td colspan="3"><hr/></td></tr>
</table>
</div>
</div>

View file

@ -0,0 +1,140 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%-- colspan set to 4 in DatapropRetryController.java --%>
<tr class="editformcell">
<td valign="top" colspan="1">
<b>Public Name</b><br/><i>as will display on public pages</i><br/>
<input name="PublicName" value="<form:value name="PublicName"/>"/>
<div class="warning"><form:error name="PublicName"/></div>
</td>
<td valign="top" colspan="1">
<b>Property Group</b><br/>
<i>(for display headers and dashboard)</i><br/>
<select name="GroupURI">
<form:option name="GroupURI"/>
</select>
<div class="warning"><form:error name="GroupURI"/></div>
</td>
<td valign="bottom" colspan="1">
<b>Display Level</b><br /><i>(specify least restrictive level allowed)</i><br/>
<select name="HiddenFromDisplayBelowRoleLevelUsingRoleUri"><form:option name="HiddenFromDisplayBelowRoleLevelUsingRoleUri"/></select>
<font size="2" color="red"><form:error name="HiddenFromDisplayBelowRoleLevelUsingRoleUri"/></font>
</td>
<td valign="bottom" colspan="1">
<b>Update Level</b><br /><i>(specify least restrictive level allowed)</i><br />
<select name="ProhibitedFromUpdateBelowRoleLevelUsingRoleUri"><form:option name="ProhibitedFromUpdateBelowRoleLevelUsingRoleUri"/></select>
<font size="2" color="red"><form:error name="ProhibitedFromUpdateBelowRoleLevelUsingRoleUri"/></font>
</td>
</tr>
<tr class="editformcell">
<!-- c:set var="existingLocalName" value="<form:value name='LocalName'/>"/ -->
<td valign="top" colspan="2">
<b>Ontology</b><br/>
<c:choose>
<c:when test="${_action eq 'update'}">
<i>Change only via the "change URI" button on the previous screen</i><br/>
<select name="Namespace" disabled="disabled">
<form:option name="Namespace"/>
</select>
</c:when>
<c:otherwise>
<i>specifies Namespace</i><br/>
<select name="Namespace">
<form:option name="Namespace"/>
</select>
</c:otherwise>
</c:choose>
<div class="warning"><form:error name="Namespace"/></div>
</td>
<td valign="top" colspan="2">
<b>Local Name</b>
<c:choose>
<c:when test="${_action eq 'update'}">
<br/><i>Change only via the "change URI" button on the previous screen</i><br/>
<input name="LocalName" value="<form:value name="LocalName"/>" disabled="disabled"/>
</c:when>
<c:otherwise>
<i>(must be a valid XML name)<br/>startLowercaseAndUseCamelStyle</i><br/>
<input name="LocalName" value="<form:value name="LocalName"/>"/>
</c:otherwise>
</c:choose>
<div class="warning"><form:error name="LocalName"/></div>
</td>
</tr>
<tr class="editformcell">
<td valign="top" colspan="2">
<b>Domain Class</b><br/>
<select name="DomainClassURI">
<form:option name="DomainClassURI"/>
</select>
<span class="warning"><form:error name="DomainClassURI"/></span>
</td>
</tr>
<tr class="editformcell">
<td valign="top" colspan="2">
<b>Range Datatype</b><br/>
<select name="RangeDatatypeURI">
<form:option name="RangeDatatypeURI"/>
</select>
<span class="warning"><form:error name="RangeDatatypeURI"/></span>
</td>
<td valign="bottom" colspan="2">
<c:set var="functionalLabel" value="<b>Functional property</b> <i>(has at most one value for each individual)</i>" />
<c:choose>
<c:when test="${functional}">
<input name="Functional" type="checkbox" value="TRUE" checked="checked"/>${functionalLabel}
</c:when>
<c:otherwise>
<input name="Functional" type="checkbox" value="TRUE"/>${functionalLabel}
</c:otherwise>
</c:choose>
</td>
</tr>
<tr class="editformcell">
<td valign="top" colspan="4">
<b>Example</b><br/>
<textarea name="Example"><form:value name="Example"/></textarea>
<span class="warning"><form:error name="Example"/></span>
</td>
</tr>
<tr class="editformcell">
<td valign="top" colspan="4">
<b>Description</b> for ontology editors<br/>
<textarea name="Description"><form:value name="Description"/></textarea>
<span class="warning"><form:error name="Description"/></span>
</td>
</tr>
<tr class="editformcell">
<td valign="top" colspan="4">
<b>Public Description</b> for front-end users, as it will appear on editing forms<br/>
<textarea name="PublicDescription"><form:value name="PublicDescription"/></textarea>
<span class="warning"><form:error name="PublicDescription"/></span>
</td>
</tr>
<tr class="editformcell">
<td valign="top" colspan="1">
<b>Display Tier</b><br/>
<input name="DisplayTier" value="<form:value name="DisplayTier"/>"/>
<span class="warning"><form:error name="DisplayTier"/></span>
</td>
<td valign="top" colspan="1">
<b>Display Limit</b><br/>
<input name="DisplayLimit" value="<form:value name="DisplayLimit"/>"/>
<span class="warning"><form:error name="DisplayLimit"/></span>
</td>
<td valign="top" colspan="1">
<em>Optional: <b>custom entry form</b></em><br />
<input name="CustomEntryForm" size="30" value="<form:value name="CustomEntryForm"/>" />
<span class="warning"><form:error name="CustomEntryForm"/></span>
</td>
</td>
</tr>

View file

@ -0,0 +1,188 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
xmlns:c ="http://java.sun.com/jstl/core"
xmlns:fn ="http://java.sun.com/jsp/jstl/functions">
<div class="editingForm">
<jsp:include page="/templates/edit/fetch/vertical.jsp"/>
<!--
/**
*
* @version 0.8
* @author bjl23
*
*/
-->
<div align="center">
<table class="form-background" border="0" cellpadding="2" cellspacing="2">
<tr valign="bottom" align="center">
<td>
<form action="showDataPropertyHierarchy" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="submit" class="form-button" value="Datatype Property Hierarchy"/>
</form>
<form action="listDatatypeProperties" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="submit" class="form-button" value="All Datatype Properties"/>
</form>
<form action="listDataPropertyStatements" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="propertyURI" value="${datatypeProperty.URI}"/>
from <input type="text" name="startAt" value="1" size="2"/>
to <input type="text" name="endAt" value="50" size="3"/><br/>
<input type="submit" class="form-button" value="Show Examples of Statements Using This Property"/>
</form>
</td>
<td valign="bottom" align="center">
<form action="editForm" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="controller" value="Dataprop"/>
<input type="hidden" name="uri" value="${datatypeProperty.URI}"/>
<input type="submit" class="form-button" value="Edit This Datatype Property"/>
</form>
</td>
<td valign="bottom">
<form action="editForm" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="controller" value="Dataprop"/>
<input type="submit" class="form-button" value="Add New Datatype Property"/>
</form>
<form action="editForm" method="get">
<input type="submit" class="form-button" value="Change URI"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="oldURI" value="${datatypeProperty.URI}"/>
<input type="hidden" name="mode" value="renameResource"/>
<input type="hidden" name="controller" value="Refactor"/>
</form>
<form action="editForm" method="get">
<input type="submit" class="form-button" value="Move Statements to Different Property"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="propertyURI" value="${datatypeProperty.URI}"/>
<input type="hidden" name="mode" value="movePropertyStatements"/>
<input type="hidden" name="propertyType" value="DataProperty"/>
<input type="hidden" name="controller" value="Refactor"/>
</form>
</td>
</tr>
<tr><td colspan="3"><hr/></td></tr>
<!-- _____________________________________________ superproperties __________________________________________ -->
<tr valign="bottom" align="center">
<td colspan="2" valign="bottom" align="left">
<c:if test="${!empty superproperties}">
<form action="props2PropsOp" method="post">
<ul style="list-style-type:none;">
<c:forEach var="superproperty" items="${superproperties}">
<c:url var="superpropertyURL" value="datapropEdit">
<c:param name="home" value="${portalBean.portalId}"/>
<c:param name="uri" value="${superproperty.URI}"/>
</c:url>
<li><input type="checkbox" name="SuperpropertyURI" value="${superproperty.URI}" class="form-item"/>
<a href="${superpropertyURL}">${superproperty.localNameWithPrefix}</a>
</li>
</c:forEach>
</ul>
<input type="hidden" name="SubpropertyURI" value="${datatypeProperty.URI}"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="operation" value="remove"/>
<input type="hidden" name="_epoKey" value="${epoKey}"/>
<input type="submit" class="form-button" value="Remove Checked Superproperty Links"/>
</form>
</c:if>
</td>
<td>
<form action="editForm" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="SubpropertyURI" value="${datatypeProperty.URI}"/>
<input type="hidden" name="opMode" value="superproperty"/>
<input type="hidden" name="controller" value="Properties2Properties"/>
<input type="hidden" name="propertyType" value="data"/>
<input type="submit" class="form-button" value="New Link to Superproperty"/>
</form>
</td>
</tr>
<tr><td colspan="3"><hr/></td></tr>
<!-- _______________________________________________ subproperties _____________________________________________ -->
<tr valign="bottom" align="center">
<td colspan="2" valign="bottom" align="left">
<c:if test="${!empty subproperties}">
<form action="props2PropsOp" method="post">
<ul style="list-style-type:none;">
<c:forEach var="subproperty" items="${subproperties}">
<c:url var="subpropertyURL" value="datapropEdit">
<c:param name="home" value="${portalBean.portalId}"/>
<c:param name="uri" value="${subproperty.URI}"/>
</c:url>
<li><input type="checkbox" name="SubpropertyURI" value="${subproperty.URI}" class="form-item"/>
<a href="${subpropertyURL}"> ${subproperty.localNameWithPrefix} </a>
</li>
</c:forEach>
</ul>
<input type="hidden" name="SuperpropertyURI" value="${datatypeProperty.URI}"/>
<input type="submit" class="form-button" value="Remove Checked Subproperty Links"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="_epoKey" value="${epoKey}"/>
<input type="hidden" name="operation" value="remove"/>
</form>
</c:if>
</td>
<td valign="bottom">
<form action="editForm" method="get">
<input type="hidden" name="controller" value="Properties2Properties"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="SuperpropertyURI" value="${datatypeProperty.URI}"/>
<input type="hidden" name="opMode" value="subproperty"/>
<input type="hidden" name="propertyType" value="data"/>
<input type="submit" class="form-button" value="New Link to Subproperty"/>
</form>
</td>
</tr>
<!-- _______________________________________________ equivalent properties _____________________________________________ -->
<tr valign="bottom" align="center">
<td colspan="2" valign="bottom" align="left">
<c:if test="${!empty equivalentProperties}">
<form action="props2PropsOp" method="post">
<ul style="list-style-type:none;">
<c:forEach var="eqproperty" items="${equivalentProperties}">
<c:url var="eqpropertyURL" value="datapropEdit">
<c:param name="home" value="${portalBean.portalId}"/>
<c:param name="uri" value="${eqproperty.URI}"/>
</c:url>
<li><input type="checkbox" name="SubpropertyURI" value="${eqproperty.URI}" class="form-item"/>
<a href="${eqpropertyURL}"> ${eqproperty.localNameWithPrefix} </a>
</li>
</c:forEach>
</ul>
<input type="hidden" name="SuperpropertyURI" value="${datatypeProperty.URI}"/>
<input type="submit" class="form-button" value="Remove Checked Equivalent Property Links"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="_epoKey" value="${epoKey}"/>
<input type="hidden" name="operation" value="remove"/>
<input type="hidden" name="opMode" value="equivalentProperty"/>
</form>
</c:if>
</td>
<td valign="bottom">
<form action="editForm" method="get">
<input type="hidden" name="controller" value="Properties2Properties"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="SuperpropertyURI" value="${datatypeProperty.URI}"/>
<input type="hidden" name="opMode" value="equivalentProperty"/>
<input type="hidden" name="propertyType" value="data"/>
<input type="submit" class="form-button" value="New Link to Equivalent Property"/>
</form>
</td>
</tr>
</table>
</div>
</div>
</jsp:root>

View file

@ -0,0 +1,17 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<tr class="editformcell">
<td valign="top" colspan="2">
<b>Name</b>
<input name="Name" value="<form:value name="Name"/>"/>
</td>
</tr>
<tr class="editformcell">
<td valign="top" colspan="2">
<b>URI</b>
<input size="90%" name="Uri" value="<form:value name="Uri"/>"/>
</td>
</tr>

View file

@ -0,0 +1,43 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%
final int DEFAULT_PORTAL_ID=1; //Vivo
String portalIdStr=(portalIdStr=(String)request.getAttribute("home"))==null ?
((portalIdStr=request.getParameter("home"))==null?String.valueOf(DEFAULT_PORTAL_ID):portalIdStr):portalIdStr;
int incomingPortalId=Integer.parseInt(portalIdStr);
%>
<div class="editingForm">
<jsp:include page="/templates/edit/fetch/vertical.jsp"/>
<hr/>
<p/>
<div align=center>
<table class="form-background" border="0" cellpadding="2" cellspacing="2">
<tr valign="bottom" align="center">
<td>
<form action="fetch" method="post">
<input type="hidden" name="home" value="<%=portalIdStr%>" />
<input type="submit" class="form-button" value="See All Datatypes"/>
<input type="hidden" name="queryspec" value="private_datatypes"/>
<input type="hidden" name="header" value="titleonly"/>
</form>
</td>
<td valign="bottom" align="center">
<form action="datatype_retry" method="get">
<input type="hidden" name="home" value="<%=portalIdStr%>" />
<input type="hidden" name="id" value="<%=request.getAttribute("firstvalue")%>"/>
<input type="submit" class="form-button" value="Edit This Datatype"/>
</form>
</td>
<td valign="bottom">
<form action="datatype_retry" method="get">
<input type="hidden" name="home" value="<%=portalIdStr%>" />
<input type="submit" class="form-button" value="Add New Datatype"/>
</form>
</td>
</tr>
</table>
</div>
</div>

View file

@ -0,0 +1,26 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<input type="hidden" value="disjointWith" name="opMode"/>
<input type="hidden" value="add" name="operation"/>
<tr class="editformcell">
<td valign="top">
<select name="SuperclassURI">
<form:option name="SuperclassURI"/>
</select>
<span class="warning"><form:error name="SuperclassURI"/></span>
</td>
</tr>
<tr class="editformcell">
<td><p><strong>disjoint with</strong></p></td>
</tr>
<tr class="editformcell">
<td valign="top">
<select name="SubclassURI" >
<form:option name="SubclassURI"/>
</select>
<span class="warning"><form:error name="SubclassURI"/></span>
</td>
</tr>

View file

@ -0,0 +1,119 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<tr class="editformcell" id="entityNameTr">
<td valign="bottom" id="entityNameTd" colspan="2">
<b>Individual Name</b><br/>
<input style="width:80%;" type="text" name="Name" value="<form:value name="Name"/>" maxlength="255" />
<p class="error"><form:error name="Name"/></p>
</td>
</tr>
<tr class='editformcell' id='GenericTypeTr'>
<td valign="top" id="genericTypeTd" colspan="2">
<b>Generic Type<br/>
<select disabled="disabled" id="VClassURI" name="VClassURI" onChange="update();">
<form:option name="VClassURI"/>
</select>
<p class="error"><form:error name="VClassURI"/></p>
</td>
</tr>
<tr class='editformcell' id='specificTypeTr'>
<td style="width:50%;" valign="top" id="specificTypeTd" colspan="1">
<b>Specific Type</b><br/>
<select style="width:80%;" name="Moniker" id="Moniker">
<form:option name="Moniker"/>
</select>
<p class="error"><form:error name="Moniker"/></p>
</td>
<td id="newMonikerTd" valign="top">If [new moniker] is selected, enter here:<br/>
<input id="MonikerSelectAlt" name="Moniker" value="<form:value name="Moniker"/>"/>
<i>otherwise leave this field blank</i>
</td>
</tr>
<tr class="editformcell" id='urlTr'>
<td id="urlTd" valign="bottom" colspan="1">
<b>URL</b><br />
<input style="width:80%;" type="text" name="Url" value="<form:value name="Url"/>" maxlength="255" />
<p><form:error name="Url"/></p>
</td>
<td id="urlAnchorTd" valign="bottom" colspan="1">
<b>Anchor Text for URL</b> <em> Required if URL is to be visible</em><br />
<input style="width:65%;" type="text" name="Anchor" value="<form:value name="Anchor"/>" maxlength="255" />
<p class="error"><form:error name="Anchor"/></p>
</td>
</tr>
<!-- begin datatype properties section -->
<tr class="editformcell" style="border-collapse:collapse;">
<td colspan="2">
<ul style="margin-left:0;padding-left:0;list-style-type:none">
<form:dynamicFields type="dataprops" usePage="entity_retry_dataprops.jsp"/>
</ul>
</td>
</tr>
<!-- end datatype properties section -->
<tr class="editformcell" id='blurbTr'>
<td id="blurbTd" valign="bottom" colspan="2">
<b>Blurb</b> <em>Usually optional; shows up when this entity is included underneath a tab;</em> <b> max 255 chars</b><br />
<input style="width:80%;" type="text" name="Blurb" value="<form:value name="Blurb"/>" maxlength="255" />
<p class="error"><form:error name="Blurb"/></p>
</td>
</tr>
<tr class="editformcell" id='descriptionTr'>
<td id="descriptionTd" valign="bottom" colspan="2">
<b>Description</b> <em>Optional. Consider using more specific datatype properties where possible.</em><br/>
<textarea id="Description" name="Description" ROWS="15" COLS="115" wrap="physical"><form:value name="Description"/></textarea>
<p class="error"><form:error name="Description"/></p>
</td>
</tr>
<tr class="editformcell" id='citationTr'>
<td id="citationTd" valign="bottom" colspan="2">
<b>Citation</b> <em>Optional; max 255 chars; use also for image caption for news release<br/>
<input style="width:60%;" type="text" name="Citation" value="<form:value name="Citation"/>" maxlength="255" />
<p class="error"><form:error name="Citation"/></p>
</td>
</tr>
<tr class="editformcell" id='sunriseTr'>
<td id="sunriseTd" valign="bottom">
<b>Sunrise</b>, or date first visible (e.g., 2004-09-17) <br/><em>Optional; populated primarily for entities such as new releases that are auto-linked to tabs for a spcified number of days following their release date</em><br/>
<input type="text" name="Sunrise" value="<form:value name="Sunrise"/>" size="14" maxlength="14"><br>
<p class="error"><form:error name="Sunrise"/></p>
</td>
<td id="sunsetTd" valign="bottom">
<b>Sunset</b>, or date stops being visible (e.g., 2004-09-18) <br/><em>Optional; used only to hide entities based on a date rather than the Display Status specified above.<br/>After this date, an entity will disappear except when searching in "entire database" mode</em><br/>
<input type="text" name="Sunset" value="<form:value name="Sunset"/>" size="19" maxlength="19"><br>
<p class="error"><form:error name="Sunset"/></p>
</td>
</tr>
<tr class="editformcell" id='timekeyTr'>
<td id="timekeyTd" valign="bottom">
<b>Timekey</b>, or date and time for event sort order (e.g., 2004-09-17 09:30:00) <br/><em>Optional; populated primarily for entities such as seminars that are auto-linked to tabs for a specified number of days leading up to the event</em><br/>
<input type="text" name="Timekey" value="<form:value name="Timekey"/>" size="19" maxlength="19"><br>
<p class="error"><form:error name="Timekey"/></p>
</td>
</tr>
<tr class="editformcell" id='thumbnailFilenameTr'>
<td id="thumbnailTd" valign="bottom" colspan="1">
<b>Thumbnail Filename</b> <em>Optional and usually more convenient to upload from previous screen</em><br/>
<input type="text" name="ImageThumb" value="<form:value name="ImageThumb"/>" maxlength="255" />
<p class="error"><form:error name="ImageThumb"/></p>
</td>
<td id="optionalImageTd" valign="bottom" colspan="1">
<b>Optional Larger Image</b> <em>(filename or full path)</em>
<input type="text" name="ImageFile" value="<form:value name="ImageFile"/>" maxlength="255" />
<p class="error"><form:error name="ImageFile"/></p>
</td>
</tr>

View file

@ -0,0 +1,2 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>

View file

@ -0,0 +1,42 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<!-- this is a page set up to be parsed by the dynamicFields tag -->
<!-- the datapropsNN, $$, $foo, and @x symbols are special notations understood by this tag and are not part of JSP -->
<!-- @pre -->
<li style="padding-top:0.8em;padding-bottom:0.5em;" id="datapropsNNsuper">
<strong>$fieldName</strong><a id="datapropsNNaddLink" style="margin-left:0.5em;font-style:italic;font-weight:bold;" href="#" onClick="addLine(this, 'dataprops');return false;">add</a>
<span id="datapropsNNgenTaName" style="display:none;">$genTaName</span>
<ul id="datapropsNNul">
<li style="display:none;">This is a dummy li to make sure the ul has at least one child.</li>
<!-- @template -->
<li id="datapropsNN" style="margin-left:0em;margin-top:0.4em;margin-bottom:0.4em;">
<div id="datapropsNNcontent">
<span id="datapropsNNcontentValue">$$</span>
<a id="datapropsNNeditLink" href="#" style="margin-left:0.8em;font-style:italic" onClick="convertLiToTextarea(this, 'dataprops');return false;">edit</a>
<a id="datapropsNNdeleteLink" href="#" style="margin-left:0.8em;font-style:italic" onClick="deleteLine(this, 'dataprops');return false;">remove</a>
<a id="datapropsNNundeleteLink" href="#" style="display:none;margin-left:0.8em;font-style:italic" onClick="undeleteLine(this, 'dataprops');return false;">restore</a>
</div>
<div id="datapropsNNta" style="display:none;">
<div style="padding:0;margin:0;">
<textarea style="margin:0;padding:0;width:95%;height:16ex;" id="datapropsNNtata" name="$taName">$$</textarea>
</div>
<div style="padding:0;margin:0;">
<input id="datapropsNNokLink" style="margin:0;padding:0;" type="button" onClick="backToLi(this);return false;" value='OK'/>
<input id="datapropsNNcancelLink" style="margin:0;padding:0;" type="button" onClick="cancelBackToLi(this);return false;" value='cancel'/>
<input id="datapropsNNosLink" style="margin-left:5em;padding:0;" type="button" onClick="backToLi(this);submitPage();return false;" value='OK & save all changes'/>
</div>
</div>
</li>
<!-- @post -->
</ul>
</li>

View file

@ -0,0 +1,121 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<tr class="editformcell" id="entityNameTr">
<td valign="bottom" id="entityNameTd" colspan="1">
<b>Individual Name</b><br/>
<input type="text" name="field1Value" value="<form:value name="Name"/>" size="80" maxlength="255" />
<font size="2" color="red"><form:error name="Name"/></font>
</td>
<td valign="top" id="displayStatusTd" colspan="1">
<b>Display Status</b><br/>
<select name="StatusId" >
<form:option name="StatusId"/>
</select>
<font size="2" color="red"><form:error name="StatusId"/></font>
</td>
</tr>
<tr class='editformcell' id='GenericTypeTr'>
<td valign="top" id="genericTypeTd" colspan="2">
<b>Generic Type<br/>
<select id="VclassId" name="VClassId" onChange="update();">
<% // need to implement form:optgroup %>
<form:option name="VClassId"/>
</select>
<br><font size="2" color="red"><form:error name="VClassId"/></font>
</td>
</tr>
<tr class='editformcell' id='specificTypeTr'>
<td valign="top" id="specificTypeTd" colspan="1">
<b>Specific Type</b><br/>
<select name="Moniker" id="Moniker">
<form:option name="Moniker"/>
</select>
<br><font size="2" color="red"><form:error name="Moniker"/></font>
</td>
<td id="newMonikerTd" valign="top">If [new moniker] is selected, enter here:<br/>
<input name="Moniker" value="<form:value name="Moniker"/>"/>
<i>otherwise leave this field blank</i>
</td>
</tr>
<tr class="editformcell" id='urlTr'>
<td id="urlTd" valign="bottom" colspan="1">
<b>URL</b><br />
<input type="text" name="Url" value="<form:value name="Url"/>" size="80" maxlength="255" />
<font size="2" color="red"><form:error name="Url"/></font>
</td>
<td id="urlAnchorTd" valign="bottom" colspan="1">
<b>Anchor Text for URL</b> <em> Required if URL is to be visible</em><br />
<input type="text" name="Anchor" value="<form:value name="Anchor"/>" size="30" maxlength="255" />
<font size="2" color="red"><form:error name="Anchor"/></font>
</td>
</tr>
<tr class="editformcell" id='blurbTr'>
<td id="blurbTd" valign="bottom" colspan="2">
<b>Blurb</b> <em>Usually optional; shows up when this entity is included underneath a tab;</em> <b> max 255 chars</b><br />
<input type="text" name="Blurb" value="<form:value name="Blurb"/>" size="153" maxlength="255" />
<font size="2" color="red"><form:error name="Blurb"/></font>
</td>
</tr>
<tr class="editformcell" id='descriptionTr'>
<td id="descriptionTd" valign="bottom" colspan="2">
<b>Description</b> <em>Optional; may include valid HTML</em><br/>
<textarea name="Description" ROWS="5" COLS="115" wrap="physical"><form:value name="Description"/></textarea>
<font size="2" color="red"><form:error name="Description"/></font>
</td>
</tr>
<tr class="editformcell" id='citationTr'>
<td id="citationTd" valign="bottom" colspan="2">
<b>Citation</b> <em>Optional; max 255 chars; use also for image caption for news release
<input type="text" name="Citation" value="<form:value name="Citation"/>" size="80" maxlength="255" />
<font size="2" color="red"><form:error name="Citation"/></font>
</td>
</tr>
<tr class="editformcell" id='sunriseTr'>
<td id="sunriseTd" valign="bottom">
<b>Sunrise</b>, or date first visible (e.g., 2004-09-17) <em>Optional; populated primarily for entities such as new releases that are auto-linked to tabs for a spcified number of days following their release date</em>
<input type="text" name="Sunrise" value="<form:value name="Sunrise"/>" size="14" maxlength="14"><br>
<font size="2" color="red"><form:error name="Sunrise"/></font>
</td>
<td id="sunsetTd" valign="bottom">
<b>Sunset</b>, or date stops being visible (e.g., 2004-09-18) <em>Optional; used only to hide entities based on a date rather than the Display Status specified above.<br/>After this date, an entity will disappear except when searching in "entire database" mode</em>
<input type="text" name="Sunset" value="<form:value name="Sunset"/>" size="19" maxlength="19"><br>
<font size="2" color="red"><form:error name="Sunset"/></font>
</td>
</tr>
<tr class="editformcell" id='timekeyTr'>
<td id="timekeyTd" valign="bottom">
<b>Timekey</b>, or date and time for event sort order (e.g., 2004-09-17 09:30:00) <em>Optional; populated primarily for entities such as seminars that are auto-linked to tabs for a specified number of days leading up to the event</em>
<input type="text" name="Timekey" value="<form:value name="Timekey"/>" size="19" maxlength="19"><br>
<font size="2" color="red"><form:error name="Timekey"/></font>
</td>
</tr>
<tr class="editformcell" id='thumbnailFilenameTr'>
<td id="thumbnailTd" valign="bottom" colspan="1">
<b>Thumbnail Filename</b> <em>Optional and usually more convenient to upload from previous screen</em>
<input type="text" name="ThumbnailFilename" value="<form:value name="ThumbnailFilename"/>" size="60" maxlength="255" />
<font size="2" color="red"><form:error name="ThumbnailFilename"/></font>
</td>
<td id="optionalImageTd" valign="bottom" colspan="1">
<b>Optional Larger Image</b> <em>(filename or full path)</em>
<input type="text" name="LargerImage" value="<form:value name="LargerImage"/>" size="60" maxlength="255" />
<font size="2" color="red"><form:error name="LargerImage"/></font>
</td>
</tr>
<tr class="editformcell" id="portalFlagsTr">
<td id="portalFlagsTd" valign="bottom" colspan="3">
<b>portal</b> <i>(uncheck to hide in any portal)</i> <br />
</td>
</tr>
<tr class="editformcell" id="flag2SetTr">
<td id="collegeFlagsTd" valign="bottom" colspan="3">
<b>college</b>
</td>
</tr>
<tr class="editformcell" id="flag3SetTr">
<td id="campusFlagsTd" valign="bottom" colspan="3">
<b>campus</b>
</td>
</tr>

View file

@ -0,0 +1,19 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<tr class="editformcell">
<td valign="top">
<b>Individual<sup>*</sup></b><br/>
<select name="_" disabled="disabled">
<form:option name="IndividualURI"/>
</select>
</td>
</tr>
<tr class="editformcell">
<td valign="top" colspan="3">
<b><form:value name="Dataprop"/><sup>*</sup></b><br/>
<textarea name="Data" rows="6" cols="64"><form:value name="Data"/></textarea>
<span class="warning"><form:error name="Data"/></span>
</td>
</tr>

View file

@ -0,0 +1,23 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<tr class="editformcell">
<td valign="top">
<b>Subject Individual<sup>*</sup></b><br/>
<select disabled="disabled" name="SubjectEntURI">
<form:option name="SubjectEntURI"/>
</select>
<span class="warning"><form:error name="SubjectEntURI"/></span>
</td>
</tr>
<tr class="editformcell">
<td valign="top" colspan="3">
<b><form:value name="Prop"/><sup>*</sup></b><br/>
<b>Object Individual<sup>*</sup></b><br/>
<select name="ObjectEntURI">
<form:option name="ObjectEntURI"/>
</select>
<span class="warning"><form:error name="ObjectEntURI"/></span>
</td>
</tr>

View file

@ -0,0 +1,38 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<tr class="editformcell">
<td valign="top">
<b>Subject Individual<sup>*</sup></b><br/>
<select name="RangeId">
<form:option name="RangeId"/>
</select>
<span class="warning"><form:error name="RangeId"/></span>
</td>
</tr>
<tr class="editformcell">
<td valign="top" colspan="3">
<b><form:value name="Prop"/><sup>*</sup></b><br/>
<b>Subject Individual<sup>*</sup></b><br/>
<select name="DomainId">
<form:option name="DomainId"/>
</select> <span class="warning"><form:error name="DomainId"/></span>
</td>
</tr>
<tr class="editformcell">
<td valign="top" colspan="2">
<b>Sunrise</b><br/>
<input name="Sunrise" value="<form:value name="Sunrise"/>" />
</td>
<td valign="top" colspan="1">
<b>Sunset</b><br/>
<input name="Sunset" value="<form:value name="Sunset"/>"/>
</td>
</tr>
<tr class="editformcell">
<td valign="top">
<b>Qualifier</b><br/>
<input name="Qualifier" value="<form:value name="Qualifier"/>"/>
</td>
</tr>

View file

@ -0,0 +1,405 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<% /* For now, not using XML syntax because the output XHTML is not indented */ %>
<% /* <?xml version="1.0" encoding="UTF-8"?> */ %>
<% /* <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:form="http://vitro.mannlib.cornell.edu/edit/tags"
version="2.0"> */ %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<c:set var="singlePortal" value="${requestScope.singlePortal}"/>
<div name="anybody" class="editingForm">
<jsp:include page="/templates/edit/fetch/vertical.jsp"/>
<c:set var='individual' value='${requestScope.entityWebapp}'/>
<jsp:useBean id="loginHandler" class="edu.cornell.mannlib.vedit.beans.LoginFormBean" scope="session" />
<c:if test="${loginHandler.loginRole >= 4}">
<div name="authorized" align="center">
<table class="form-background" border="0" cellpadding="2" cellspacing="2" width="100%">
<tr valign="top" align="center">
<td>
<form action="entity" method="get">
<input type="submit" class="form-button" value="Display This Individual (public)"/>
<input type="hidden" name="uri" value="${individual.URI}"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
</form>
<c:set var="query"
value="PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?pred ?predLabel ?obj ?objLabel
WHERE
{
{<${entity.URI}> ?pred ?obj}
OPTIONAL { ?obj rdfs:label ?objLabel }
OPTIONAL { ?pred rdfs:label ?predLabel }
}
limit 10000"/>
<form action="admin/sparqlquery" method="get">
<input type="hidden" name="query" value="${query}"/>
<input type="hidden" name="resultFormat" value="RS_TEXT"/>
<input type="submit" class="form-button" value="Raw Statements with This Resource as Subject"/>
</form>
<c:set var="query"
value="PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?sub ?subL ?pred ?predLabel
WHERE
{
{ ?sub ?pred <${entity.URI}> }
OPTIONAL { ?sub rdfs:label ?subL }
OPTIONAL { ?pred rdfs:label ?predLabel }
}
limit 10000"/>
<form action="admin/sparqlquery" method="get">
<input type="hidden" name="query" value="${query}"/>
<input type="hidden" name="resultFormat" value="RS_TEXT"/>
<input type="submit" class="form-button" value="Raw Statements with This Resource as Object"/>
</form>
</td>
<td valign="bottom" align="center">
<c:if test="${!empty curationNotes}">
<h2>Curation Notes</h2>
<ul>
<c:forEach var="note" items="${curationNotes}">
<li>${note.data}</li>
</c:forEach>
</ul>
</c:if>
<form action="editForm" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input name="uri" type = "hidden" value="${individual.URI}" />
<input name="controller" type = "hidden" value="Entity" />
<input type="submit" class="form-button" value="Edit This Individual"/>
</form><br/>
<!-- put the curator notes here -->
<c:if test="${!empty individual.linksList}">
<form action="editForm" method="get">
<select name="uri" class="form-item">
<form:option name="ExtraURL"/>
</select><br />
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="submit" class="form-button" value="Edit Extra URLs"/>
<input type="hidden" name="controller" value="Link"/>
</form>
</c:if>
<c:if test="${!empty individual.externalIds}">
<form action="editForm" method="get">
<select name="multiplexedParam" class="form-item">
<form:option name="externalIds"/>
</select><br/>
<input type="hidden" name="IndividualURI" value="${individual.URI}"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="submit" class="form-button" value="Edit External Identifiers"/>
<input type="hidden" name="controller" value="ExternalId"/>
</form>
</c:if>
</td>
<td valign="bottom">
<form name="newEntityForm" action="editForm" method="get">
<select id="VClassURI" name="VClassURI" class="form-item">
<form:option name="VClassURI"/>
</select><br/>
<input type="submit" class="form-button" value="Add New Individual of above Type"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="controller" value="Entity"/>
</form>
<form action="editForm" method="get">
<input type="submit" class="form-button" value="Add Another URL"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="entityUri" value="${individual.URI}"/>
<input type="hidden" name="controller" value="Link"/>
</form>
<form action="editForm" method="get">
<input type="submit" class="form-button" value="Add an External Identifier"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="IndividualURI" value="${individual.URI}"/>
<input type="hidden" name="controller" value="ExternalId"/>
</form>
<form action="editForm" method="get">
<input type="submit" class="form-button" value="Change URI"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="oldURI" value="${individual.URI}"/>
<input type="hidden" name="mode" value="renameResource"/>
<input type="hidden" name="controller" value="Refactor"/>
</form>
<form action="uploadimages.jsp" method="get">
<input type="submit" class="form-button" value="Upload Image"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="entityUri" value="${individual.URI}"/>
</form>
<form action="editForm" method="get">
<input type="submit" class="form-button" value="Add a Curation Note"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="IndividualURI" value="${individual.URI}"/>
<input type="hidden" name="DatapropURI" value="${curatorNoteURI}"/>
<input type="hidden" name="controller" value="DataPropertyStatement"/>
</form>
</td>
</tr>
<tr><td colspan="3"><hr/></td></tr>
<!-- TYPES -->
<tr valign="bottom" align="center">
<td colspan="1" valign="bottom" align="left">
<c:if test="${!empty types}">
<form action="individualTypeOp" method="get">
<ul style="list-style-type:none;">
<c:forEach var="type" items="${types}">
<c:url var="individualURL" value="entityEdit">
<c:param name="home" value="${portalBean.portalId}"/>
<c:param name="uri" value="${type.URI}"/>
</c:url>
<c:url var="typeURL" value="/vclassEdit">
<c:param name="home" value="${portalBean.portalId}"/>
<c:param name="uri" value="${type.URI}"/>
</c:url>
<li><input type="checkbox" name="TypeURI" value="${type.URI}" class="form-item"/><a href="${typeURL}"> ${type.localNameWithPrefix} </a></li>
</c:forEach>
</ul>
<input type="hidden" name="individualURI" value="${individual.URI}"/>
<input type="submit" class="form-button" value="Remove Checked Asserted Types"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="operation" value="remove"/>
<input type="hidden" name="_epoKey" value="${epoKey}"/>
</form>
</c:if>
<form action="editForm" method="get">
<input type="hidden" name="controller" value="IndividualType"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="IndividualURI" value="${individual.URI}"/>
<input type="submit" class="form-button" value="Add Type"/>
</form>
</td>
<td colspan="2">
<c:if test="${!singlePortal}" >
<c:if test="${isFlag1Active || isFlag2Active}">
<!-- Flags -->
<table>
<tr valign="bottom" align="center">
<form action="flagUpdate" method="POST">
<td class="editformcell" colspan="1">
<c:if test="${isFlag1Active}">
<h4>Portal visibility</h4>
<c:forEach var="checkbox" items="${epo.formObject.checkboxLists['portalFlag']}">
<c:choose>
<c:when test="${checkbox.checked}">
<c:set var="checked" value="checked='checked'"/>
</c:when>
<c:otherwise>
<c:set var="checked" value=""/>
</c:otherwise>
</c:choose>
<span style="white-space:nowrap;"><input type="checkbox" name="Flag1Value" id="Flag1Value_${checkbox.value}" value="${checkbox.value}" ${checked}/><label for="Flag1Value_${checkbox.value}">&nbsp;${checkbox.body}&nbsp;</label></span>
</c:forEach>
<hr/>
</c:if>
</td>
<td class="editformcell" colspan="1">
<c:if test="${isFlag2Active}">
<h4>College affiliation</h4>
<c:forEach var="checkbox" items="${epo.formObject.checkboxLists['flag2']}">
<c:choose>
<c:when test="${checkbox.checked}">
<c:set var="checked" value="checked='checked'"/>
</c:when>
<c:otherwise>
<c:set var="checked" value=""/>
</c:otherwise>
</c:choose>
<span style="white-space:nowrap;"><input type="checkbox" name="Flag2Value" id="Flag2Value_${checkbox.value}" value="${checkbox.value}" ${checked}/><label for="Flag2Value_${checkbox.value}">&nbsp;${checkbox.body}&nbsp;</label></span>
</c:forEach>
</c:if>
</td>
<td class="editformcell" colspan="1">
</td>
</tr>
<tr>
<td colspan="2">
<p style="text-align:center"><input type="submit" class="form-button" value="update flag values"/></p>
</td>
<td colspan="1"/>
</tr>
<input type="hidden" name="_epoKey" value="${_flagEpoKey}"/>
</form>
</tr>
</table>
</c:if>
</c:if>
</td>
</tr>
<!-- keyterms -->
<tr valign="bottom" align="center">
<td valign="bottom" align="center">
<c:if test="${!empty epo.formObject.optionLists['existingKeywordRelations']}">
<form action="editForm" method="get">
<select name="uri" class="form-item">
<c:forEach var="kirOpt" items="${epo.formObject.optionLists['existingKeywordRelations']}">
<option value="${kirOpt.value}">${kirOpt.body}</option>
</c:forEach>
</select><br/>
<input type="submit" class="form-button" value="edit keyword link"/>
<input type="hidden" name="individualURI" value="${individual.URI}"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="controller" value="Keys2Ents"/>
</form>
</c:if>
</td>
<td>
<form action="editForm" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="individualURI" value="${individual.URI}"/>
<input type="hidden" name="controller" value="Keys2Ents"/>
<input type="submit" class="form-button" value="link to existing keyword"/>
</form>
</td>
<td>
<form action="editForm" method="get">
<input type="submit" class="form-button" value="new keyword, linked to this individual" />
<select name="mode" class="form-item">
<option value="hidden">hidden</option>
<option value="visible" selected="selected">visible</option>
</select>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="individualURI" value="${individual.URI}" />
<input type="hidden" name="Origin" value="curator-added"/>
<input type="hidden" name="controller" value="Keyword"/>
</form>
</td>
</tr>
</table>
<c:if test="${dwrDisabled != true}">
<div id="entityUriForDwr" style="visibility:hidden;">${individual.URI}</div>
<div>
<table class="form-background" border="0" cellpadding="2" cellspacing="2" width="100%">
<tr><td colspan="3" align="center"><h2>Object (individual-to-individual) Property Statements</h2></td></tr>
<tr><td><input id="newPropButton" class="form-button" type="button" value="add new statement" onclick="newProp();"/></td>
<td><input class="form-button" type="button" value="refresh list" onclick="update();"/></td>
</tr>
</table>
</div>
<div align="center">
<!-- ____________________ properties table using dwr ____________________ -->
<div id="propertyTableDiv">
<table class="form-background" border="1" width="100%" align="center">
<thead class="form-table-head">
<tr><th rowspan="1" colspan="1">Subject</th>
<th rowspan="1" colspan="1">Predicate</th>
<th rowspan="1" colspan="1">Object</th>
<th colspan="3" rowspan="1">actions</th>
</tr>
</thead>
<tbody id="propbody">
<tr><td>test</td><td>values</td><td>test</td><td>values</td></tr>
</tbody>
</table>
</div>
<!-- ____________________ End of properties table ______________________ -->
<!-- _____________________ Start of hidden area ____________________ -->
<!-- This is hidden and a copy gets put into the table when editing happens -->
<div id="propeditdiv" style="display:none" class ="form-editingRow">
<table width="100%">
<tr><td>Predicate:</td>
<td colspan="9">
<select id="propertyList" class="form-item"
onchange="fillRangeVClassList();">
<option value="">select property</option>
</select>
</td>
</tr>
<tr><td>Object Class:</td>
<td colspan="9">
<select id="vClassList" class="form-item" onchange="fillEntsList();">
<option value="">select type</option>
</select>
</td>
</tr>
<tr><td>Object Individual:</td>
<td colspan="9"><select id="entitiesList" class="form-item"><option>select individual</option></select></td>
</tr>
<!-- no longer available in v.0.7 : something to reimplement in 0.8 or 0.9 -->
<tr style="display:none;">
<td>Sunrise:</td><td><input id="sunrise" class="form-item" type="text"/></td>
<td>Sunset:</td><td><input id="sunset" class="form-item" type="text"/></td>
</tr>
<tr>
<td><input type="button" id="saveButt" class="form-button"
value="Save" onclick="writeProp()"/></td>
<td><input type="button" id="dismissButt" class="form-button" value="cancel"
onclick="update()"/></td>
</tr>
</table>
</div>
<div id="buildArea" style="display:none"></div>
</div><!-- END div "entityUriForDwr" -->
<!-- _________ End hidden area _________ -->
</c:if> <!-- end dwr section -->
<!-- __________ Relationships to object nodes (domain id is broader or parent side, range id is narrower or child side) _________________ -->
<table class="form-background" border="0" cellpadding="2" cellspacing="2" width="100%">
<tr><td colspan="3" align="center">
<div style="color: black; cursor: pointer;" onclick="javascript:switchGroupDisplay('oldEditing','oldEditingSw0','${portalBean.themeDir}site_icons')" title="old editing" class="navlinkblock" onmouseover="onMouseOverHeading(this)" onmouseout="onMouseOutHeading(this)">
<span class="entityRelationsSpan"><img src="${portalBean.themeDir}site_icons/plus.gif" id="oldEditingSw0"/>
Click here for original-style object property statement editing (should work on any browser)</span>
</div>
</td></tr>
</table>
<div id="oldEditing" style="display:none;">
<table class="form-background" border="0" cellpadding="2" cellspacing="2" width="100%">
<tr valign="bottom" align="center">
<td colspan="3"><i>This individual is the subject in the following relationships to other object individuals</i></td>
</tr>
<tr valign="bottom" align="center">
<td/>
<td valign="bottom" align="center">
<c:if test="${!empty epo.formObject.optionLists['ExistingPropertyInstances']}">
<form action="editForm" method="edit">
<select name="multiplexedParam" class="form-item">
<form:option name="ExistingPropertyInstances"/>
</select><br/>
<input type="hidden" name="SubjectEntURI" value="${individual.URI}"/>
<input type="submit" class="form-button" value="Edit Statement"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="controller" value="ObjectPropertyStatement"/>
</form>
</c:if>
</td>
<td>
<form action="editForm" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="SubjectEntURI" value="${individual.URI}"/>
<select name="PropertyURI" class="form-item">
<form:option name="PropertyURI"/>
</select><br/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="controller" value="ObjectPropertyStatement"/>
<input type="hidden" name="domainSide" value="true"/>
<input type="submit" class="form-button" value="new link for this individual"/>
</form>
</td>
</tr>
<tr><td colspan="3"></td></tr>
</table>
</div><!-- END div "oldEditing" -->
</div><!-- END div "authorized" -->
</c:if><!-- end if (securityLevel less than MIN_EDIT_ROLE) -->
</div><!-- END div "anybody" -->

View file

@ -0,0 +1,34 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%
request.setAttribute("dwrDisabled", new Boolean(false));
String context = request.getContextPath();
%>
<%
if (!(Boolean)request.getAttribute("dwrDisabled")) {
%>
<script type="text/javascript" xml:space="preserve">
var gEntityURI="${entity.URI}";
</script> <!-- There has got to be a better way to pass this to the js -->
<script type='text/javascript' src='<%=context%>/dwr/interface/PropertyDWR.js'></script>
<script type='text/javascript' src='<%=context%>/dwr/interface/EntityDWR.js'></script>
<script type='text/javascript' src='<%=context%>/dwr/interface/VClassDWR.js'></script>
<script type='text/javascript' src='<%=context%>/dwr/engine.js'></script>
<script type='text/javascript' src='<%=context%>/dwr/util.js'></script>
<script type='text/javascript' src='<%=context%>/js/betterDateInput.js'></script>
<script type='text/javascript' src='<%=context%>/js/vitro.js'></script>
<script type='text/javascript' src='<%=context%>/dojo.js'></script>
<script type='text/javascript' src='<%=context%>/js/ents_edit.js'></script>
<script type='text/javascript' src='<%=context%>/js/detect.js'></script>
<script language="JavaScript" type="text/javascript" src="js/toggle.js"></script>
<%
} %>

View file

@ -0,0 +1,26 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<input type="hidden" value="equivalentClass" name="opMode"/>
<input type="hidden" value="add" name="operation"/>
<tr class="editformcell">
<td valign="top">
<select name="SuperclassURI">
<form:option name="SuperclassURI"/>
</select>
<span class="warning"><form:error name="SuperclassURI"/></span>
</td>
</tr>
<tr class="editformcell">
<td><p><strong>equivalent to</strong></p></td>
</tr>
<tr class="editformcell">
<td valign="top">
<select name="SubclassURI" >
<form:option name="SubclassURI"/>
</select>
<span class="warning"><form:error name="SubclassURI"/></span>
</td>
</tr>

View file

@ -0,0 +1,28 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<tr class="editformcell">
<td valign="top" colspan="3">
<b>Individual Name</b><br/>
<select name="IndividualURI" >
<form:option name="IndividualURI"/>
</select>
<font size="2" color="red"><form:error name="IndividualURI"/></font>
</td>
</tr>
<tr class='editformcell'>
<td valign="top" colspan="3">
<b>Identifier Type</b><br>
<select name="DatapropURI" >
<form:option name="DatapropURI"/>
</select>
<br><font size="2" color="red"><form:error name="DatapropURI"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="3">
<b>Value</b><br/>
<input type="text" name="Data" value="<form:value name="Data"/>" size="75%" maxlength="255" />
<font size="2" color="red"><form:error name="Value"/></font>
</td>
</tr>

View file

@ -0,0 +1,24 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<tr class="editformcell">
<td>
<b>has value</b><br/>
<c:choose>
<c:when test="${requestScope.propertyType eq 'object'}">
<p><input name="ValueIndividual"/> <em>enter complete URI</em> </p> <!-- TODO: make nice way of dealing with picklists -->
</c:when>
<c:otherwise>
<p>
<input name="ValueLexicalForm"/>
datatype <select name="ValueDatatype">
<form:option name="ValueDatatype"/>
</select>
</p>
</c:otherwise>
</c:choose>
</td>
</tr>

View file

@ -0,0 +1,23 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<input type="hidden" value="add" name="operation"/>
<input type="hidden" value="${individual.URI}" name="individualURI"/>
<tr class="editformcell">
<td valign="top">
${individual.name}
</td>
</tr>
<tr class="editformcell">
<td><p><strong>has type</strong></p></td>
</tr>
<tr class="editformcell">
<td valign="top">
<select name="TypeURI" >
<form:option name="types"/>
</select>
<span class="warning"><form:error name="TypeURI"/></span>
</td>
</tr>

View file

@ -0,0 +1,12 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<tr class="editformcell">
<td valign="bottom" colspan="2">
<b>Keyword</b><br/>
<select name="KeyId">
<form:option name="KeyId"/>
</select>
<font size="2" color="red"><form:error name="KeyId"/></font>
</td>
</tr>

View file

@ -0,0 +1,29 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<tr class="editformcell">
<td valign="bottom" colspan="2">
<b>Keyword</b><br/>
<select name="KeyId">
<form:option name="KeyId"/>
</select>
<font size="2" color="red"><form:error name="KeyId"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="top" colspan="2">
<b>Individual</b><br>
<select name="EntId">
<form:option name="EntId"/>
</select>
<font size="2" color="red"><form:error name="EntId"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="2">
<select name="Mode">
<form:option name="Mode"/>
</select>
<font size="2" color="red"><form:error name="Mode"/></font>
</td>
</tr>

View file

@ -0,0 +1,17 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<tr class="editformcell">
<td valign="top" colspan="2">
<b>Keyword</b><br />
<input type="text" name="Term" value="<form:value name="Term"/>" size="60" maxlength="255" />
<p><font size="2" color="red"><form:error name="Term"/></font></p>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="3">
<b>Comment</b> <i>limited to ~255 characters</i><br />
<textarea name="Comments" ROWS="3" COLS="80" wrap="physical"><form:value name="Comments"/></textarea>
<font size="2" color="red"><form:error name="Comments"/></font>
</td>
</tr>

View file

@ -0,0 +1,116 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<div class="editingForm">
<jsp:include page="/templates/edit/fetch/vertical.jsp"/>
<%@ taglib uri="/WEB-INF/tlds/database.tld" prefix="database"%>
<%
int DEFAULT_PORTAL_ID=1;
String portalIdStr=(portalIdStr=(String)request.getAttribute("home"))==null ?
((portalIdStr=request.getParameter("home"))==null?String.valueOf(DEFAULT_PORTAL_ID):portalIdStr):portalIdStr;
%>
<hr/>
<p/>
<div align="center">
<table class="form-background" border="0" cellpadding="2" cellspacing="2">
<tr valign="bottom" align="center">
<td>
<form action="fetch" method="post">
<input type="submit" class="form-button" value="display this keyword"/>
<input type="hidden" name="home" value="<%=portalIdStr%>" />
<input type="hidden" name="queryspec" value="public_keyterm"/>
<input type="hidden" name="linkwhere" value="keyterms.id=<%=request.getAttribute("firstvalue")%>" />
</form><br />
<form action="fetch" method="post">
<input type="submit" class="form-button" value="all keywords"/>
<input type="hidden" name="home" value="<%=portalIdStr%>" />
<input type="hidden" name="queryspec" value="public_keyterms"/>
<input type="hidden" name="header" value="titleonly"/>
</form>
</td>
<td valign="bottom" align="center">
<form action="editForm" method="get">
<input name="id" type = "hidden" value="<%=request.getParameter("firstvalue")%>" />
<input type="submit" class="form-button" value="edit keyword <%=request.getAttribute("firstvalue")%>"/>
<input type="hidden" name="home" value="<%=portalIdStr%>" />
<input type="hidden" name="controller" value="Keyword"/>
</form>
</td>
<td valign="bottom">
<form action="editForm" method="get">
<input type="hidden" name="home" value="<%=portalIdStr%>" />
<input type="hidden" name="controller" value="Keyword"/>
<input type="submit" class="form-button" value="add new keyword"/>
</form>
</td>
</tr>
<tr><td colspan="3"><hr/></td></tr>
<!-- -------------------------------------------- entities ------------------------------------------->
<tr valign="bottom" align="center">
<td>
<form action="fetch" method="post">
<input type="submit" class="form-button" value="all related entities"/>
<input type="hidden" name="home" value="<%=portalIdStr%>" />
<input type="hidden" name="queryspec" value="public_keyterm_entities"/>
<input type="hidden" name="header" value="titleonly"/>
<input type="hidden" name="linkwhere" value="keys2ents.keyId=<%=request.getParameter("firstvalue")%>"/>
</form><br />
</td>
<td valign="bottom" align="center">
<database:query id="ifEntities" scope="page">
SELECT count(*) FROM keys2ents,entities WHERE keys2ents.entId=entities.id AND keys2ents.keyId=<%=request.getAttribute("firstvalue")%>
</database:query>
<database:rows query="ifEntities">
<database:columns query="ifEntities" id="entityCount">
<% if (Integer.parseInt(entityCount)>0) { %>
<form action="editForm" method="get">
<database:query id="keys2ents" scope="page">
SELECT keys2ents.id,name FROM keys2ents,entities
WHERE keyId=<%=request.getAttribute("firstvalue")%>
AND keys2ents.entId=entities.id
ORDER BY entities.name
</database:query>
<select name="id" class="form-item">
<database:rows query="keys2ents">
<database:select_columns query="keys2ents" id="selectId" selectValue="selectName">
<option value="<%= selectId %>"><%= selectName %></option>
</database:select_columns>
</database:rows>
<database:release query="keys2ents"/>
</select><br>
<input type="submit" class="form-button" value="edit entity link"/>
<input type="hidden" name="home" value="<%=portalIdStr%>" />
<input type="hidden" name="controller" value="Keys2Ents"/>
</form>
<% } %>
</database:columns>
</database:rows>
<database:release query="ifEntities"/>
</td>
<td>
<form action="editForm" method="get">
<database:query id="vclasses" scope="page">
SELECT DISTINCT vclass.id,vclass.name FROM vclass,entities
WHERE entities.vClassId=vclass.id ORDER BY vclass.name
</database:query>
<select name="vclassId" class="form-item" >
<option selected="selected" value="0">select entity class ...</option>
<database:rows query="vclasses">
<database:select_columns query="vclasses" id="selectId" selectValue="selectName">
<option value="<%= selectId %>"><%= selectName %></option>
</database:select_columns>
</database:rows>
<database:release query="vclasses"/>
</select>
<br />
<input type="hidden" name="home" value="<%=portalIdStr%>" />
<input type="hidden" name="keyId" value="<%=request.getParameter("firstvalue")%>">
<input type="hidden" name="controller" value="Keys2Ents"/>
<input type="submit" class="form-button" value="link to existing entity"/>
</form>
</td>
</tr>
</table>
</div>
</div>

View file

@ -0,0 +1,29 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<tr class="editformcell">
<td valign="top" colspan="2">
<b>Keyword</b><br />
<input type="text" name="Term" value="<form:value name="Term"/>" size="60" maxlength="255" />
<p><font size="2" color="red"><form:error name="Term"/></font></p>
</td>
</tr>
<tr class="editformcell">
<td valign="top" colspan="1">
<b>Origin</b> <i>(source of 1st use of this keyword)</i><br/>
<select name="Origin" >
<form:option name="Origin"/>
</select>
<font size="2" color="red"><form:error name="Origin"/></font>
</td>
<td valign="top"><sup>*</sup>If [new origin] is selected, optionally enter a <b>new origin</b> here:<br/>
<input type="text" name="Origin" size="30" maxlength="80" /><br>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="3">
<b>Comment</b> <i>limited to ~255 characters</i><br />
<textarea name="Comments" ROWS="3" COLS="80" wrap="physical"><form:value name="Comments"/></textarea>
<font size="2" color="red"><form:error name="Comments"/></font>
</td>
</tr>

View file

@ -0,0 +1,40 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<tr class="editformcell">
<td valign="top" colspan="3">
<b>Individual Name</b><br/>
<select name="EntityId" >
<form:option name="EntityId"/></option>
</select>
<font size="2" color="red"><form:error name="EntityId"/></font>
</td>
</tr>
<c:if test="${!empty epo.formObject.optionLists['TypeURI']}">
<tr class='editformcell'>
<td valign="top" colspan="3">
<b>Link Type</b><br>
<select name="TypeURI">
<form:option name="TypeURI"/>
</select>
<br><font size="2" color="red"><form:error name="TypeURI"/></font>
</td>
</tr>
</c:if>
<tr class="editformcell">
<td valign="bottom" colspan="3">
<b>URL</b> itself (http://...)<br/>
<input type="text" name="Url" style="width:32em;" value="<form:value name="Url"/>"/>
<font size="2" color="red"><form:error name="Url"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="2">
<b>anchor text for above URL</b><br/>
<input type="text" name="Anchor" value="<form:value name="Anchor"/>" style="width:24em;" maxlength="255" />
<font size="2" color="red"><form:error name="Anchor"/></font>
</td>
</tr>

View file

@ -0,0 +1,29 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest"%>
<%
VitroRequest vreq = new VitroRequest(request);
String vclassName = vreq.getParameter("VClassName");
%>
<tr>
<td>
<strong>Move instances of <%=vclassName%> to:</strong>
</td>
</tr>
<tr class="editformcell">
<td>
<strong>Subject class</strong><br/>
<select name="NewVClassURI">
<form:option name="NewVClassURI"/>
</select>
</td>
</tr>

View file

@ -0,0 +1,42 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<tr>
<td>
<strong>Move statements matching the following:</strong>
</td>
</tr>
<tr class="editformcell">
<td>
<strong>Subject class</strong><br/>
<select name="SubjectClassURI">
<form:option name="SubjectClassURI"/>
</select>
</td>
</tr>
<tr>
<td>
${epo.attributeMap['propertyURI']}
</td>
</tr>
<c:if test="${epo.attributeMap['propertyType'] == 'ObjectProperty' }">
<tr class="editformcell">
<td>
<strong>Object class</strong><br/>
<select name="ObjectClassURI">
<form:option name="ObjectClassURI"/>
</select>
</td>
</tr>
</c:if>
<tr class="editformcell">
<td>
<strong>to use property:</strong><br/>
<select name="NewPropertyURI">
<form:option name="NewPropertyURI"/>
</select>
</td>
</tr>

View file

@ -0,0 +1,8 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<tr>
<td>
<p><strong>Namespace:</strong><br/> <input style="width:97%;" name="namespace" value="${param.namespace}"/></p>
<p><strong>Prefix:</strong><br/> <input name="prefix" value="${param.prefix}"/></p>
</td>
</tr>

View file

@ -0,0 +1,27 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<tr class="editformcell">
<td valign="bottom" colspan="3">
<b>Name (for convenience only)</b><br/>
<input type="text" name="Name" value="<form:value name="Name"/>" size="40%" maxlength="120" />
<font size="2" color="red"><form:error name="Name"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="3">
<b>Namespace URI</b><br/>
<input name="NamespaceURI" value="<form:value name="NamespaceURI"/>" size="80%" maxlength="255" />
<font size="2" color="red"><form:error name="NamespaceURI"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="3">
<b>Optional Namespace Prefix (for exports)</b><br/>
<input name="Prefix" value="<form:value name="Prefix"/>" size="15%" maxlength="25" />
<font size="2" color="red"><form:error name="Prefix"/></font>
</td>
</tr>

View file

@ -0,0 +1,44 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%
final int DEFAULT_PORTAL_ID=1;
String portalIdStr=(portalIdStr=(String)request.getAttribute("home"))==null ?
((portalIdStr=request.getParameter("home"))==null?String.valueOf(DEFAULT_PORTAL_ID):portalIdStr):portalIdStr; %>
<div class="editingForm">
<jsp:include page="/templates/edit/fetch/vertical.jsp"/>
<hr/>
<p/>
<div align=center>
<table class="form-background" border="0" cellpadding="2" cellspacing="2">
<tr valign="bottom" align="center">
<td>
<form action="fetch" method="get">
<input type="hidden" name="home" value="<%=portalIdStr%>" />
<input type="submit" class="form-button" value="See All Namespaces"/>
<input type="hidden" name="queryspec" value="private_namespaces"/>
<input type="hidden" name="header" value="titleonly"/>
</form>
</td>
<td valign="bottom" align="center">
<form action="editForm" method="get">
<input type="hidden" name="home" value="<%=portalIdStr%>" />
<input type="submit" class="form-button" value="Edit Namespace <%=request.getAttribute("firstvalue")%>"/>
<input name="id" type = "hidden" value="<%=request.getAttribute("firstvalue")%>" />
<input type="hidden" name="controller" value="Namespace"/>
</form>
</td>
<td valign="bottom">
<form action="editForm" method="get">
<input type="hidden" name="home" value="<%=portalIdStr%>" />
<input type="submit" class="form-button" value="Add New Namespace"/>
<input type="hidden" name="controller" value="Namespace"/>
</form>
</td>
</tr>
</table>
</div>
</div>

View file

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:form="http://vitro.mannlib.cornell.edu/edit/tags"
version="2.0">
<div class="editingForm">
<jsp:include page="/templates/edit/fetch/vertical.jsp"/>
<div align="center">
<table class="form-background" border="0" cellpadding="2" cellspacing="2">
<tr valign="bottom" align="center">
<td>
<form action="listOntologies" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="submit" class="form-button" value="Show All Ontologies"/>
</form>
<form action="showClassHierarchy" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="submit" class="form-button" value="Show This Ontology's Class Hierarchy" />
<input type="hidden" name="ontologyUri" value="${Ontology.URI}" />
</form>
<form action="listPropertyWebapps" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="submit" class="form-button" value="Show This Ontology's Object Properties" />
<input type="hidden" name="ontologyUri" value="${Ontology.URI}" />
</form>
<form action="listDatatypeProperties" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="submit" class="form-button" value="Show This Ontology's Datatype Properties" />
<input type="hidden" name="ontologyUri" value="${Ontology.URI}" />
</form>
</td>
<td valign="bottom" align="center">
<form action="editForm" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="submit" class="form-button" value="Edit ${Ontology.name}"/>
<input name="uri" type = "hidden" value="${Ontology.URI}" />
<input type="hidden" name="controller" value="Ontology"/>
</form>
</td>
<td valign="bottom">
<form action="editForm" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="submit" class="form-button" value="Add New Ontology"/>
<input type="hidden" name="controller" value="Ontology"/>
</form>
<form action="editForm" method="get">
<input type="submit" class="form-button" value="Change URI"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="oldURI" value="${realURI}"/>
<input type="hidden" name="mode" value="renameResource"/>
<input type="hidden" name="controller" value="Refactor"/>
</form>
</td>
</tr>
</table>
</div>
</div>
</jsp:root>

View file

@ -0,0 +1,34 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<tr class="editformcell">
<td valign="bottom" colspan="3">
<b>Ontology name</b><br/>
<input type="text" name="Name" value="<form:value name="Name"/>" size="40" maxlength="120" />
<font size="2" color="red"><form:error name="Name"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="3">
<b>Namespace URI</b><br/>
<c:choose>
<c:when test="${_action eq 'update'}">
<i>Change via the "change URI" button on previous screen</i><br/>
<input disabled="disabled" type="text" name="URI" value="<form:value name="URI"/>" size="50" maxlength="240" />
</c:when>
<c:otherwise>
<input type="text" name="URI" value="<form:value name="URI"/>" size="50" maxlength="240" />
</c:otherwise>
</c:choose>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="3">
<b>Namespace prefix</b><br/>
<input type="text" name="Prefix" value="<form:value name="Prefix"/>" size="8" maxlength="25" />
<font size="2" color="red"><form:error name="Prefix"/></font>
</td>
</tr>

View file

@ -0,0 +1,195 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page import="java.util.ArrayList" %>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<c:set var="singlePortal" value="${requestScope.singlePortal}"/>
<c:set var="creatingNewPortal" value="${requestScope.creatingNewPortal}"/>
<c:set var="multiPortal" value = "${!singlePortal || creatingNewPortal}"/>
<c:set var="appNameLabel" value="${ !multiPortal ? 'Site Name' : 'Portal Application Name' }"/>
<c:set var="smallCell" value="style='width: 33%;'" />
<c:set var="longField" value="${multiPortal == true ? \"style='width: 90%;'\" : \"style='width: 75%;'\"}" />
<tr class="editformcell">
<td valign="top" colspan="2">
<b>${appNameLabel}</b> <i>(max 50 characters)</i><br />
<input type="text" name="AppName" value="<form:value name="AppName"/>" ${longField} maxlength="50" />
<font color="red"><form:error name="AppName"/></font>
</td>
<c:if test="${multiPortal}">
<td valign="top" colspan="1">
<b>Portal ID number</b><br />
<c:choose>
<c:when test="${_action == 'insert'}">
<input type="text" name="PortalId" ${smallCell}
value="<form:value name="PortalId"/>" maxlength="5" />
</c:when>
<c:otherwise>
<input type="text" name="PortalId" disabled="disabled" ${smallCell}
value="<form:value name="PortalId"/>" maxlength="5" />
</c:otherwise>
</c:choose>
<font color="red"><form:error name="PortalId" /> </font>
</td>
<td valign="top" colspan="1">
<b>URL ending</b><br/>
<input type="text" name="Urlprefix" ${smallCell} value="<form:value name="Urlprefix"/>"/>
<font color="red"><form:error name="PortalId"/><font>
</td>
</c:if>
</tr>
<tr class="editformcell">
<td valign="top" colspan="2">
<b>Tagline </b> <i>appears in header, just to the right of the logo (leave blank to have no tagline)</i><br />
<input type="text" name="ShortHand" value="<form:value name="ShortHand"/>" ${longField} maxlength="50" />
<font color="red"><form:error name="ShortHand"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="2">
<b>Contact Email Address</b> <i>contact form submissions will be sent to this address</i><br />
<input type="text" name="ContactMail" value="<form:value name="ContactMail"/>" ${longField} maxlength="255" />
<font color="red"><form:error name="ContactMail"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="1">
<b>Root Tab</b><br />
<select name="RootTabId">
<form:option name="RootTabId"/>
</select>
<font color="red"><form:error name="RootTabId"/></font>
</td>
<td valign="top" colspan="1">
<b>Theme</b><br />
<select name="ThemeDir">
<form:option name="ThemeDir" />
</select>
<font color="red"><form:error name="ThemeDir"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="2">
<b>Copyright text</b> <i>used in footer (e.g., name of your institution)</i><br />
<input type="text" name="CopyrightAnchor" value="<form:value name="CopyrightAnchor"/>" ${longField} maxlength="120" />
<font color="red"><form:error name="CopyrightAnchor"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="2">
<b>Copyright URL</b> <i>copyright text links to this URL</i><br />
<input type="text" name="CopyrightURL" value="<form:value name="CopyrightURL"/>" ${longField} maxlength="120" />
<font color="red"><form:error name="CopyrightURL"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="4">
<b>About message</b> <i>used for main content area on About page (HTML is allowed)</i><br />
<textarea name="AboutText" style="width: 90%;" ROWS="20" wrap="physical"><form:value name="AboutText"/></textarea>
<font color="red"><form:error name="AboutText"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="4">
<b>Acknowledgement message</b> <i>used for acknowledgement area on About page (HTML is allowed)</i></b><br />
<textarea name="AcknowledgeText" style="width: 90%;" ROWS="5" wrap="physical"><form:value name="AcknowledgeText"/></textarea>
<font color="red"><form:error name="AcknowledgeText"/></font>
</td>
</tr>
<tr class="editformcell hideFromVivoWeb">
<td valign="bottom" colspan="2">
<b>Flag 1 Filtering</b> <i>if true, then filter pages generated for this portal by flag1</i><br/>
<select name="Flag1Filtering" >
<form:option name="Flag1Filtering"/>
</select>
<font color="red"><form:error name="Flag1Filtering"/></font>
</td>
</tr>
<tr class="editformcell hideFromVivoWeb">
<td valign="bottom" colspan="1">
<b>Banner image</b><br />
<input type="text" name="BannerImage" value="<form:value name="BannerImage"/>" style="width:90%" maxlength="255" />
<font color="red"><form:error name="BannerImage"/></font>
</td>
<td valign="bottom" colspan="1">
<b>Banner image width</b><br />
<input type="text" name="BannerWidth" value="<form:value name="BannerWidth"/>" ${smallCell} maxlength="11" />
<font color="red"><form:error name="BannerWidth"/></font>
</td>
<td valign="bottom" colspan="1">
<b>Banner image height</b><br />
<input type="text" name="BannerHeight" value="<form:value name="BannerHeight"/>" ${smallCell} maxlength="11" />
<font color="red"><form:error name="BannerHeight"/></font>
</td>
</tr>
<tr class="editformcell hideFromVivoWeb">
<td valign="bottom" colspan="1">
<b>Logotype image</b><br />
<input type="text" name="LogotypeImage" value="<form:value name="LogotypeImage"/>" style="width:90%" maxlength="255" />
<font color="red"><form:error name="LogotypeImage"/></font>
</td>
<td valign="bottom" colspan="1">
<b>Logotype image width</b><br />
<input type="text" name="LogotypeWidth" value="<form:value name="LogotypeWidth"/>" ${smallCell} maxlength="11" />
<font color="red"><form:error name="LogotypeWidth"/></font>
</td>
<td valign="bottom" colspan="1">
<b>Logotype image height</b><br />
<input type="text" name="LogotypeHeight" value="<form:value name="LogotypeHeight"/>" ${smallCell} maxlength="11" />
<font color="red"><form:error name="LogotypeHeight"/></font>
</td>
</tr>
<% /*
<tr class="editformcell">
<!-- this needs to be added to the bean -->
<td valign="bottom" colspan="1">
<b>Flag 1 values</b><br/>
<input disabled="disabled" type="text" name="field9Value" value="" style="width:60" maxlength="255" />
<font color="red"></font>
</td>
<td valign="bottom" colspan="1">
<b>Flag 2 numeric equivalent</b> <i>THIS FILTERING HAS BEEN TRANSFERRED TO TABS</i><br />
<input type="text" name="Flag2Numeric" value="<form:value name="Flag2Numeric"/>" style="width:33%" maxlength="11" />
<font color="red"><form:error name="Flag2Numeric"/></font>
</td>
<td valign="bottom" colspan="1">
<b>Flag 3 numeric equivalent</b> <i>THIS FILTERING HAS BEEN TRANSFERRED TO TABS</i><br />
<input type="text" name="Flag3Numeric" value="<form:value name="Flag3Numeric"/>" style="width:33%" maxlength="11" />
<font color="red"><form:error name="Flag3Numeric"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="1">
<b>Filter by XXXX on Advanced Search form?</b><br />
<select disabled="disabled" name="field23Value">
<option selected value="false">false</option>
</select>
<font color="red"></font>
</td>
<td valign="bottom" colspan="1">
<b>Filter by XXXY on Advanced Search form?</b><br />
<select disabled="disabled" name="field24Value">
<option value="false">false</option>
</select>
<font color="red"></font>
</td>
<td valign="bottom" colspan="1">
<b>Filter by XXYX on Advanced Search form?</b><br />
<select disabled="disabled" name="field25Value">
<option value="false">false</option>
</select>
<font color="red"></font>
</td>
</tr>
*/ %>

View file

@ -0,0 +1,72 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<div class="editingForm">
<jsp:include page="/templates/edit/fetch/vertical.jsp"/>
<%@ page import="java.util.*,formbeans.ApplicationBean"%>
<%
/**
*
* @version 1.00
* @author Jon Corson-Rikert
*
* UPDATES:
* JCR 2005-11-06 : removed flag2 and flag3 values fields (text) -- using only numeric, and even their use has been shifted to tabs instead
* JCR 2005-06-14 : added field23 for imageThumbWidth
*/
ApplicationBean appBean=ApplicationBean.getAppBean();
%>
<%@ taglib uri="/WEB-INF/tlds/database.tld" prefix="database"%>
<%
final int PRIMARY_TAB_TABTYPE=28;
final int SUBCOLLECTION_CATEGORY_TABTYPE=18;
final int DEFAULT_PORTAL_ID=1;
String portalIdStr=(portalIdStr=(String)request.getAttribute("home"))==null ?
((portalIdStr=request.getParameter("home"))==null?String.valueOf(DEFAULT_PORTAL_ID):portalIdStr):portalIdStr;
String appName=null;
%>
<hr/>
<p/>
<div align="center">
<table class="form-background" border="0" cellpadding="2" cellspacing="2">
<tr valign="bottom" align="center">
<td>
<form action="fetch" method="post">
<input type="submit" class="form-button" value="display this portal's record"/>
<input type="hidden" name="home" value="<%=portalIdStr%>" />
<input type="hidden" name="queryspec" value="private_portal"/>
<input type="hidden" name="header" value="titleonly"/>
<input type="hidden" name="linkwhere" value="portals.id=<%=request.getAttribute("firstvalue")%>"/>
</form>
<% if (appBean.isFlag1Active()) {%>
<form action="fetch" method="post">
<input type="submit" class="form-button" value="See All Portals"/>
<input type="hidden" name="home" value="<%=portalIdStr%>" />
<input type="hidden" name="queryspec" value="private_portals"/>
<input type="hidden" name="header" value="titleonly"/>
</form>
<% }%>
</td>
<td valign="bottom" align="center">
<form action="editForm" method="get">
<input type="hidden" name="controller" value="Portal"/>
<input name="id" type = "hidden" value="<%=request.getAttribute("firstvalue")%>" />
<input type="submit" class="form-button" value="Edit Portal <%=request.getAttribute("firstvalue")%>"/>
</form>
</td>
<% if (appBean.isFlag1Active()){%>
<td valign="bottom">
<form action="editForm" method="get">
<input type="hidden" name="home" value="<%=portalIdStr%>" />
<input type="hidden" name="controller" value="Portal"/>
<input type="submit" class="form-button" value="Add New Portal"/>
</form>
</td>
<% }%>
</tr>
<tr><td colspan="3"><hr/></td></tr>
</table>
</div>
</div>

View file

@ -0,0 +1,40 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<tr class="editformcell">
<td valign="top">
<c:choose>
<c:when test="${opMode eq 'equivalentProperty'}">
<b>Property<sup>*</sup></b><br/>
</c:when>
<c:otherwise>
<b>Superproperty<sup>*</sup></b><br/>
</c:otherwise>
</c:choose>
<select name="SuperpropertyURI">
<form:option name="SuperpropertyURI"/>
</select>
<span class="warning"><form:error name="SuperpropertyURI"/></span>
</td>
</tr>
<tr class="editformcell">
<td valign="top">
<c:choose>
<c:when test="${opMode eq 'equivalentProperty'}">
<b>Equivalent Property<sup>*</sup></b><br/>
</c:when>
<c:otherwise>
<b>Subproperty<sup>*</sup></b><br/>
</c:otherwise>
</c:choose>
<select name="SubpropertyURI" >
<form:option name="SubpropertyURI"/>
</select>
<span class="warning"><form:error name="SubpropertyURI"/></span>
</td>
</tr>
<input type="hidden" name="operation" value="${operation}" />
<input type="hidden" name="opMode" value="${opMode}" />

View file

@ -0,0 +1,24 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<tr class="editformcell">
<td valign="top" colspan="3">
<b>Property group name</b> (max 120 characters)<br />
<input type="text" name="Name" value="<form:value name="Name"/>" size="50" maxlength="120" />
<font size="2" color="red"><form:error name="Name"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="top" colspan="3">
<b>Public description</b> (short explanation for dashboard)<br />
<input type="text" name="PublicDescription" value="<form:value name="PublicDescription"/>" size="80" maxlength="255" />
<font size="2" color="red"><form:error name="PublicDescription"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="top" colspan="3">
<b>Display rank </b> (lower number displays higher)<br />
<input type="text" name="DisplayRank" value="<form:value name="DisplayRank"/>" size="3" maxlength="11" />
<font size="2" color="red"><form:error name="DisplayRank"/></font>
</td>
</tr>

View file

@ -0,0 +1,276 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%-- colspan set to 5 in PropertyRetryController.java --%>
<tr class="editformcell">
<td valign="top" colspan="2">
<b>Parent property</b><br/><br/>
<select name="ParentURI"><form:option name="ParentURI"/></select>
<font size="2" color="red"><form:error name="ParentURI"/></font>
</td>
<td valign="top" colspan="1">
<b>Property Group</b><br />
<i>(for display headers and dashboard)</i><br/>
<select name="GroupURI"><form:option name="GroupURI"/></select>
</td>
<td valign="bottom" colspan="1">
<b>Display Level</b><br /><i>(specify least restrictive level allowed)</i><br/>
<select name="HiddenFromDisplayBelowRoleLevelUsingRoleUri"><form:option name="HiddenFromDisplayBelowRoleLevelUsingRoleUri"/></select>
<font size="2" color="red"><form:error name="HiddenFromDisplayBelowRoleLevelUsingRoleUri"/></font>
</td>
<td valign="bottom" colspan="1">
<b>Update Level</b><br />(specify least restrictive level allowed)<br />
<select name="ProhibitedFromUpdateBelowRoleLevelUsingRoleUri"><form:option name="ProhibitedFromUpdateBelowRoleLevelUsingRoleUri"/></select>
<font size="2" color="red"><form:error name="ProhibitedFromUpdateBelowRoleLevelUsingRoleUri"/></font>
</td>
</tr>
<tr class="editformcell">
<td style="vertical-align:bottom;" valign="bottom" colspan="1">
<b>Ontology</b>
<c:choose>
<c:when test="${_action eq 'update'}">
<br/><i>Change only via the "change URI" button on the previous screen</i><br/>
<select name="Namespace" disabled="disabled"><form:option name="Namespace"/></select>
</c:when>
<c:otherwise>
<br/><select name="Namespace"><form:option name="Namespace"/></select>
</c:otherwise>
</c:choose>
</td>
<td style="vertical-align:bottom;" valign="bottom" colspan="2">
<b>Local name for property</b>
<c:choose>
<c:when test="${_action eq 'update'}">
<br/><i>Change only via the "change URI" button on the previous screen</i><br/>
<input name="LocalName" value="<form:value name="LocalName"/>" style="width:90%;" disabled="disabled"/>
</c:when>
<c:otherwise>
<br/><i>(must be a valid XML name without spaces)</i><br/>
<input name="LocalName" value="<form:value name="LocalName"/>" style="width:90%;"/>
</c:otherwise>
</c:choose>
<font size="2" color="red"><form:error name="LocalName"/></font>
</td>
<td style="vertical-align:bottom;" valign="bottom" colspan="2">
<b>Optional: Label for public display</b><br />
<input type="text" name="DomainPublic" value="<form:value name="DomainPublic"/>" style="width:90%;" maxlength="80" />
<font size="2" color="red"><form:error name="DomainPublic"/></font>
</td>
</tr>
<tr class="editformcell">
<td style="vertical-align:bottom;" valign="bottom" colspan="1">
<b>Optional: Inverse property ontology</b>
<c:choose>
<c:when test="${_action eq 'update'}">
<br/><i>Change only via the "change URI" button on the previous screen</i><br/>
<select name="NamespaceInverse" disabled="disabled"><form:option name="NamespaceInverse"/></select>
</c:when>
<c:otherwise>
<br/><select name="NamespaceInverse"><form:option name="NamespaceInverse"/></select>
</c:otherwise>
</c:choose>
</td>
<td style="vertical-align:bottom;" valign="bottom" colspan="2">
<b>Optional: Inverse property local name</b>
<c:choose>
<c:when test="${_action eq 'update'}">
<br/><i>Change only via the "change URI" button on the previous screen</i><br/>
<input name="LocalNameInverse" value="<form:value name="LocalNameInverse"/>" style="width:90%;" disabled="disabled"/>
</c:when>
<c:otherwise>
<br/><i>(must be a valid XML name without spaces)</i><br/>
<input name="LocalNameInverse" value="<form:value name="LocalNameInverse"/>" style="width:90%;"/>
</c:otherwise>
</c:choose>
<font size="2" color="red"><form:error name="LocalNameInverse"/></font>
</td>
<td valign="bottom" style="vertical-align:bottom;" colspan="2">
<b>Optional: Inverse property label for public display</b><br />
<input type="text" name="RangePublic" value="<form:value name="RangePublic"/>" style="width:90%;" maxlength="80" />
<font size="2" color="red"><form:error name="RangePublic"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="top" colspan="2">
<b>Domain class</b><br />
<select name="DomainVClassURI"><form:option name="DomainVClassURI"/></select>
<font size="2" color="red"><form:error name="DomainVClassURI"/></font>
</td>
<td valign="top" colspan="3">
<b>Range class</b><br />
<select name="RangeVClassURI" ><form:option name="RangeVClassURI"/></select>
<font size="2" color="red"><form:error name="RangeClassURI"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="top" colspan="5">
<b>Public Description</b> for front-end users, as it will appear on editing forms<br/>
<textarea name="PublicDescription"><form:value name="PublicDescription"/></textarea>
<font size="2" color="red"><form:error name="PublicDescription"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="2">
<em>Optional: display tier for this property<br />
(<strong>lower</strong> numbers display first)</em><br/>
<input name="DomainDisplayTier" value="<form:value name="DomainDisplayTier"/>" style="width:15%;" />
<font size="2" color="red"><form:error name="DomainDisplayTier"/></font>
</td>
<td valign="bottom" colspan="1">
<em>Optional: display tier for this property's inverse<br />
(<strong>lower</strong> numbers display first)</em><br/>
<input name="RangeDisplayTier" value="<form:value name="RangeDisplayTier"/>" style="width:15%;" />
<font size="2" color="red"><form:error name="RangeDisplayTier"/></font>
</td>
<td valign="bottom" colspan="2">
<em>Related <strong>object individuals</strong> to display without collapsing<br />
(<strong>lower</strong> numbers display first)</em><br/>
<input name="DomainDisplayLimit" value="<form:value name="DomainDisplayLimit"/>" style="width:15%;" />
<font size="2" color="red"><form:error name="DomainDisplayLimit"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="2">
<em>Optional: <strong>sort related individuals</strong> by<br />
(name,timekey,sunrise,or sunset; default is name)</em><br/>
<input name="DomainEntitySortField" value="<form:value name="DomainEntitySortField"/>" />
<font size="2" color="red"><form:error name="DomainEntitySortField"/></font><br />
</td>
<td valign="bottom" colspan="1">
<em>Optional: <strong>sort direction</strong><br />
(blank for ascending, &quot;desc&quot; for descending)</em><br/>
<input name="DomainEntitySortDirection" value="<form:value name="DomainEntitySortDirection"/>" />
<font size="2" color="red"><form:error name="DomainEntitySortDirection"/></font>
</td>
<td valign="bottom" colspan="2">
<em>Optional: <strong>data property</strong> by which to sort related individuals</em><br />
<select name="ObjectIndividualSortPropertyURI"><form:option name="ObjectIndividualSortPropertyURI"/></select>
<font size="2" color="red"><form:error name="ObjectIndividualSortPropertyURI"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="1">
<c:choose>
<c:when test="${transitive}">
<input name="Transitive" type="checkbox" value="TRUE" checked="checked"/>transitive
</c:when>
<c:otherwise>
<input name="Transitive" type="checkbox" value="TRUE"/>transitive
</c:otherwise>
</c:choose>
</td>
<td valign="bottom" colspan="2">
<c:choose>
<c:when test="${symmetric}">
<input name="Symmetric" type="checkbox" value="TRUE" checked="checked"/> symmetric
</c:when>
<c:otherwise>
<input name="Symmetric" type="checkbox" value="TRUE"/> symmetric
</c:otherwise>
</c:choose>
</td>
<td valign="bottom" colspan="1">
<c:choose>
<c:when test="${functional}">
<input name="Functional" type="checkbox" value="TRUE" checked="checked"/> functional
</c:when>
<c:otherwise>
<input name="Functional" type="checkbox" value="TRUE"/> functional
</c:otherwise>
</c:choose>
</td>
<td valign="bottom" colspan="1">
<c:choose>
<c:when test="${inverseFunctional}">
<input name="InverseFunctional" type="checkbox" value="TRUE" checked="checked"/> inverse functional
</c:when>
<c:otherwise>
<input name="InverseFunctional" type="checkbox" value="TRUE"/> inverse functional
</c:otherwise>
</c:choose>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="2">
<em>custom entry form</em><br />
<input name="CustomEntryForm" size="30" value="<form:value name="CustomEntryForm"/>" />
<font size="2" color="red"><form:error name="CustomEntryForm"/></font>
</td>
<td valign="bottom" colspan="1">
<em><strong>Caution:</strong>delete object when statement deleted?</em><br />
<c:choose>
<c:when test="${forceStubObjectDeletion}">
<input name="ForceStubObjectDeletion" type="checkbox" value="TRUE" checked="checked"/>force deletion
</c:when>
<c:otherwise>
<input name="ForceStubObjectDeletion" type="checkbox" value="TRUE"/>force deletion
</c:otherwise>
</c:choose>
<font size="2" color="red"><form:error name="ForceStubObjectDeletion"/></font>
</td>
<td valign="bottom" colspan="1">
<em>select from existing choices when adding statements?</em><br />
<c:choose>
<c:when test="${selectFromExisting}">
<input name="SelectFromExisting" type="checkbox" value="TRUE" checked="checked"/>provide selection
</c:when>
<c:otherwise>
<input name="SelectFromExisting" type="checkbox" value="TRUE"/>provide selection
</c:otherwise>
</c:choose>
<font size="2" color="red"><form:error name="SelectFromExisting"/></font>
</td>
<td valign="bottom" colspan="1">
<em>when adding a new statement, also offer option to create new individual?</em><br />
<c:choose>
<c:when test="${offerCreateNewOption}">
<input name="OfferCreateNewOption" type="checkbox" value="TRUE" checked="checked"/>offer create option
</c:when>
<c:otherwise>
<input name="OfferCreateNewOption" type="checkbox" value="TRUE"/>offer create option
</c:otherwise>
</c:choose>
<font size="2" color="red"><form:error name="OfferCreateNewOption"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="2">
<em>Optional: <strong>sort related object individuals of inverse property</strong> by<br />
(name,timekey,sunrise,or sunset; default is name)</em><br/>
<input name="RangeEntitySortField" value="<form:value name="RangeEntitySortField"/>" />
<font size="2" color="red"><form:error name="RangeEntitySortField"/></font>
</td>
<td valign="bottom" colspan="1">
<em>Optional: <strong>inverse sort direction</strong><br />
(blank for ascending, &quot;desc&quot; for descending)</em><br/>
<input name="RangeEntitySortDirection" value="<form:value name="RangeEntitySortDirection"/>" />
<font size="2" color="red"><form:error name="RangeEntitySortDirection"/></font>
</td>
<td valign="bottom" colspan="2">
<em>Related <strong>object individuals of non-inverse property</strong> to display without collapsing<br />
(<strong>lower</strong> numbers display first<br/>
<input name="RangeDisplayLimit" value="<form:value name="RangeDisplayLimit"/>" style="width:15%;" />
<font size="2" color="red"><form:error name="RangeDisplayLimit"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="5">
<b>Example</b><br />
<input name="Example" style="width:90%;" value="<form:value name="Example"/>" />
<font size="2" color="red"><form:error name="Example"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="5">
<b>Description</b> for ontology editors<br />
<textarea name="Description" style="width:90%;"><form:value name="Description"/></textarea>
<font size="2" color="red"><form:error name="Description"/></font>
</td>
</tr>

View file

@ -0,0 +1,219 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
xmlns:c ="http://java.sun.com/jstl/core"
xmlns:fn ="http://java.sun.com/jsp/jstl/functions">
<div class="editingForm">
<jsp:include page="/templates/edit/fetch/vertical.jsp"/>
<!--
/**
*
* @version 1.00
* @author Jon Corson-Rikert
*
* UPDATES:
* BJL 2007-08-01 : complete overhaul to remove database tags and scriptlets
* BDC 2005-12-12 : refactoring for etypeless operation.
* JCR 2005-06-15 : added fields 21 and 22: domainFlag1Set and rangeFlag1Set, and field 23: statusId
*/
-->
<div align="center">
<table class="form-background" border="0" cellpadding="2" cellspacing="2">
<tr valign="bottom" align="center">
<td>
<form action="showObjectPropertyHierarchy" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="iffRoot" value="true" />
<input type="submit" class="form-button" value="Root Properties"/>
</form>
<form action="listPropertyWebapps" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="submit" class="form-button" value="See All Properties"/>
</form>
<form action="showObjectPropertyHierarchy" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="propertyUri" value="${property.URI}"/>
<input type="submit" class="form-button" value="Show Hierarchy below This Property"/>
</form>
<form action="listObjectPropertyStatements" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="propertyURI" value="${property.URI}"/>
<input type="hidden" name="assertedStmts" value="true"/>
<input type="hidden" name="showVClasses" value="true"/>
from <input type="text" name="startAt" value="1" size="2"/>
to <input type="text" name="endAt" value="50" size="3"/><br/>
<input type="submit" class="form-button" value="Show Examples of Statements Using This Property"/>
</form>
</td>
<td valign="bottom" align="center">
<form action="editForm" method="get">
<input name="home" type="hidden" value="${portalBean.portalId}" />
<input name="uri" type = "hidden" value="${property.URI}" />
<input type="submit" class="form-button" value="Edit Property Record"/>
<input type="hidden" name="controller" value="Property"/>
</form><br/>
</td>
<td valign="bottom">
<form action="editForm" method="get">
<input name="home" type="hidden" value="${portalBean.portalId}" />
<input type="hidden" name="parentId" value="${property.URI}" />
<input type="hidden" name="controller" value="Property"/>
<input type="submit" class="form-button" value="Add New Child Property"/>
</form>
<form action="editForm" method="get">
<input name="home" type="hidden" value="${portalBean.portalId}" />
<input type="submit" class="form-button" value="Add New Property"/>
<input type="hidden" name="controller" value="Property"/>
</form>
<form action="editForm" method="get">
<input type="submit" class="form-button" value="Change URI"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="oldURI" value="${property.URI}"/>
<input type="hidden" name="mode" value="renameResource"/>
<input type="hidden" name="controller" value="Refactor"/>
</form>
<form action="editForm" method="get">
<input type="submit" class="form-button" value="Move Statements to Different Property"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="propertyURI" value="${property.URI}"/>
<input type="hidden" name="mode" value="movePropertyStatements"/>
<input type="hidden" name="propertyType" value="ObjectProperty"/>
<input type="hidden" name="controller" value="Refactor"/>
</form>
<c:if test="${!empty property.URIInverse}">
<form action="propertyEdit" method="get">
<input type="submit" class="form-button" value="Go to Inverse Property"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="uri" value="${property.URIInverse}"/>
</form>
</c:if>
</td>
</tr>
<tr><td colspan="3"><hr/></td></tr>
<!-- _____________________________________________ superproperties __________________________________________ -->
<tr valign="bottom" align="center">
<td colspan="2" valign="bottom" align="left">
<c:if test="${!empty superproperties}">
<form action="props2PropsOp" method="post">
<ul style="list-style-type:none;">
<c:forEach var="superproperty" items="${superproperties}">
<c:url var="superpropertyURL" value="propertyEdit">
<c:param name="home" value="${portalBean.portalId}"/>
<c:param name="uri" value="${superproperty.URI}"/>
</c:url>
<li><input type="checkbox" name="SuperpropertyURI" value="${superproperty.URI}" class="form-item"/>
<a href="${superpropertyURL}">${superproperty.localNameWithPrefix}</a>
</li>
</c:forEach>
</ul>
<input type="hidden" name="SubpropertyURI" value="${property.URI}"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="operation" value="remove"/>
<input type="hidden" name="_epoKey" value="${epoKey}"/>
<input type="submit" class="form-button" value="Remove Checked Superproperty Links"/>
</form>
</c:if>
</td>
<td>
<form action="editForm" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="SubpropertyURI" value="${property.URI}"/>
<input type="hidden" name="opMode" value="superproperty"/>
<input type="hidden" name="controller" value="Properties2Properties"/>
<input type="submit" class="form-button" value="New Link to Superproperty"/>
</form>
</td>
</tr>
<tr><td colspan="3"><hr/></td></tr>
<!-- _______________________________________________ subproperties _____________________________________________ -->
<tr valign="bottom" align="center">
<td colspan="2" valign="bottom" align="left">
<c:if test="${!empty subproperties}">
<form action="props2PropsOp" method="post">
<ul style="list-style-type:none;">
<c:forEach var="subproperty" items="${subproperties}">
<c:url var="subpropertyURL" value="propertyEdit">
<c:param name="home" value="${portalBean.portalId}"/>
<c:param name="uri" value="${subproperty.URI}"/>
</c:url>
<li><input type="checkbox" name="SubpropertyURI" value="${subproperty.URI}" class="form-item"/>
<a href="${subpropertyURL}"> ${subproperty.localNameWithPrefix} </a>
</li>
</c:forEach>
</ul>
<input type="hidden" name="SuperpropertyURI" value="${property.URI}"/>
<input type="submit" class="form-button" value="Remove Checked Subproperty Links"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="_epoKey" value="${epoKey}"/>
<input type="hidden" name="operation" value="remove"/>
</form>
</c:if>
</td>
<td valign="bottom">
<form action="editForm" method="get">
<input type="hidden" name="controller" value="Properties2Properties"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="SuperpropertyURI" value="${property.URI}"/>
<input type="hidden" name="opMode" value="subproperty"/>
<input type="submit" class="form-button" value="New Link to Subproperty"/>
</form>
<form action="editForm" method="get">
<input type="hidden" name="controller" value="Property"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="parentId" value="${property.URI}" />
<input type="submit" class="form-button" value="Add New Subproperty of This Property"/>
</form>
</td>
</tr>
<!-- _______________________________________________ equivalent properties _____________________________________________ -->
<tr valign="bottom" align="center">
<td colspan="2" valign="bottom" align="left">
<c:if test="${!empty equivalentProperties}">
<form action="props2PropsOp" method="post">
<ul style="list-style-type:none;">
<c:forEach var="eqproperty" items="${equivalentProperties}">
<c:url var="eqpropertyURL" value="datapropEdit">
<c:param name="home" value="${portalBean.portalId}"/>
<c:param name="uri" value="${eqproperty.URI}"/>
</c:url>
<li><input type="checkbox" name="SubpropertyURI" value="${eqproperty.URI}" class="form-item"/>
<a href="${eqpropertyURL}"> ${eqproperty.localNameWithPrefix} </a>
</li>
</c:forEach>
</ul>
<input type="hidden" name="SuperpropertyURI" value="${property.URI}"/>
<input type="submit" class="form-button" value="Remove Checked Equivalent Property Links"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="_epoKey" value="${epoKey}"/>
<input type="hidden" name="operation" value="remove"/>
<input type="hidden" name="opMode" value="equivalentProperty"/>
</form>
</c:if>
</td>
<td valign="bottom">
<form action="editForm" method="get">
<input type="hidden" name="controller" value="Properties2Properties"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="SuperpropertyURI" value="${property.URI}"/>
<input type="hidden" name="opMode" value="equivalentProperty"/>
<input type="hidden" name="propertyType" value="object"/>
<input type="submit" class="form-button" value="New Link to Equivalent Property"/>
</form>
</td>
</tr>
</table>
</div>
</div>
</jsp:root>

View file

@ -0,0 +1,17 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<tr class="editformcell">
<td><c:out value='<%=request.getParameter("oldURI")%>'/></td>
</tr>
<tr class="editformcell">
<td>
<b>New URI</b><br/><span class="warning"><strong>${epo.attributeMap['errorMsg']}</strong></span>
<input type="text" size="95%" name="newURI" value='<%=request.getParameter("oldURI")%>'/>
</td>
</tr>

View file

@ -0,0 +1,24 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<tr class="editformcell">
<td>
<b>Condition type</b><br/>
<select name="conditionType">
<option value="necessary">necessary</option>
<option value="necessaryAndSufficient">necessary and sufficient</option>
</select>
</td>
</tr>
<tr class="editformcell">
<td>
<b>Property to restrict</b><br/>
<select name="onProperty">
<form:option name="onProperty"/>
</select>
</td>
</tr>
<jsp:include page="${specificRestrictionForm}"/>

View file

@ -0,0 +1,13 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<tr class="editformcell">
<td>
<b>some values from</b><br/>
<select name="ValueClass">
<form:option name="ValueClass"/>
<!-- TODO: button to create new anonymous class expression -->
</select>
</td>
</tr>

View file

@ -0,0 +1,130 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<tr class="editformcell">
<td valign="bottom" colspan="2">
<b>Tab Title*</b> <i>(a short phrase to appear on headings, menus or pick lists)</i><br/>
<input type="text" name="Title" value="<form:value name="Title"/>" style="width:60%;" maxlength="80" />
<font size="2" color="red"><form:error name="Title"/></font>
</td>
<td valign="bottom" colspan="1">
<b>Tab Shorthand</b> <i>(an alternate phrase for display as <strong>More ...</strong> in the home portal)</i><br/>
<input type="text" name="ShortHand" value="<form:value name="MoreTag"/>" style="width:80%;" maxlength="80" />
<font size="2" color="red"><form:error name="MoreTag"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="3">
<b>Tab Description</b> <i>A single short sentence to summarize the contents for users</i><br/>
<strong>Note that this now becomes the tool tip when the mouse rolls over a primary or secondary tab name</strong><br/>
<input type="text" name="Description" value="<form:value name="Description"/>" style="width:90%;" maxlength="255" />
<font size="2" color="red"><form:error name="Description"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="3">
<b>Tab Body</b> <i>enter any longer text or comment here</i><br/>
<textarea name="Body" rows="10" wrap="soft"><form:value name="Rows"/><form:value name="Body"/></textarea>
<font size="2" color="red"><form:error name="Body"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="top" colspan="1">
<% /*
<b>Originator</b><br>
<input type="text" disabled="disabled" name="UserId" value="<form:value name="UserId"/>"/>
<font size="2" color="red"><form:error name="UserId"/></font>
*/ %>
</td>
<td valign="bottom" colspan="1">
<b>Tab Type</b><br>
<select name="TabtypeId" >
<form:option name="TabtypeId"/>
</select>
<font size="2" color="red"><form:error name="TabtypeId"/></font>
</td>
<td valign="bottom" colspan="1">
<b>Individual link method</b><br /><i>(if method is "by tab-type relationships", select types after editing this tab itself)</i><br />
<select name="EntityLinkMethod" >
<form:option name="EntityLinkMethod"/>
</select>
<font size="2" color="red"><form:error name="EntityLinkMethod"/></font>
</td> </tr>
<tr class="editformcell"><td colspan="3"><hr /></td></tr>
<% /*
<tr class="editformcell">
<td valign="bottom" colspan="3">
<b>URL of RSS feed</b> (must include the full http://... path)<br/>
<input type="text" name="RssURL" value="<form:value name="RssURL"/>" style="width:60%;" maxlength="255" />
<font size="2" color="red"><form:error name="RssURL"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="top" colspan="3">
<b>Portal</b> <i>(like-named tabs in multiple portals are created and modified separately)</i><br />
<input type="text" name="PortalId" value="<form:value name="PortalId"/>">
<br><font size="2" color="red"><form:error name="PortalId"/></font>
</td>
</tr>
*/ %>
<tr class="editformcell">
<td valign="bottom" colspan="1">
<b>Order for display within parent tab</b><br />
<input type="text" name="DisplayRank" value="<form:value name="DisplayRank"/>" size="5" maxlength="11" />
<font size="2" color="red"><form:error name="DisplayRank"/></font>
</td>
<td valign="bottom" colspan="2">
<b>Optional time limit for entities</b> <i>in days; use negative values for the past; not active for manual linking or image galleries</i><br/>
<i>positive values will key off entity <b>timekey</b> field; negative values off entity <b>sunrise</b> field</i><br/>
<input type="text" name="DayLimit" value="<form:value name="DayLimit"/>" size="5" maxlength="11" />
<font size="2" color="red"><form:error name="DayLimit"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="1">
<b>Sort field for related entities</b><br /><i><strong>name</strong>,rand(),timekey,sunset,sunrise</i><br/>
<input type="text" name="EntitySortField" value="<form:value name="EntitySortField"/>" size="10" maxlength="50" />
<font size="2" color="red"><form:error name="EntitySortField"/></font>
</td>
<td valign="bottom" colspan="2">
<b>Sort direction for related entities</b><br /><i>blank for ascending,"desc" for descending</i><br/>
<input type="text" name="EntitySortDirection" value="<form:value name="EntitySortDirection"/>" size="4" maxlength="4" />
<font size="2" color="red"><form:error name="EntitySortDirection"/></font>
</td>
</tr>
<tr class="editformcell"><td colspan="3"><hr /></td></tr>
<tr class="editformcell"><td colspan="3">The following fields apply only when images are involved</td></tr>
<tr class="editformcell">
<td valign="bottom" colspan="1">
<b>Columns of images to display</b><br/>
<i>9 columns of images at 94 pixels wide fits a 1024x768 display window</i><br/>
<input type="text" name="GalleryCols" value="<form:value name="GalleryCols"/>" size="5" maxlength="11" />
<font size="2" color="red"><form:error name="GalleryCols"/></font>
</td>
<td valign="bottom" colspan="1">
<b>Rows of images to display</b><br/>
<i>if only a single row is specified, the A|B|C...|Z choices don't appear with image galleries</i><br/>
<input type="text" name="GalleryRows" value="<form:value name="GalleryRows"/>" size="5" maxlength="11" />
<font size="2" color="red"><form:error name="GalleryRows"/></font>
</td>
<td valign="bottom" colspan="1">
<b>Width for image display</i><br/>
<input type="text" name="ImageWidth" value="<form:value name="ImageWidth"/>" size="5" maxlength="11" />
<font size="2" color="red"><form:error name="ImageWidth"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="1">
<b>Flag 2 Mode</b><em> to support legacy applications - ignore</em><br/>
<input type="text" name="Flag2Mode" value="<form:value name="Flag2Mode"/>" size="10"/>
</td>
<td valign="bottom" colspan="2">
<b>Flag 2 Set</b><br/>
<input type="text" name="Flag2Set" value="<form:value name="Flag2Set"/>" size="50"/>
</td>
</tr>

View file

@ -0,0 +1,28 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<tr class="editformcell">
<td valign="top">
<b>Tab</b><br/>
<select name="TabId" >
<form:option name="TabId"/>
</select>
<font size="2" color="red"><form:error name="TabId"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="top">
<b>Individual</b><br/>
<select name="EntURI" >
<form:option name="EntId"/>
</select>
<font size="2" color="red"><form:error name="EntId"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="1">
<b>Order for display</b> in selected tab; blank will default to zero<br/>
<input type="text" name="DisplayRank" value="<form:value name="DisplayRank"/>" size="5" maxlength="11" />
<font size="2" color="red"><form:error name="DisplayRank"/></font>
</td>
</tr>

View file

@ -0,0 +1,74 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div class="editingForm">
<form id="editForm" name="editForm" action="doTabHierarchyOperation" method="post">
<input type="hidden" name="_epoKey" value="${epoKey}" />
<div align="center">
<table cellpadding="4" cellspacing="2" border="0">
<tr><th colspan="3">
<div class="entryFormHead">
<h2>${title}</h2>
<c:choose>
<c:when test='${_action == "insert"}'>
<h3>Creating New Record</h3>
</c:when>
<c:otherwise>
<h3>Editing Existing Record</h3>
</c:otherwise>
</c:choose>
<span class="entryFormHeadInstructions">(<sup>*</sup> Required Fields)</span>
</div><!--entryFormHead-->
</th></tr>
<tr class="editformcell">
<td valign="top">
<b>Broader tab<sup>*</sup></b><br/>
<select name="ParentId">
<c:forEach var="option" items="${epo.formObject.optionLists['ParentId']}">
<option value="${option.value}">${option.body}</option>
</c:forEach>
</select>
<span class="warning"><form:error name="ParentId"/></span>
</td>
</tr>
<tr class="editformcell">
<td valign="top">
<b>Narrower Tab<sup>*</sup></b><br/>
<select name="ChildId" >
<c:forEach var="option" items="${epo.formObject.optionLists['ChildId']}">
<option value="${option.value}">${option.body}</option>
</c:forEach>
</select>
<span class="warning"><form:error name="ChildId"/></span>
</td>
</tr>
<tr class="editformcell">
<td colspan="3" align="center">
<c:choose>
<c:when test='${_action == "insert"}'>
<input id="primaryAction" type="submit" class="form-button" name="_insert" value="Create New Record"/>
</c:when>
<c:otherwise>
<input id="primaryAction" type="submit" class="form-button" name="_update" value="Submit Changes"/>
<input type="submit" class="form-button" name="_insert" value="Save as New Record"/>
<input type="submit" class="form-button" name="_delete" onclick="return confirmDelete();" value="Delete"/>
</c:otherwise>
</c:choose>
<input type="reset" class="form-button" value="Reset"/>
<input type="submit" class="form-button" name="_cancel" value="Cancel"/>
</td>
</tr>
</table>
</div><!--alignCenter-->
</form>
</div><!--editingform-->

View file

@ -0,0 +1,21 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<tr class="editformcell">
<td valign="top">
<b>Tab</b><br/>
<select name="TabId" >
<form:option name="TabId"/>
</select>
<font size="2" color="red"><form:error name="TabId"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="top">
<b>Vclass</b><br/>
<select name="VClassURI" >
<form:option name="VClassId"/>
</select>
<font size="2" color="red"><form:error name="VClassId"/></font>
</td>
</tr>

View file

@ -0,0 +1,200 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<div class="editingForm">
<jsp:include page="/templates/edit/fetch/vertical.jsp"/>
<%
/**
*
* @version 1.00
* @author Jon Corson-Rikert
*
* UPDATES:
* BJL 2007-XX-XX : significant modifications for semweb-align (removed SQL tags, etc.)
* JCR 2006-03-05 : modified references to ETypes and change property file used to display auto-affiliated vclasses (a.k.a. types)
* JCR 2005-11-06 : modified field specifications for tab editing so tabs_retry will get numeric rather than String versions of flag2Set and flag3Set
*/
%>
<c:set var="PRIMARY_TAB_TABTYPE" value="28"/>
<c:set var="SUBCOLLECTION_CATEGORY_TABTYPE" value="18"/>
<p/>
<div align="center">
<table class="form-background" border="0" cellpadding="2" cellspacing="2">
<tr valign="bottom" align="center">
<td>
<form action="./" method="get">
<input type="submit" class="form-button" value="Display This Tab (Public)"/>
<input type="hidden" name="primary" value="${tab.tabId}" />
<input type="hidden" name="home" value="${portal.portalId}" />
</form>
<form action="listTabs" method="get">
<input type="submit" class="form-button" value="See All Tabs"/>
<input type="hidden" name="home" value="${portal.portalId}" />
</form>
</td>
<td valign="bottom" align="center">
<form action="editForm" method="get">
<input name="id" type = "hidden" value="<%=request.getAttribute("tabId")%>" />
<input type="submit" class="form-button" value="Edit Tab Details"/>
<input type="hidden" name="home" value=""${portal.portalId}" />
<input type="hidden" name="controller" value="Tab"/>
</form>
</td>
<td valign="bottom">
<form action="editForm" method="get">
<input type="hidden" name="portalId" value="${portal.portalId}"/>
<input type="hidden" name="home" value="${portal.portalId}" />
<input type="submit" class="form-button" value="Add New Tab"/>
<input type="hidden" name="controller" value="Tab"/>
</form>
</td>
</tr>
<tr><td colspan="3"><hr/></td></tr>
<!-- ____________________________ parent tabs ______________________________________ -->
<c:choose>
<c:when test="${tab.tabtypeId < PRIMARY_TAB_TABTYPE}">
<tr valign="bottom">
<td colspan="2" valign="bottom">
<c:if test="${!empty epo.formObject.checkboxLists['parentTabs']}">
<form action="doTabHierarchyOperation" method="get">
<ul>
<c:forEach var="cb" items="${epo.formObject.checkboxLists['parentTabs']}">
<li style="list-style-type:none"><input name="ParentId" type="checkbox" value="${cb.value}"/>${cb.body}</li>
</c:forEach>
</ul>
<input type="submit" class="form-button" value="Remove checked parent tabs"/>
<input type="hidden" name="home" value="${portal.portalId}" />
<input type="hidden" name="ChildId" value="${tab.tabId}"/>
<input type="hidden" name="primaryAction" value="_remove"/>
<input type="hidden" name="_epoKey" value="${tabHierarchyEpoKey}"/>
</form>
</c:if>
</td>
<td>
<form action="editForm" method="get">
<input type="hidden" name="home" value="${portal.portalId}" />
<input type="hidden" name="ChildId" value="${tab.tabId}">
<input type="hidden" name="controller" value="Tabs2Tabs"/>
<input type="submit" class="form-button" value="Add existing tab as parent tab"/>
</form>
</td>
</tr>
</c:when>
<c:otherwise>
<tr><td colspan="3" align="center">This is the highest level tab for any portal, so no links to higher tabs are possible.</td></tr>
</c:otherwise>
</c:choose>
<tr><td colspan="3"><hr/></td></tr>
<!-- _____________________________________ child tabs ___________________________________________ -->
<c:choose>
<c:when test="${tab.tabtypeId>SUBCOLLECTION_CATEGORY_TABTYPE}">
<tr valign="bottom">
<td colspan="2" valign="bottom">
<c:if test="${!empty epo.formObject.checkboxLists['childTabs']}">
<form action="doTabHierarchyOperation" method="get">
<ul>
<c:forEach var="cb" items="${epo.formObject.checkboxLists['childTabs']}">
<li style="list-style-type:none"><input name="ChildId" type="checkbox" value="${cb.value}"/>${cb.body}</li>
</c:forEach>
</ul>
<input type="hidden" name="ParentId" value="${tab.tabId}"/>
<input type="submit" class="form-button" value="Remove checked child tabs"/>
<input type="hidden" name="home" value="${portal.portalId}" />
<input type="hidden" name="primaryAction" value="_remove"/>
<input type="hidden" name="_epoKey" value="${tabHierarchyEpoKey}"/>
</form>
</c:if>
</td>
<td>
<form action="editForm" method="get">
<input type="hidden" name="home" value="${portal.portalId}" />
<input type="hidden" name="ParentId" value="${tab.tabId}">
<input type="hidden" name="controller" value="Tabs2Tabs">
<input type="submit" class="form-button" value="Add existing tab as child tab"/>
</form>
</td>
</tr>
</c:when>
<c:otherwise>
<tr><td colspan="3" align="center">This is the lowest level tab for any portal, so no links to lower tabs are possible.</td></tr>
</c:otherwise>
</c:choose>
<tr><td colspan="3"><hr/></td></tr>
<!-- ________________________________________________ vClasses __________________________________________________ -->
<c:choose>
<c:when test="${tab.entityLinkMethod eq 'auto' || tab.entityLinkMethod eq 'mixed'}">
<tr valign="bottom" align="center">
<td colspan="2" valign="bottom" align="left">
<c:if test="${!empty affilTypes}">
<form action="tabs2TypesOp" method="get">
<ul style="list-style-type:none;">
<c:forEach var="type" items="${affilTypes}">
<li style="list-style-type:none;"><input type="checkbox" name="TypeURI" value="${type.URI}">${type.name}</input></li>
</c:forEach>
</ul>
<input type="hidden" name="TabId" value="${tab.tabId}"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="operation" value="remove"/>
<input type="hidden" name="_epoKey" value="${epoKey}"/>
<input type="submit" class="form-button" value="Remove Checked Class Autolinks"/>
</form>
</c:if>
</td>
<td>
<form action="editForm" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="TabId" value="${tab.tabId}"/>
<input type="hidden" name="controller" value="Tabs2Types"/>
<input type="submit" class="form-button" value="Add Class Autolink"/>
</form>
</td>
</tr>
<tr><td colspan="3"><hr/></td></tr>
</c:when>
<c:otherwise><tr><td colspan="3" align="center">This tab is set for manual links to individuals only. Auto-affiliation with a type is not possible.</td></tr><tr><td colspan="3"><hr/></td></tr></c:otherwise>
</c:choose>
<!-- _______________________________________ entities ___________________________________________________ -->
<c:choose>
<c:when test="${tab.entityLinkMethod eq 'manual' || tab.entityLinkMethod eq 'mixed'}">
<tr valign="bottom" align="center">
<td colspan="2" valign="bottom" align="left">
<c:if test="${!empty epo.formObject.checkboxLists['affilEnts']}">
<form action="tabIndividualRelationOp" method="get">
<ul style="list-style-type:none;">
<c:forEach var="cb" items="${epo.formObject.checkboxLists['affilEnts']}">
<li style="list-style-type:none;"><input type="checkbox" name="TirURI" value="${cb.value}" class="form-item"/>${cb.body}</li>
</c:forEach>
</ul>
<input type="hidden" name="TabId" value="${tab.tabId}"/>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="operation" value="remove"/>
<input type="hidden" name="_epoKey" value="${epoKey}"/>
<input type="submit" class="form-button" value="Remove Checked Individuals"/>
</form>
</c:if>
</td>
<td>
<form action="editForm" method="get">
<select name="VClassUri" class="form-item">
<form:option name="VClassURI"/>
</select><br/>
<p>Select class of individual</p>
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="hidden" name="TabId" value="${tab.tabId}"/>
<input type="hidden" name="controller" value="Tabs2Ents"/>
<input type="submit" class="form-button" value="Add an individual to this tab"/>
</form>
</td>
</tr>
</c:when>
<c:otherwise><tr><td colspan="3" align="center">This tab is set for tab-type relationships only; direct links to individuals are not possible</td></tr></c:otherwise>
</c:choose>
</table>
</div>
</div>

View file

@ -0,0 +1,43 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<div class="staticPageBackground">
<form action="uploadRDF" method="post" enctype="multipart/form-data" >
<c:if test="${!empty param.errMsg}">
<p><strong class="warning">${errMsg}</strong></p>
</c:if>
<p>Enter Web-accessible URL of RDF document:</p>
<p><input name="rdfUrl" type="text" style="width:67%;" value="<c:out value='${param.rdfUrl}'/>"/></p>
<p>Or upload a file from your computer: </p>
<p><input type="file" name="rdfStream"/> </p>
<p><input type="radio" name="mode" value="add" checked="checked"/>add RDF <input type="radio" name="mode" value="remove"/>remove RDF</p>
<select name="language">
<option value="RDF/XML">RDF/XML</option>
<option value="N3">N3</option>
<option value="N-TRIPLE">N-Triples</option>
<option value="TTL">Turtle</option>
</select>
<p><input type="checkbox" name="makeClassgroups" value="true"/> create classgroups automatically</p>
<c:if test="${requestScope.singlePortal == true}">
<input type="hidden" name="checkIndividualsIntoPortal" value="current"/>
</c:if>
<c:if test="${requestScope.singlePortal == false }">
<p>
<input type="radio" name="checkIndividualsIntoPortal" value="current"/> make individuals visible in current portal
<input type="radio" name="checkIndividualsIntoPortal" value="all"/> make individuals visible in all portals
</p>
</c:if>
<p><input type="submit" name="submit" value="submit"/></p>
</form>
</div>

View file

@ -0,0 +1,10 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<div class="staticPageBackground">
<p><c:out value="${requestScope.uploadDesc }"/></p>
</div>

View file

@ -0,0 +1,125 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<table cellpadding="1" cellspacing="1" border="0" width="100%">
<c:choose>
<c:when test="${!empty processError}">
<tr>
<td align="center" colspan="7">
<font color="red">Results from processing input file:</font><br/>
${processError}
<c:if test="${!empty outputLink}">
<br/><font color="red">Link to check uploaded image:</font><br/>
<${outputLink}>
<c:if test="${processErrorUpdated}">
<p>
<form action="entity" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}"/>
<input type="submit" class="form-button" value="view updated record"/>
<input type="hidden" name="entityUri" value="${individual.URI}"/>
</form>
</p>
</c:if>
</c:if>
</td>
</tr>
</c:when>
</c:choose>
<tr><td align="center" colspan="7">
<form name="uploadForm" action="uploadImages" method="post" ENCTYPE="multipart/form-data">
<input type="hidden" name="home" value="${portalBean.portalId}"/>
<input type="hidden" name="submitter" value="${loginName}"/>
<input type="hidden" name="destination" value="images" />
<input type="hidden" name="contentType" value="image/jpeg/gif/pjpeg" />
<table width="100%" cellpadding="4" cellspacing="2" border="1">
<tr>
<td bgcolor="#C8D8F8" valign="middle" colspan="1" align="right">
<b>Individual</b>
</td>
<td bgcolor="#C8D8F8" valign="middle" align="left" colspan="2">
<c:choose>
<c:when test="${individual != null}">
<select name="entityUri" style="width:95%;">
<option value="${individual.URI}">${individual.name}</option>
</select>
</c:when>
<c:otherwise>
<p>No individuals match the incoming parameters or no individual was specified in the request</p>
</c:otherwise>
</c:choose>
</td>
</tr>
<tr>
<td bgcolor="#C8D8F8" valign="middle" colspan="1" align="right">
<b>Select Image Type</b><br/>
</td>
<td colspan="2" bgcolor="#C8D8F8" align="left">
<input type="radio" name="type" value="thumb" checked="checked" onclick="refreshModeValue();" /> thumbnail (150px x 150px only)
<input type="radio" name="type" value="larger" onclick="refreshModeValue();" /> optional larger image
</td>
</tr>
<tr>
<td bgcolor="#C8D8F8" valign="middle" colspan="1" align="right">
<b>Select Image File</b>
<c:if test="${!empty inputLink}">
<br/>${inputLink}
</c:if>
</td>
<td colspan="2" bgcolor="#C8D8F8" align="left">
<input type="file" size="55" name="file1"/>
</td>
</tr>
<tr>
<td bgcolor="#C8D8F8" valign="middle" colspan="1" align="right">
<b>Optional remote image link</b>
</td>
<td colspan="2" bgcolor="#C8D8F8" align="left">
<div id="thumbnailExtra" class="dropdownExtra">
(instead of uploading larger image -- use only when uploading thumbnail)<br/>
<input type="text" size="55" name="remoteURL" value="http://"/>
</div>
</td>
</tr>
<tr>
<td bgcolor="#C8D8F8" valign="middle" colspan="1" align="right">
<b>Destination Directory</b><br/>
</td>
<td colspan="2" bgcolor="#C8D8F8" align="left">
<input type="radio" name="destination" value="buildings" /> buildings<br/>
<input type="radio" name="destination" value="events" /> events<br/>
<input type="radio" name="destination" value="logos" /> logos<br/>
<input type="radio" name="destination" value="people" checked="checked" /> people<br/>
<input type="radio" name="destination" value="projects" /> projects<br/>
<input type="radio" name="destination" value="science" /> science<br/>
<input type="radio" name="destination" value="other" /> other<br/>
</td>
</tr>
<tr>
<td bgcolor="#C8D8F8" valign="middle" colspan="1" align="right">
<b>Select Processing Mode</b><br/>
</td>
<td colspan="2" bgcolor="#C8D8F8" align="left">
<input type="radio" name="mode" value="upload"/> upload image
<input type="radio" name="mode" value="replace" checked="checked"/> upload and replace any existing image or URL
</td>
</tr>
<tr>
<td colspan="3" bgcolor="#C8D8F8" align="center">
<p>
<input type="submit" name="submitMode" class="yellowbutton" value="Upload Selected Image"/>
<input type="reset" name="reset" class="plainbutton" value="Reset" onclick="document.refreshForm.submit();"/>
</p>
</td>
</tr>
</table>
</form>
</td>
</tr>
<tr><td colspan="7">
</td>
</tr>
</table>
<form action="uploadimages.jsp" name="refreshForm" >
<input type="hidden" name="entityUri" value="${individual.URI}" />
</form>

View file

@ -0,0 +1,27 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<script type="text/javascript" language="JavaScript" src="js/toggle.js"></script>
<script type="text/javascript" language="JavaScript">
/**************************************************** MODE OPTIONS ***********************************************************/
function refreshModeValue() {
var thumbnailMode = document.uploadForm.type[1].checked;
thumbnailMode = !thumbnailMode;
//alert("thumbnailMode set to " + thumbnailMode );
if ( thumbnailMode ) {
document.uploadForm.type[0].checked=true;
document.uploadForm.type[1].checked=false;
} else {
document.uploadForm.type[0].checked=false;
document.uploadForm.type[1].checked=true;
}
switchElementDisplay('thumbnailExtra');
}
</script>
<style type="text/css">
.dropdownExtra { display: none; }
</style>

View file

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
<div class="editingForm">
<jsp:include page="/templates/edit/fetch/vertical.jsp"/>
<div align="center">
<table class="form-background" border="0" cellpadding="2" cellspacing="2">
<tr valign="bottom" align="center">
<td>
<form action="listUsers" method="get">
<input type="hidden" name="home" value="${portalBean.portalId}" />
<input type="submit" class="form-button" value="See All User Accounts"/>
</form>
</td>
<td valign="bottom" align="center">
<form action="editForm" method="get">
<input name="home" type="hidden" value="${portalBean.portalId}" />
<input name="uri" type = "hidden" value="${user.URI}" />
<input type="submit" class="form-button" value="Edit User Account"/>
<input type="hidden" name="controller" value="User"/>
</form>
<form action="editForm" method="get">
<input name="home" type="hidden" value="${portalBean.portalId}" />
<input name="uri" type = "hidden" value="${user.URI}" />
<input name="Md5password" type="hidden" value=""/>
<input name="OldPassword" type="hidden" value=""/>
<input type="submit" class="form-button" value="Reset Password"/>
<input type="hidden" name="controller" value="User"/>
</form>
</td>
<td valign="bottom">
<form action="editForm" method="get">
<input name="home" type="hidden" value="${portalBean.portalId}" />
<input type="hidden" name="controller" value="User"/>
<input type="submit" class="form-button" value="Add New User Account"/>
</form>
</td>
</tr>
</table>
</div>
</div>
</jsp:root>

View file

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:c="http://java.sun.com/jstl/core" xmlns:form="http://vitro.mannlib.cornell.edu/edit/tags" version="2.0">
<tr class="editformcell">
<td valign="bottom" colspan="2">
<b>User Name*</b><br/>
<input type="text" name="Username" value="${formValue['Username']}" size="60" maxlength="120" />
<span class="warning"><form:error name="Username"/></span>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="1">
<b>First Name</b><br/>
<input type="text" name="FirstName" value="${formValue['FirstName']}" size="30" maxlength="120"/>
<span class="warning"><form:error name="FirstName"/></span>
</td>
<td valign="bottom" colspan="1">
<b>Last Name</b><br/>
<input type="text" name="LastName" value="${formValue['LastName']}" size="30" maxlength="120"/>
<span class="warning"><form:error name="LastName"/></span>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="2">
<b>Role</b><br/>
<select name="RoleURI">
<form:option name="Role"/>
</select>
<span class="warning"><form:error name="Role"/></span>
</td>
</tr>
<c:if test="${empty user.md5password}">
<tr class="editformcell">
<td valign="bottom" colspan="2">
<b>Password (6-12 characters)</b><br/>
<input type="password" name="Md5password" value="${formValue['Md5password']}" size="64" maxlength="128"/>
<span class="warning"><form:error name="Md5password"/></span>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="2">
<b>Confirm password</b><br/>
<input type="password" name="passwordConfirmation" value="" size="64" maxlength="128"/>
</td>
</tr>
</c:if>
</jsp:root>

View file

@ -0,0 +1,37 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<script language="JavaScript" type="text/javascript" src="js/md5.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
function forceCancel(theForm) { // we don't want validation to stop us if we're canceling
theForm.Md5password.value = "CANCEL"; // a dummy string to force validation to succeed
theForm.passwordConfirmation.value = theForm.Md5password.value;
return true;
}
function hashPw(theForm) {
if (theForm.Md5password.value != theForm.passwordConfirmation.value) {
alert("The passwords do not match.");
theForm.Md5password.focus();
return false;
}
if (theForm.Md5password.value.length < 6 || theForm.Md5password.value.length > 12) {
alert("Please enter a password between 6 and 12 characters long.");
theForm.Md5password.focus();
return false;
} else {
theForm.Md5password.value=calcMD5(theForm.Md5password.value);
theForm.passwordConfirmation.value=theForm.Md5password.value;
return true;
}
}
function confirmDelete() {
var msg="Are you SURE you want to delete this user? If in doubt, CANCEL."
return confirm(msg);
}
-->
</script>

View file

@ -0,0 +1,116 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:c="http://java.sun.com/jstl/core" xmlns:form="http://vitro.mannlib.cornell.edu/edit/tags" version="2.0">
<tr class="editformcell">
<td valign="bottom" colspan="2">
<b>Class Name*</b><i> for editing pick lists and the Index</i><br/>
<i>... use initial capital letters; spaces OK</i><br/>
<input type="text" name="Name" value="${formValue['Name']}" style="width:90%" maxlength="120" />
<span class="warning"><form:error name="Name"/></span>
</td>
<td valign="bottom" colspan="1">
<b>Display Level</b><br /><i>(specify least restrictive level allowed)</i><br/>
<select name="HiddenFromDisplayBelowRoleLevelUsingRoleUri"><form:option name="HiddenFromDisplayBelowRoleLevelUsingRoleUri"/></select>
<font size="2" color="red"><form:error name="HiddenFromDisplayBelowRoleLevelUsingRoleUri"/></font>
</td>
<td valign="bottom" colspan="1">
<b>Update Level</b><br /><i>(specify least restrictive level allowed)</i><br />
<select name="ProhibitedFromUpdateBelowRoleLevelUsingRoleUri"><form:option name="ProhibitedFromUpdateBelowRoleLevelUsingRoleUri"/></select>
<font size="2" color="red"><form:error name="ProhibitedFromUpdateBelowRoleLevelUsingRoleUri"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="1">
<b>Class Group</b><br/>
<i>for search results and the Index</i><br/>
<select name="GroupURI" ><form:option name="GroupURI"/></select>
<span class="warning"><form:error name="GroupURI"/></span>
</td>
<td valign="bottom" colspan="2">
<b>Ontology</b><br/>
<c:choose>
<c:when test="${_action eq 'update'}">
<i>Change via the "change URI" button on previous screen</i><br/>
<select name="Namespace" disabled="disabled"><form:option name="Namespace"/></select>
</c:when>
<c:otherwise>
<i>(must be a valid XML name without spaces)</i><br/>
<select name="Namespace"><form:option name="Namespace"/></select>
</c:otherwise>
</c:choose>
<span class="warning"><form:error name="Namespace"/></span>
</td>
<td valign="bottom" colspan="1">
<b>Internal Name</b><br/>
<c:choose>
<c:when test="${_action eq 'update'}">
<i>Change via "change URI"</i><br/>
<input name="LocalName" disabled="disabled" value="${formValue['LocalName']}" style="width:90%"/>
</c:when>
<c:otherwise>
<i>must be valid XML</i><br/><i>by convention starts with a capital letter</i><br/>
<input name="LocalName" value="${formValue['LocalName']}" style="width:90%"/>
</c:otherwise>
</c:choose>
<span class="warning"><form:error name="LocalName"/></span>
</td>
</tr>
<tr class="editformcell">
<td valign="top" colspan="4">
<b>Short Definition</b><br/>
<input type="text" name="ShortDef" value="${formValue['ShortDef']}" style="width:95%" maxlength="255" />
<span class="warning"><form:error name="ShortDef"/></span>
</td>
</tr>
<tr class="editformcell">
<td valign="top" colspan="4">
<b>Example</b><br/>
<input type="text" name="Example" value="${formValue['Example']}" style="width:95%" maxlength="120" />
<span class="warning"><form:error name="Example"/></span>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="4">
<b>Description</b><br/>
<textarea style="width:95%;height:10ex;" name="Description"><form:value name="Description"/></textarea>
<span class="warning"><form:error name="Description"/></span>
</td>
</tr>
<tr class="editformcell">
<td valign="top" colspan="1">
<b>Display Limit</b><br/>
<input style="width:95%;" type="text" name="DisplayLimit" value="${formValue['DisplayLimit']}" maxlength="120" />
<span class="warning"><form:error name="DisplayLimit"/></span>
</td>
<td valign="top" colspan="1">
<b>Display Rank</b><br/>
<input size="4" type="text" name="DisplayRank" value="${formValue['DisplayRank']}" maxlength="120" />
<span class="warning"><form:error name="DisplayRank"/></span>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="1">
<em>Optional: <strong>custom entry form</strong></em><br />
<input name="CustomEntryForm" style="width:90%" value="${formValue['CustomEntryForm']}"/>
<font size="2" color="red"><form:error name="CustomEntryForm"/></font>
</td>
<td valign="bottom" colspan="1">
<em>Optional: <strong>custom display view</strong></em><br />
<input name="CustomDisplayView" style="width:90%" value="${formValue['CustomDisplayView']}"/>
<font size="2" color="red"><form:error name="CustomDisplayView"/></font>
</td>
<td valign="bottom" colspan="1">
<em>Optional: <strong>custom short view</strong></em><br />
<input name="CustomShortView" style="width:90%" value="${formValue['CustomShortView']}"/>
<font size="2" color="red"><form:error name="CustomShortView"/></font>
</td>
<td valign="bottom" colspan="1">
<em>Optional: <strong>custom search view</strong></em><br />
<input name="CustomSearchView" style="width:90%" value="${formValue['CustomSearchView']}"/>
<font size="2" color="red"><form:error name="CustomSearchView"/></font>
</td>
</tr>
</jsp:root>

View file

@ -0,0 +1,54 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.ApplicationBean"%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.flags.PortalFlagChoices" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ page errorPage="/error.jsp"%>
<% /***********************************************
Displays the little group of things at the bottom of the page
for administrators and editors.
request.attributes:
an Entity object with the name "entity"
request.parameters:
None, should only work with requestScope attributes for security reasons.
Consider sticking < % = MiscWebUtils.getReqInfo(request) % > in the html output
for debugging info.
bdc34 2006-01-22 created
**********************************************/
Individual entity=(Individual)request.getAttribute("entity");
if (entity == null){
String e="entityAdmin.jsp expects that request attribute 'entity' be set to the Entity object to display.";
throw new JspException(e);
}
%>
<c:if test="${sessionScope.loginHandler != null &&
sessionScope.loginHandler.loginStatus == 'authenticated' &&
sessionScope.loginHandler.loginRole >= sessionScope.loginHandler.editor }">
<c:set var='entity' value='${requestScope.entity}'/><%/* just moving this into page scope for easy use */ %>
<c:set var='portal' value='${requestScope.portal}'/>
<div class='admin top'>
<h3 class="toggle">Admin Panel</h3>
<div class="panelContents">
<c:url var="editHref" value="/entityEdit">
<c:param name="home" value="${currentPortalId}"/>
<c:param name="uri" value="${entity.URI}"/>
</c:url>
<a href='<c:out value="${editHref}"/>'> edit this individual</a> |
<c:url var="cloneHref" value="/cloneEntity">
<c:param name="home" value="${currentPortalId}"/>
<c:param name="uri" value="${entity.URI}"/>
</c:url>
<a href='<c:out value="${cloneHref}"/>'> clone this individual </a>
<p>Resource URI: <c:out value="${entity.URI}"/></p>
</div>
</div>
</c:if>

View file

@ -0,0 +1,172 @@
<%-- $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="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" %>
<%@ 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");
%>
<c:if test="${!empty entityURI}">
<c:set var="myEntityURI" scope="request" value="${entityURI}"/>
<%
try {
VitroRequest vreq = new VitroRequest(request);
entity = vreq.getWebappDaoFactory().getIndividualDao().getIndividualByURI((String)request.getAttribute("myEntityURI"));
System.out.println("entityBasic rendering "+entity.getURI());
} catch (Exception e) {
e.printStackTrace();
}
%>
</c:if>
<%
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);
}%>
<c:if test="${sessionScope.loginHandler != null &&
sessionScope.loginHandler.loginStatus == 'authenticated' &&
sessionScope.loginHandler.loginRole >= LoginFormBean.NON_EDITOR}">
<c:set var="showCuratorEdits" value="${true}"/>
</c:if>
<c:set var='imageDir' value='images' />
<c:set var="themeDir"><c:out value="${portalBean.themeDir}" /></c:set>
<%
//here we build up the url for the larger image.
String imageUrl = null;
if (entity.getImageFile() != null &&
entity.getImageFile().indexOf("http:")==0) {
imageUrl = entity.getImageFile();
} else {
imageUrl = response.encodeURL( "/images/" + entity.getImageFile() );
}
//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);
%>
<c:set var='entity' value='${requestScope.entity}'/><%/* just moving this into page scope for easy use */ %>
<c:set var='entityMergedPropsListJsp' value='/entityMergedPropList'/>
<c:set var='portal' value='${currentPortalId}'/>
<c:set var='portalBean' value='${currentPortal}'/>
<c:set var='themeDir'><c:out value='${portalBean.themeDir}' /></c:set>
<div id="content">
<jsp:include page="entityAdmin.jsp"/>
<div class='contents entity'>
<div id="label">
<c:choose>
<c:when test="${!empty relatedSubject}">
<h2><p:process>${relatingPredicate.domainPublic} for ${relatedSubject.name}</p:process></h2>
<c:url var="backToSubjectLink" value="/entity">
<c:param name="home" value="${portalBean.portalId}"/>
<c:param name="uri" value="${relatedSubject.URI}"/>
</c:url>
<p><a href="${backToSubjectLink}">&larr; return to ${relatedSubject.name}</a></p>
</c:when>
<c:otherwise>
<h2><p:process>${entity.name}</p:process></h2>
<c:if test="${!empty entity.moniker}">
<p:process><em class="moniker">${entity.moniker}</em></p:process>
</c:if>
</c:otherwise>
</c:choose>
</div><!-- entity label -->
<c:if test="${ (!empty entity.anchor) || (!empty entity.linksList) }">
<ul class="externalLinks">
<c:if test="${!empty entity.anchor}">
<c:choose>
<c:when test="${!empty entity.url}">
<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:when>
<c:otherwise>
<li class="primary"><span class="externalLink"><p:process>${entity.anchor}</p:process></span></li>
</c:otherwise>
</c:choose>
</c:if>
<c:if test="${!empty entity.linksList }">
<c:forEach items="${entity.linksList}" var='link' varStatus="count">
<c:url var="linkUrl" value="${link.url}" />
<c:choose>
<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>
</c:if>
<c:if test="${!empty entity.imageThumb}">
<div class="thumbnail">
<c:if test="${!empty entity.imageFile}">
<c:url var="imageUrl" value="/${imageDir}/${entity.imageFile}" />
<a class="image" href="${imageUrl}">
</c:if>
<c:url var="imageSrc" value='/${imageDir}/${entity.imageThumb}'/>
<img src="<c:out value="${imageSrc}"/>" title="click to view larger image in new window" alt="" width="150"/>
<c:if test="${!empty entity.imageFile}"></a></c:if>
</div>
<c:if test="${!empty entity.citation}">
<div class="citation">${entity.citation}</div>
</c:if>
</c:if>
<p:process>
<div class='description'>${entity.blurb}</div>
<div class='description'>${entity.description}</div>
</p:process>
<c:choose>
<c:when test="${showCuratorEdits || showSelfEdits}">
<c:import url="${entityMergedPropsListJsp}">
<c:param name="mode" value="edit"/>
<c:param name="grouped" value="false"/>
<%-- unless a value is provided, properties not assigned to a group will not have a tab or appear on the page --%>
<c:param name="unassignedPropsGroupName" value=""/>
</c:import>
</c:when>
<c:otherwise>
<c:import url="${entityMergedPropsListJsp}">
<c:param name="grouped" value="false"/>
<%-- unless a value is provided, properties not assigned to a group will not have a tab or appear on the page --%>
<c:param name="unassignedPropsGroupName" value=""/>
</c:import>
</c:otherwise>
</c:choose>
<p/>
<p:process>
<c:if test="${(!empty entity.citation) && (empty entity.imageThumb)}">
<div class="citation">${entity.citation}</div>
</c:if>
<c:if test="${!empty entity.keywordString}">
<p id="keywords">Keywords: ${entity.keywordString}</p>
</c:if>
</p:process>
${requestScope.servletButtons}
</div>
</div> <!-- content -->

View file

@ -0,0 +1,64 @@
<%-- $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" %>
<%@ 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.WebappDaoFactory" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.KeywordProperty" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.KeywordDao" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Keyword" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.KeywordIndividualRelation" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.KeywordIndividualRelationDao" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %>
<%@ page import="org.apache.commons.logging.Log" %>
<%@ page import="org.apache.commons.logging.LogFactory" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="java.util.List" %>
<%@ taglib uri="http://vitro.mannlib.cornell.edu/vitro/tags/StringProcessorTag" prefix="p" %>
<%!
public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.templates.entity.entityKeywordsList.jsp");
%>
<%
if (!LoginFormBean.loggedIn(request, LoginFormBean.CURATOR)) {%>
<c:redirect url="<%= Controllers.LOGIN %>" />
<%
}
Individual ent = (Individual)request.getAttribute("entity");
if (ent==null) {
log.error("No incoming entity in entityKeywordsList.jsp");
}
VitroRequest vreq = new VitroRequest(request);
KeywordProperty kProp = new KeywordProperty("has keyword","keywords",0,null);
WebappDaoFactory wdf = vreq.getWebappDaoFactory();
KeywordIndividualRelationDao kirDao = wdf.getKeys2EntsDao();
KeywordDao kDao = wdf.getKeywordDao();
List<KeywordIndividualRelation> kirs = kirDao.getKeywordIndividualRelationsByIndividualURI(ent.getURI());
if (kirs != null) {
int keyCount=0;
Iterator kirIt = kirs.iterator();
while (kirIt.hasNext()) {
KeywordIndividualRelation kir = (KeywordIndividualRelation) kirIt.next();
if (kir.getKeyId() > 0) {
Keyword k = kDao.getKeywordById(kir.getKeyId());
if (k != null) {
++keyCount;
if (keyCount==1) {%>
<h3 class="propertyName">Keywords</h3>
<div class="datatypePropertyValue">
<% } else { %>
<c:out value=", "/>
<% }%>
<c:out value="<%=k.getTerm()%>"/>
<% }
}
}%>
</div><%
}
%>

View file

@ -0,0 +1,103 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%><%/* this odd thing points to something in web.xml */ %>
<%@ page errorPage="/error.jsp"%>
<% /***********************************************
Display a List of Entities in the most basic fashion.
request.attributes:
a List of Entity objects with the name "entities"
portal id as "portal"
request.parameters:
None yet.
Consider sticking < % = MiscWebUtils.getReqInfo(request) % > in the html output for debugging info.
bdc34 2006-01-27 created
**********************************************/
if (request.getAttribute("entities") == null){
String e="entityList.jsp expects that request attribute 'entities' be set to a List of Entity objects.";
throw new JspException(e);
}
%>
<c:set var='entities' value='${requestScope.entities}' /><%/* just moving this into page scope for easy use */ %>
<c:set var='portal' value='${requestScope.portal}' />
<c:set var='title' value='${requestScope.title}' />
<c:set var='subTitle' value='${requestScope.subTitle}' />
<div id="content">
<div class="contents">
<div class="entityList">
<h2>${title}</h2>
<c:if test="${!empty subTitle}"><h4>${subTitle}"</h4></c:if>
<% /* <p>${pageTime} milliseconds</p> */ %>
<ul>
<c:forEach items='${entities}' var='ent'>
<li>
<c:forEach items="${ent.VClasses}" var="type">
<c:if test="${!empty type.customSearchView}">
<c:set var="altRenderJsp" value="${type.customSearchView}"/>
</c:if>
</c:forEach>
<c:url var="entHref" value="/entity">
<c:param name="home" value="${portal.portalId}"/>
<c:param name="uri" value="${ent.URI}"/>
</c:url>
<a href='<c:out value="${entHref}"/>'><p:process><c:out value="${ent.name}"/></p:process></a>
<c:choose>
<c:when test="${!empty ent.moniker}">
| <p:process><c:out value="${ent.moniker}"/></p:process>
</c:when>
<c:otherwise>
<c:out value="${ent.VClass.name}"/>
</c:otherwise>
</c:choose>
<c:choose>
<c:when test="${!empty altRenderJsp}">
<c:set scope="request" var="individual" value="${ent}"/>
<c:if test="${!empty ent.url}">
<%-- decide here whether to render a link on the included page by setting individualUrl in the request scope --%>
<c:set scope="request" var="individualURL" value="${ent.url}"/>
</c:if>
<c:catch var="e">
<jsp:include page="/templates/search/${altRenderJsp}" flush="true"/>
<c:remove var="altRenderJsp"/>
</c:catch>
<c:if test="${e != null}">
<!-- unable to include ${altRenderJsp} -->
</c:if>
</c:when>
<c:otherwise>
<c:if test="${!empty ent.anchor}"> |
<c:choose>
<c:when test="${!empty ent.url}">
<c:url var="entUrl" value="${ent.url}" />
<a class="externalLink" href='<c:out value="${entUrl}"/>'><c:out value="${ent.anchor}"/></a>
</c:when>
<c:otherwise>
<i><c:out value="${ent.anchor}"/></i>
</c:otherwise>
</c:choose>
</c:if>
<c:forEach items='${ent.linksList}' var="entLink">
| <c:url var="entLinkUrl" value="${entLink.url}" />
<a class="externalLink" href="<c:out value='${entLinkUrl}'/>"><c:out value="${entLink.anchor}"/></a>
</c:forEach>
</c:otherwise>
</c:choose>
</li>
</c:forEach>
</ul>
</div> <!--end entityList-->
<% /* add supplementary text provided by controllers such as "CoAuthorServlet" */ %>
<c:if test="${!empty requestScope.suppText}">
${requestScope.suppText}
</c:if>
</div> <!--end contents-->
</div><!-- end content -->

View file

@ -0,0 +1,63 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page import="java.util.*,edu.cornell.mannlib.vitro.webapp.beans.Individual"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%><%/* this odd thing points to something in web.xml */ %>
<%@ page errorPage="/error.jsp"%>
<% /***********************************************
Display a List of Entities in the most basic fashion.
request.attributes:
a List of Entity objects with the name "entities"
portal id as "portal"
request.parameters:
"rows" is number of rows in gallery table
"columns" is number of columns in gallery table
Consider sticking < % = MiscWebUtils.getReqInfo(request) % > in the html output for debugging info.
bdc34 2006-01-27 created
**********************************************/
if (request.getAttribute("entities") == null){
String e="entityListForTabs.jsp expects that request attribute 'entities' be set to a List of Entity objects.";
throw new JspException(e);
}
%>
<c:set var='entities' value='${requestScope.entities}' /><%/* just moving this into page scope for easy use */ %>
<c:set var='portal' value='${requestScope.portal}' />
<c:set var='count' value='0'/>
<c:set var='rows'>
<c:out value="${requestScope.rows}" default="3"/>
</c:set>
<c:set var='columns'>
<c:out value="${requestScope.columns}" default="8"/>
</c:set>
<c:set var='IMG_DIR' value='images/' />
<c:set var='IMG_WIDTH' value='100'/>
<table class='tabEntities entityListForGalleryTab'>
<c:forEach var='row' begin="1" end="${rows}" step="1">
<tr>
<c:forEach var='col' begin="1" end="${columns}" step="1">
<c:set var='ent' value='${entities[count]}'/>
<c:set var='count' value='${count + 1}'/>
<c:if test="${ not empty ent and not empty ent.imageThumb}">
<td>
<c:url var="entityHref" value="/entity">
<c:param name="home" value="${portal.portalId}"/>
<c:param name="uri" value="${ent.URI}"/>
</c:url>
<a class="image" href="<c:out value="${entityHref}"/>" >
<c:url var="imageSrc" value="${IMG_DIR}${ent.imageThumb}"/>
<img width="${IMG_WIDTH}" src="<c:out value="${imageSrc}"/>" title="${ent.name}" alt="${ent.name}" />
</a>
</td>
</c:if>
</c:forEach>
</tr>
</c:forEach>
</table>

View file

@ -0,0 +1,96 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%><%/* this odd thing points to something in web.xml */ %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ page errorPage="/error.jsp"%>
<% /***********************************************
Display a list of entities for a tab.
request.attributes:
a List of Entity objects with the name "entities"
portal id as "portal"
request.parameters:
None yet.
Consider sticking < % = MiscWebUtils.getReqInfo(request) % > in the html output for debugging info.
bdc34 2006-01-27 created
**********************************************/
if (request.getAttribute("entities") == null){
String e="entityListForTabs.jsp expects that request attribute 'entities' be set to a List of Entity objects.";
throw new JspException(e);
}
%>
<c:set var="searchViewPrefix" value="/templates/search/"/>
<c:set var='entities' value='${requestScope.entities}' /><%/* just moving this into page scope for easy use */ %>
<c:set var='portal' value='${requestScope.portal}' />
<c:set var='IMG_DIR' value='images/' />
<c:set var='IMG_WIDTH' value='75'/>
<jsp:include page="/templates/alpha/alphaIndex.jsp"/>
<ul class='tabEntities entityListForTab'>
<c:forEach items='${entities}' var='ent'>
<c:url var="entHref" value="/entity">
<c:param name="home" value="${sessionScope.currentPortalId}"/>
<c:param name="uri" value="${ent.URI}"/>
</c:url>
<li>
<a href='<c:out value="${entHref}"/>'>${ent.name}</a>
<c:if test="${!empty ent.moniker}">
<span class="tab-moniker">
| <c:out value="${ent.moniker}"/>
</span>
</c:if>
<c:if test="${!empty ent.VClasses}">
<c:forEach items="${ent.VClasses}" var="type">
<c:if test="${!empty type.customSearchView}">
<c:set var="customSearchView" value="${type.customSearchView}"/>
</c:if>
</c:forEach>
</c:if>
<c:set var="anchorText" value="${ent.anchor}"/>
<c:if test="${(!empty customSearchView) && (!empty anchorText)}">
<c:set scope="request" var="individual" value="${ent}"/>
<c:if test="${!empty ent.url}">
<c:set scope="request" var="individualURL" value="${ent.url}"/>
</c:if>
<jsp:include page="${searchViewPrefix}${customSearchView}" flush="true"/>
<c:remove var="individual"/>
<c:remove var="individualURL"/>
<c:remove var="anchorText"/>
</c:if>
<c:if test="${!empty anchorText}">
<span class="tab-extLink"> |
<c:choose>
<c:when test="${!empty ent.url}">
<c:url var="entUrl" value="${ent.url}"/>
<a class="externalLink" href="<c:out value="${entUrl}"/>">${anchorText}</a>
</c:when>
<c:otherwise>
<span style="font-style: italic; text-size: 0.75em;">${anchorText}</span>
</c:otherwise>
</c:choose>
</span>
</c:if>
<c:forEach items='${ent.linksList}' var="entLink"><span class="tab-extLink"> | <c:url var="entLinkUrl" value="${entLink.url}"/><a class="externalLink" href="<c:out value="${entLinkUrl}"/>">${entLink.anchor}</a></span></c:forEach>
<c:choose>
<c:when test='${not empty ent.imageThumb }'>
<c:url var="imageHref" value="entity">
<c:param name="home" value="${sessionScope.currentPortalId}"/>
<c:param name="uri" value="${ent.URI}"/>
</c:url>
<c:url var="imageSrc" value="${IMG_DIR}${ent.imageThumb}"/>
<div class="tab-image"><a class="image" href="<c:out value="${imageHref}"/>"><img width="${IMG_WIDTH}" src="<c:out value="${imageSrc}"/>" title="${ent.name}" alt="" /></a></div>
<c:if test="${not empty ent.blurb}"><div class='blurb'>${ent.blurb}</div></c:if>
</c:when>
<c:otherwise>
<c:if test="${not empty ent.blurb}"><div class='blurb'>${ent.blurb}</div></c:if>
</c:otherwise>
</c:choose>
</li>
</c:forEach>
</ul>

View file

@ -0,0 +1,298 @@
<%-- $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" %>
<jsp:useBean id="loginHandler" class="edu.cornell.mannlib.vedit.beans.LoginFormBean" scope="session" />
<%!
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");%>
<c:set var="showSelfEdits" value="${true}"/>
<% }
if (loginHandler!=null && loginHandler.getLoginStatus()=="authenticated" && Integer.parseInt(loginHandler.getLoginRole())>=loginHandler.getNonEditor()) {
log.debug("setting showCuratorEdits true");%>
<c:set var="showCuratorEdits" value="${true}"/>
<c:set var='themeDir'><c:out value='${portalBean.themeDir}' /></c:set>
<% }
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");
}%>
<c:set var='entity' value='${requestScope.entity}'/><%-- just moving this into page scope for easy use --%>
<c:set var='portal' value='${requestScope.portalBean}'/><%-- likewise --%>
<c:set var="hiddenDivCount" value="0"/>
<% 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<PropertyGroup> 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());
}
%><jsp:include page="entityMergedPropsListUngrouped.jsp" flush="true"/><%
return;
}%>
<%--
<ul id="profileCats">
<% for (PropertyGroup pg : groupsList ) {
if (openingGroupLocalName == null || openingGroupLocalName.equals("")) {
openingGroupLocalName = pg.getLocalName();
}
String styleStr = "display: inline;";
if (openingGroupLocalName.equals(pg.getLocalName())) {%>
<li class="currentCat"><a id="currentCat" href="#<%=pg.getLocalName()%>" title="<%=pg.getName()%>"><%=pg.getName()%></a></li>
<% } else { %>
<li><a href="#<%=pg.getLocalName()%>" title="<%=pg.getName()%>"><%=pg.getName()%></a></li>
<% }
} %>
</ul>
--%>
<% // now display the properties themselves, by group
for (PropertyGroup g : groupsList) {%>
<c:set var="group" value="<%=g%>"/>
<c:set var="groupStyle" value="display: block;"/>
<c:if test="${group.statementCount==0}"><c:set var="groupStyle" value="display: block"/></c:if>
<%-- Getting the count of properties in each group --%>
<c:set var="counter" value="0"/>
<c:set var="propTotal" value="0"/>
<% int propTotal = g.getPropertyList().size(); %>
<c:set var="propTotal" value="<%=propTotal%>" />
<div class="propsCategory" id="<%=g.getLocalName()%>">
<h3><strong><%=g.getName()%></strong></h3>
<div class="propsWrap">
<% for (Property p : g.getPropertyList()) {%>
<% if (p instanceof ObjectProperty) {
ObjectProperty op = (ObjectProperty)p;%>
<c:set var="objProp" value="<%=op%>"/>
<c:set var="editableInSomeWay" value="${false}"/>
<c:if test="${showSelfEdits || showCuratorEdits}">
<edLnk:editLinks item="${objProp}" var="links" />
<c:if test="${!empty links}">
<c:set var="editableInSomeWay" value="${true}"/>
</c:if>
</c:if>
<c:set var="objStyle" value="display: block;"/>
<c:set var="objRows" value="${fn:length(objProp.objectPropertyStatements)}"/>
<c:if test="${objRows==0}"><c:set var="objStyle" value="display: block;"/></c:if>
<c:if test="${editableInSomeWay || objRows>0}">
<c:set var="first" value=""/><c:if test="${counter == 0}"><c:set var="first" value=" first"/></c:if>
<c:set var="last" value=""/><c:if test="${(counter+1) == propTotal}"><c:set var="last" value=" last"/></c:if>
<div class="propsItem${first}${last}" id="${objProp.localName}">
<h4>${objProp.editLabel}</h4>
<c:if test="${showSelfEdits || showCuratorEdits}"><edLnk:editLinks item="${objProp}" icons="false" /></c:if>
<c:set var="displayLimit" value="${objProp.domainDisplayLimit}"/>
<c:if test="${displayLimit<0}">
<c:set var="displayLimit" value="32"/> <% /* arbitrary limit if value is unset, i.e. -1 */ %>
</c:if>
<c:if test="${objRows>0}">
<ul class='properties'>
</c:if>
<c:forEach items="${objProp.objectPropertyStatements}" var="objPropertyStmt">
<li><span class="statementWrap">
<c:set var="opStmt" value="${objPropertyStmt}" scope="request"/>
<c:url var="propertyLink" value="/entity">
<c:param name="home" value="${portal.portalId}"/>
<c:param name="uri" value="${objPropertyStmt.object.URI}"/>
<%--
<% ObjectPropertyStatement oStmt = (ObjectPropertyStatement)request.getAttribute("opStmt");
if (oStmt!=null) {
Individual obj= (Individual)oStmt.getObject();
if (obj != null) {
if (!obj.doesFlag1Match(currentPortalId)) {%>
<c:param name="jump" value="true"/>
<% }
}
}%>
--%>
</c:url>
<c:remove var="opStmt" scope="request"/>
<c:forEach items="${objPropertyStmt.object.VClasses}" var="type">
<c:if test="${!empty type.customShortView}">
<c:set var="altRenderJsp" value="${type.customShortView}"/>
</c:if>
</c:forEach>
<c:choose>
<c:when test="${!empty altRenderJsp}">
<c:set scope="request" var="individual" value="${objPropertyStmt.object}"/>
<c:set scope="request" var="predicateUri" value="${objProp.URI}"/>
<jsp:include page="${altRenderJsp}" flush="true"/>
<c:remove var="altRenderJsp"/>
</c:when>
<c:otherwise>
<a class="propertyLink" href='<c:out value="${propertyLink}"/>'><p:process><c:out value="${objPropertyStmt.object.name}"/></p:process></a>
<c:if test="${!empty objPropertyStmt.object.moniker}">
<p:process><c:out value="| ${objPropertyStmt.object.moniker}"/></p:process>
</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}</span></c:if>
<c:if test="${empty editLinks}"><em class="nonEditable">(non-editable)</em></c:if>
</c:if>
</span></li>
</c:forEach>
<c:if test="${objRows > 0}"></ul></c:if>
</div><!-- ${objProp.localName} -->
</c:if>
<% } else if (p instanceof DataProperty) {
DataProperty dp = (DataProperty)p;%>
<c:set var="dataProp" value="<%=dp%>"/>
<c:set var="dataRows" value="${fn:length(dataProp.dataPropertyStatements)}"/>
<c:set var="dataStyle" value="display: block;"/>
<c:set var="displayLimit" value="${dataProp.displayLimit}"/>
<c:if test="${dataRows==0}"><c:set var="dataStyle" value="display: block;"/></c:if>
<c:set var="first" value=""/><c:if test="${counter == 0}"><c:set var="first" value=" first"/></c:if>
<c:set var="last" value=""/><c:if test="${(counter+1) == propTotal}"><c:set var="last" value=" last"/></c:if>
<c:set var="multiItem" value=""/><c:if test="${dataRows > 1 && displayLimit == 1}"><c:set var="multiItem" value=" multiItem"/></c:if>
<c:set var="addable" value=""/><c:if test="${dataRows >= 1 && displayLimit > 1}"><c:set var="addable" value=" addable"/></c:if>
<div id="${dataProp.localName}" class="propsItem dataItem${first}${last}${multiItem}${addable}" style="${dataStyle}">
<h4>${dataProp.editLabel}</h4>
<c:if test="${showSelfEdits || showCuratorEdits}">
<c:choose>
<c:when test="${dataRows == 1 && displayLimit==1 }">
<%-- just put in a single "edit" link, not an "add" link that expands to reveal edit/delete links --%>
<c:set var="editLinks"><edLnk:editLinks item="${dataProp.dataPropertyStatements[0]}" icons="false"/></c:set>
<c:if test="${!empty editLinks}"><span class="editLinks">${editLinks}</span></c:if>
<c:if test="${empty editLinks}"><em class="nonEditable">(non-editable)</em></c:if>
</c:when>
<c:otherwise><%-- creates an add link, even if displayLimit is unset, i.e. -1 --%>
<edLnk:editLinks item="${dataProp}" icons="false"/>
</c:otherwise>
</c:choose>
</c:if>
<c:if test="${displayLimit<0}">
<%-- set to an arbitrary but high positive limit if unset on property, i.e. -1 --%>
<c:set var="displayLimit" value="32"/>
</c:if>
<c:if test="${fn:length(dataProp.dataPropertyStatements)-displayLimit==1}">
<%-- don't leave just one statement to expand --%>
<c:set var="displayLimit" value="${displayLimit+1}"/>
</c:if>
<%-- c:if test="${displayLimit < 0}"><c:set var="displayLimit" value="20"/></c:if --%>
<c:if test="${dataRows > 0}">
<div class="datatypeProperties">
<c:if test="${dataRows > 1}"><ul class="datatypePropertyValue"></c:if>
<c:if test="${dataRows == 1}"><div class="datatypePropertyValue"></c:if>
<c:forEach items="${dataProp.dataPropertyStatements}" var="dataPropertyStmt">
<p:process>
<c:choose>
<c:when test='${dataRows==1}'>
<span class="statementWrap">
${dataPropertyStmt.data}
<c:if test='${displayLimit>1 && (showSelfEdits || showCuratorEdits)}'>
<c:set var="editLinks"><edLnk:editLinks item="${dataPropertyStmt}" icons="false"/></c:set>
<c:if test="${!empty editLinks}"><span class="editLinks">${editLinks}</span></c:if>
<c:if test="${empty editLinks}"><em class="nonEditable">(non-editable)</em></c:if>
</c:if>
</span>
</c:when>
<c:otherwise>
<li><span class="statementWrap">
${dataPropertyStmt.data}
<c:if test="${dataRows > 1 || displayLimit != 1 }">
<c:if test="${showSelfEdits || showCuratorEdits}">
<c:set var="editLinks"><edLnk:editLinks item="${dataPropertyStmt}" icons="false"/></c:set>
<c:if test="${!empty editLinks}"><span class="editLinks">${editLinks}</span></c:if>
<c:if test="${empty editLinks}"><em class="nonEditable">(non-editable)</em></c:if>
</c:if>
</c:if>
</span></li>
</c:otherwise>
</c:choose>
</p:process>
</c:forEach>
<c:choose>
<c:when test="${dataRows==1}"></div></c:when>
<c:otherwise></ul></c:otherwise>
</c:choose>
</div><!-- datatypeProperties -->
</c:if>
</div><!-- ${dataProp.localName} -->
<% } else { // keyword property -- ignore
if (p instanceof KeywordProperty) {%>
<p>Not expecting keyword properties here.</p>
<% } else {
log.warn("unexpected unknown property type found");%>
<p>Unknown property type found</p>
<% }
}
%><c:set var="counter" value="${counter+1}"/><%
} // end for (Property p : g.getPropertyList()
%>
</div><!-- propsWrap -->
</div><!-- class="propsCategory" -->
<c:if test="${showSelfEdits || showCuratorEdits}">
<a class="backToTop" href="#wrap" title="jump to top of the page">back to top</a>
</c:if>
<% } // end for (PropertyGroup g : groupsList)
} else {
log.debug("incoming groups list with merged properties not found as request attribute for subject "+subject.getName()+"\n");
}
%>

View file

@ -0,0 +1,325 @@
<%-- $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/StringProcessorTag" prefix="p" %>
<%@ taglib uri="http://vitro.mannlib.cornell.edu/vitro/tags/PropertyEditLink" prefix="edLnk" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Portal" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %>
<%@ 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" %>
<jsp:useBean id="loginHandler" class="edu.cornell.mannlib.vedit.beans.LoginFormBean" scope="session" />
<%!
public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.templates.entity.entityMergedPropsList.jsp");
%>
<c:set var='themeDir'><c:out value='${portalBean.themeDir}' /></c:set>
<% if( VitroRequestPrep.isSelfEditing(request) ) {
log.debug("setting showSelfEdits true");%>
<c:set var="showSelfEdits" value="${true}"/>
<% }
if (loginHandler!=null && loginHandler.getLoginStatus()=="authenticated" && Integer.parseInt(loginHandler.getLoginRole())>=loginHandler.getNonEditor()) {
log.debug("setting showCuratorEdits true");%>
<c:set var="showCuratorEdits" value="${true}"/>
<% }%>
<c:set var='entity' value='${requestScope.entity}'/><%-- just moving this into page scope for easy use --%>
<c:set var='portal' value='${requestScope.portalBean}'/><%-- likewise --%>
<c:set var="hiddenDivCount" value="0"/>
<% Individual subject = (Individual) request.getAttribute("entity");
if (subject==null) {
throw new Error("Subject individual must be in request scope for dashboardPropsList.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<Property> propsList = (ArrayList) request.getAttribute("mergedList");
for (Property p : propsList) {%>
<c:set var="stmtCounter" value="0"/>
<% if (p instanceof ObjectProperty) {
ObjectProperty op = (ObjectProperty)p;%>
<c:set var="objProp" value="<%=op%>"/>
<c:set var="editableInSomeWay" value="${false}"/>
<c:if test="${showSelfEdits || showCuratorEdits}">
<edLnk:editLinks item="${objProp}" var="links" />
<c:if test="${!empty links}">
<c:set var="editableInSomeWay" value="${true}"/>
</c:if>
</c:if>
<c:set var="objStyle" value="display: block;"/>
<c:set var="objRows" value="${fn:length(objProp.objectPropertyStatements)}"/>
<c:if test="${objRows==0}"><c:set var="objStyle" value="display: block;"/></c:if>
<c:if test="${editableInSomeWay || objRows>0}">
<c:set var="classForEditControls" value=""/>
<c:if test="${showSelfEdits || showCuratorEdits}"><c:set var="classForEditControls" value=" editing"/></c:if>
<c:set var="uniqueOpropDivName" value="${fn:replace(objProp.localNameWithPrefix,':','-')}"/>
<div class="propsItem ${classForEditControls}" id="${'oprop-'}${uniqueOpropDivName}">
<h3 class="propertyName">${objProp.editLabel}</h3>
<c:if test="${showSelfEdits || showCuratorEdits}"><edLnk:editLinks item="${objProp}" icons="false" /></c:if>
<%-- Verbose property display additions for object properties, using context variable verbosePropertyListing --%>
<c:if test="${showCuratorEdits && verbosePropertyListing}">
<c:url var="propertyEditLink" value="/propertyEdit">
<c:param name="home" value="${portal.portalId}"/>
<c:param name="uri" value="${objProp.URI}"/>
</c:url>
<c:choose>
<c:when test="${!empty objProp.hiddenFromDisplayBelowRoleLevel.label}"><c:set var="displayCue" value="${objProp.hiddenFromDisplayBelowRoleLevel.label}"/></c:when>
<c:otherwise><c:set var="displayCue" value="unspecified"/></c:otherwise>
</c:choose>
<c:choose>
<c:when test="${!empty objProp.prohibitedFromUpdateBelowRoleLevel.label}"><c:set var="updateCue" value="${objProp.prohibitedFromUpdateBelowRoleLevel.label}"/></c:when>
<c:otherwise><c:set var="updateCue" value="unspecified"/></c:otherwise>
</c:choose>
<c:choose>
<c:when test="${!empty objProp.localNameWithPrefix}"><c:set var="localName" value="${objProp.localNameWithPrefix}"/></c:when>
<c:otherwise><c:set var="localName" value="no local name"/></c:otherwise>
</c:choose>
<c:choose>
<c:when test="${!empty objProp.domainDisplayTier}"><c:set var="displayTier" value="${objProp.domainDisplayTier}"/></c:when>
<c:otherwise><c:set var="displayTier" value="blank"/></c:otherwise>
</c:choose>
<c:choose>
<c:when test="${!empty objProp.groupURI}">
<% PropertyGroup pg = pgDao.getGroupByURI(op.getGroupURI());
if (pg!=null && pg.getName()!=null) {
request.setAttribute("groupName",pg.getName());%>
<span style="color: grey; font-size: 0.75em;"><a class="propertyLink" href="${propertyEditLink}"/>${localName}</a> (object property); display tier ${displayTier} within group ${groupName}; display level: ${displayCue}; update level: ${updateCue}</span>
<% } else {%>
<span style="color: grey; font-size: 0.75em;"><a class="propertyLink" href="${propertyEditLink}"/>${localName}</a> (object property); display tier ${displayTier}; display level: ${displayCue}; update level: ${updateCue}</span>
<% } %>
</c:when>
<c:otherwise>
<span style="color: grey; font-size: 0.75em;"><a class="propertyLink" href="${propertyEditLink}"/>${localName}</a> (object property); display tier ${displayTier}; display level: ${displayCue}; update level: ${updateCue}</span>
</c:otherwise>
</c:choose>
</c:if>
<%-- end Verbose property display additions for object properties --%>
<c:set var="displayLimit" value="${objProp.domainDisplayLimit}"/>
<c:if test="${displayLimit<0}">
<c:set var="displayLimit" value="32"/> <% /* arbitrary limit if value is unset, i.e. -1 */ %>
</c:if>
<c:if test="${fn:length(objProp.objectPropertyStatements)-displayLimit==1}"><c:set var="displayLimit" value="${displayLimit+1}"/></c:if>
<c:if test="${objRows>0}">
<ul class='properties'>
</c:if>
<c:forEach items="${objProp.objectPropertyStatements}" var="objPropertyStmt">
<c:if test="${stmtCounter == displayLimit}"><!-- set up toggle div and expandable continuation div -->
</ul>
<c:set var="hiddenDivCount" value="${hiddenDivCount+1}"/>
<c:url var="themePath" value="/${themeDir}site_icons" />
<div class="navlinkblock ">
<span class="entityMoreSpan">
<c:out value='${objRows - stmtCounter}' />
<c:choose>
<c:when test='${displayLimit==0}'> entries</c:when>
<c:otherwise> more</c:otherwise>
</c:choose>
</span>
<div class="extraEntities">
<ul class="properties">
</c:if>
<li><span class="statementWrap">
<c:set var="opStmt" value="${objPropertyStmt}" scope="request"/>
<c:url var="propertyLink" value="/entity">
<c:param name="home" value="${portal.portalId}"/>
<c:param name="uri" value="${objPropertyStmt.object.URI}"/>
<%--
<% ObjectPropertyStatement oStmt = (ObjectPropertyStatement)request.getAttribute("opStmt");
if (oStmt!=null) {
Individual obj= (Individual)oStmt.getObject();
if (obj != null) {
if (!obj.doesFlag1Match(currentPortalId)) {%>
<c:param name="jump" value="true"/>
<% }
}
}%>
--%>
</c:url>
<c:remove var="opStmt" scope="request"/>
<c:forEach items="${objPropertyStmt.object.VClasses}" var="type">
<c:if test="${!empty type.customShortView}">
<c:set var="altRenderJsp" value="${type.customShortView}"/>
</c:if>
</c:forEach>
<c:choose>
<c:when test="${!empty altRenderJsp}">
<c:set scope="request" var="individual" value="${objPropertyStmt.object}"/>
<c:set scope="request" var="predicateUri" value="${objProp.URI}"/>
<jsp:include page="${altRenderJsp}" flush="true"/>
<c:remove var="altRenderJsp"/>
</c:when>
<c:otherwise>
<a class="propertyLink" href='<c:out value="${propertyLink}"/>'><p:process><c:out value="${objPropertyStmt.object.name}"/></p:process></a>
<c:if test="${!empty objPropertyStmt.object.moniker}">
<p:process><c:out value="| ${objPropertyStmt.object.moniker}"/></p:process>
</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:forEach>
<c:if test="${objRows > 0}"></ul></c:if>
<c:if test="${stmtCounter > displayLimit}">
</div><%-- navlinkblock --%>
</div><%-- extraEntities --%></c:if>
</div><!-- ${objProp.localNameWithPrefix} -->
</c:if>
<% } else if (p instanceof DataProperty) {
DataProperty dp = (DataProperty)p;%>
<c:set var="dataProp" value="<%=dp%>"/>
<c:set var="dataRows" value="${fn:length(dataProp.dataPropertyStatements)}"/>
<c:set var="dataStyle" value="display: block;"/>
<c:if test="${dataRows==0}"><c:set var="dataStyle" value="display: block;"/></c:if>
<c:set var="classForEditControls" value=""/>
<c:if test="${showSelfEdits || showCuratorEdits}"><c:set var="classForEditControls" value=" editing"/></c:if>
<c:set var="uniqueDpropDivName" value="${fn:replace(dataProp.localNameWithPrefix,':','-')}"/>
<div id="${'dprop-'}${uniqueDpropDivName}" class="propsItem ${classForEditControls}" style="${dataStyle}">
<h3 class="propertyName">${dataProp.editLabel}</h3>
<c:if test="${showSelfEdits || showCuratorEdits}"><edLnk:editLinks item="${dataProp}" icons="false"/></c:if>
<%-- Verbose property display additions for data properties, using context variable verbosePropertyListing --%>
<c:if test="${showCuratorEdits && verbosePropertyListing}">
<c:url var="propertyEditLink" value="/datapropEdit">
<c:param name="home" value="${portal.portalId}"/>
<c:param name="uri" value="${dataProp.URI}"/>
</c:url>
<c:choose>
<c:when test="${!empty dataProp.hiddenFromDisplayBelowRoleLevel.label}"><c:set var="displayCue" value="${dataProp.hiddenFromDisplayBelowRoleLevel.label}"/></c:when>
<c:otherwise><c:set var="displayCue" value="unspecified"/></c:otherwise>
</c:choose>
<c:choose>
<c:when test="${!empty dataProp.prohibitedFromUpdateBelowRoleLevel.label}"><c:set var="updateCue" value="${dataProp.prohibitedFromUpdateBelowRoleLevel.label}"/></c:when>
<c:otherwise><c:set var="updateCue" value="unspecified"/></c:otherwise>
</c:choose>
<c:choose>
<c:when test="${!empty dataProp.localNameWithPrefix}"><c:set var="localName" value="${dataProp.localNameWithPrefix}"/></c:when>
<c:otherwise><c:set var="localName" value="no local name"/></c:otherwise>
</c:choose>
<c:choose>
<c:when test="${!empty dataProp.displayTier}"><c:set var="displayTier" value="${dataProp.displayTier}"/></c:when>
<c:otherwise><c:set var="displayTier" value="blank"/></c:otherwise>
</c:choose>
<c:choose>
<c:when test="${!empty dataProp.groupURI}">
<% PropertyGroup pg = pgDao.getGroupByURI(dp.getGroupURI());
if (pg!=null && pg.getName()!=null) {
request.setAttribute("groupName",pg.getName());%>
<span style="color: grey; font-size: 0.75em;"><a class="propertyLink" href="${propertyEditLink}"/>${localName}</a> (data property); display tier ${displayTier} within group ${groupName}; display level: ${displayCue}; update level: ${updateCue}</span>
<% } else {%>
<span style="color: grey; font-size: 0.75em;"><a class="propertyLink" href="${propertyEditLink}"/>${localName}</a> (data property); display tier ${displayTier}; display level: ${displayCue}; update level: ${updateCue}</span>
<% } %>
</c:when>
<c:otherwise>
<span style="color: grey; font-size: 0.75em;"><a class="propertyLink" href="${propertyEditLink}"/>${localName}</a> (data property); display tier ${displayTier}; display level: ${displayCue}; update level: ${updateCue}</span>
</c:otherwise>
</c:choose>
</c:if>
<%-- end Verbose property display additions for data properties --%>
<c:set var="displayLimit" value="${dataProp.displayLimit}"/>
<c:if test="${displayLimit<0}">
<c:set var="displayLimit" value="32"/> <% /* arbitrary limit if value is unset, i.e. -1 */ %>
</c:if>
<c:if test="${fn:length(dataProp.dataPropertyStatements)-displayLimit==1}"><c:set var="displayLimit" value="${displayLimit+1}"/></c:if>
<c:if test="${displayLimit < 0}"><c:set var="displayLimit" value="20"/></c:if>
<c:if test="${!empty dataProp.dataPropertyStatements}"><div class="datatypeProperties"></c:if>
<c:if test="${dataRows > 1}">
<ul class="datatypePropertyValue">
</c:if>
<c:if test="${dataRows == 1}">
<div class="datatypePropertyValue"><span class="statementWrap">
</c:if>
<c:forEach items="${dataProp.dataPropertyStatements}" var="dataPropertyStmt">
<c:if test="${stmtCounter == displayLimit}">
<c:if test="${dataRows > 1 && displayLimit < 0}"></ul></c:if>
<div class="navlinkblock ">
<span class="entityMoreSpan">
<c:out value='${dataRows - stmtCounter}' />
<c:choose>
<c:when test='${displayLimit==0}'> entries</c:when>
<c:otherwise> more</c:otherwise>
</c:choose>
</span>
<div class="extraEntities">
</c:if>
<c:set var="stmtCounter" value="${stmtCounter+1}"/>
<c:choose>
<c:when test='${dataRows==1}'>
<p:process>${dataPropertyStmt.data}</p:process>
<c:if test="${showSelfEdits || showCuratorEdits}">
<c:set var="editLinks"><edLnk:editLinks item="${dataPropertyStmt}" 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>
</c:when>
<c:otherwise>
<li><span class="statementWrap">
<p:process>${dataPropertyStmt.data}</p:process>
<c:if test="${showSelfEdits || showCuratorEdits}">
<c:set var="editLinks"><edLnk:editLinks item="${dataPropertyStmt}" 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:otherwise>
</c:choose>
<c:if test="${dataRows==1}"></span></div></c:if>
</c:forEach>
<c:if test="${stmtCounter > displayLimit}"></div></div></c:if>
<c:if test="${!empty dataProp.dataPropertyStatements}"></div><!-- datatypeProperties --></c:if>
</div><!-- ${dataProp.localNameWithPrefix} -->
<% } else { // keyword property -- ignore
if (p instanceof KeywordProperty) {%>
<p>Not expecting keyword properties here.</p>
<% } else {
log.warn("unexpected unknown property type found");%>
<p>Unknown property type found</p>
<% }
}
} // end for (Property p : g.getPropertyList()
%>

View file

@ -0,0 +1,36 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<% /***********************************************
This file is used to inject <link> and <script> elements
into the head element of the generated source of a VITRO
page that is being displayed by the entity controller.
In other words, anything like domain.com/entity?...
will have the lines specified here added in the <head>
of the page.
This is a great way to specify JavaScript or CSS files
at the entity display level as opposed to globally.
Example:
<link rel="stylesheet" type="text/css" href="/css/entity.css"/>" media="screen"/>
<script type="text/javascript" src="/js/jquery.js"></script>
****************************************************/ %>
<c:url var="jquery" value="/js/jquery.js"/>
<c:url var="getURLParam" value="/js/jquery_plugins/getURLParam.js"/>
<c:url var="colorAnimations" value="/js/jquery_plugins/colorAnimations.js"/>
<c:url var="propertyGroupSwitcher" value="/js/propertyGroupSwitcher.js"/>
<c:url var="vitroControls" value="/js/controls.js"/>
<c:url var="jqueryForm" value="/js/jquery_plugins/jquery.form.js"/>
<c:url var="tinyMCE" value="/js/tiny_mce/tiny_mce.js"/>
<script type="text/javascript" src="${jquery}"></script>
<script type="text/javascript" src="${getURLParam}"></script>
<script type="text/javascript" src="${colorAnimations}"></script>
<script type="text/javascript" src="${propertyGroupSwitcher}"></script>
<script type="text/javascript" src="${jqueryForm}"></script>
<script type="text/javascript" src="${tinyMCE}"></script>
<script type="text/javascript" src="${vitroControls}"></script>

View file

@ -0,0 +1,54 @@
<%-- $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" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Link" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %>
<%@ page import="org.apache.commons.logging.Log" %>
<%@ page import="org.apache.commons.logging.LogFactory" %>
<%!
public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.templates.entity.linkShortView.jsp");
%>
<%-- this comes in as an attribute called "individual" but the object has to be created as a Link using the Link dao getLinkByURI() method in order to render correctly
when the link uri may sometimes be of XSD type anyURI and sometimes of XSD type string --%>
<%
Individual ind = (Individual)request.getAttribute("individual");
WebappDaoFactory wdf = (WebappDaoFactory)getServletContext().getAttribute("webappDaoFactory");
if (wdf!=null) {
Link link = wdf.getLinksDao().getLinkByURI(ind.getURI());
if (link!=null) {
request.setAttribute("linkIndividual", link);
} else {
log.error("Cannot create linkIndividual from individual "+ind.getUrl());
}
} else {
log.error("Cannot create WebappDaoFactory in linkShortView.jsp");
}%>
<c:choose>
<c:when test="${!empty linkIndividual}">
<c:choose>
<c:when test="${!empty linkIndividual.anchor}">
<c:choose>
<c:when test="${!empty linkIndividual.url}">
<c:url var="link" value="${linkIndividual.url}" />
<a class="externalLink" href="<c:out value="${link}"/>">${linkIndividual.anchor}</a>
</c:when>
<c:otherwise>
<c:out value="${linkIndividual.anchor}"/>
</c:otherwise>
</c:choose>
</c:when>
<c:otherwise>
<c:out value="link anchor is not populated"/>
</c:otherwise>
</c:choose>
</c:when>
<c:otherwise>
<c:out value="link individual not found ..."/>
</c:otherwise>
</c:choose>

View file

@ -0,0 +1,3 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<div class="error"><h4>No matching entity was found in the system.</h4> </div>

View file

@ -0,0 +1,18 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page isErrorPage="true" %>
<% if ( pageContext.getErrorData().getRequestURI().indexOf("/images/") < 0 ) {
request.setAttribute("bodyJsp", "/templates/error/error404content.jsp");
request.setAttribute("title", "Not Found");
%>
<jsp:forward page="/templates/page/basicPage.jsp">
<jsp:param name="uriStr" value="${pageContext.errorData.requestURI}"/>
</jsp:forward>
<% } %>

View file

@ -0,0 +1,21 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %><%/* this odd thing points to something in web.xml */ %>
<div class="contents">
<h1>Page Not Found</h1>
<p class="warning">The page you requested is not available. It may have been deleted or moved to another location.</p>
<p>Try the search box above to locate the information you are looking for.</p>
<p>If you reached this page by following a link within this website, please consider <a href="<c:url value="comments"/>">contacting us</a> and telling us what link you clicked.</p>
<!-- _______________________________Exception__________________________________
404
Request URI: ${param.uriStr}
___________________________________________________________________________ -->
</div><!-- contents -->

View file

@ -0,0 +1,44 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="java.lang.Integer" %>
<%@page isErrorPage="true" %>
<html>
<head>
<title>Internal Server Error</title>
</head>
<body style="margin:2%;font-family:Arial, Helvetica, sans-serif;">
<div class="contents">
<h1>Internal Server Error</h1>
<p style="color:red;">An internal error has occurred in the server.</p>
<p>Please try again later.</p>
<p>If the problem persists, please consider <a href="<c:url value="comments"/>">contacting us</a> and telling us how you arrived here.</p>
</div><!-- contents -->
<div id="hiddenErrorDiv" style="display:none;">
_______________________________Exception__________________________________
500
Request URI: ${param.uriStr}
Exception: ${param.errStr}
Stack trace:
<c:forEach var="trace" items="${pageContext.exception.stackTrace}">
${trace} <%="\n"%>
</c:forEach>
___________________________________________________________________________
</div><!-- hiddenErrorDiv -->
</body>
</html>

View file

@ -0,0 +1,27 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div class="contents">
<h1>Internal Server Error</h1>
<p class="warning">An internal error has occurred in the server</p>
<p>Please try again later.</p>
<p>If the problem persists, please consider <a href="<c:url value="comments"/>">contacting us</a> and telling us how you arrived here.</p>
<!-- _______________________________Exception__________________________________
500
Request URI: ${param.uriStr}
Exception: ${param.errStr}
Stack trace:
<c:forEach var="trace" items="${pageContext.exception.stackTrace}">
${trace} <%="\n"%>
</c:forEach>
___________________________________________________________________________ -->
</div><!-- contents -->

View file

@ -0,0 +1,76 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.*" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ page errorPage="/error.jsp"%>
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep" %>
<% /***********************************************
Display a single Page in the most basic fashion.
The html <HEAD> is generated followed by the banners and menu.
After that the result of the jsp in the attribute bodyJsp is inserted.
Finally comes the footer.
request.attributes:
"bodyJsp" - jsp of the body of this page.
"title" - title of page
"css" - optional additional css for page
"scripts" - optional name of file containing <script> elements to be included in the page
"bodyAttr" - optional attributes for the <body> tag, e.g. 'onload': use leading space
"portalBean" - PortalBean object for request.
Consider sticking < % = MiscWebUtils.getReqInfo(request) % > in the html output
for debugging info.
bdc34 2006-02-03 created
**********************************************/
/*
String e = "";
if (request.getAttribute("bodyJsp") == null){
e+="basicPage.jsp expects that request parameter 'bodyJsp' be set to the jsp to display as the page body.\n";
}
if (request.getAttribute("title") == null){
e+="basicPage.jsp expects that request parameter 'title' be set to the title to use for page.\n";
}
if (request.getAttribute("css") == null){
e+="basicPage.jsp expects that request parameter 'css' be set to css to include in page.\n";
}
if( request.getAttribute("portalBean") == null){
e+="basicPage.jsp expects that request attribute 'portalBean' be set.\n";
}
if( request.getAttribute("appBean") == null){
e+="basicPage.jsp expects that request attribute 'appBean' be set.\n";
}
if( e.length() > 0 ){
throw new JspException(e);
}
*/
%>
<c:set var="portal" value="${requestScope.portalBean}"/>
<c:set var="themeDir"><c:out value="${portal.themeDir}" /></c:set>
<c:set var="bodyJsp"><c:out value="${requestScope.bodyJsp}" default="/debug.jsp"/></c:set>
<jsp:include page="doctype.jsp"/>
<head>
<jsp:include page="headContent.jsp"/>
</head>
<body ${requestScope.bodyAttr}>
<div id="wrap" class="container">
<div id="header">
<jsp:include page="/${themeDir}jsp/identity.jsp" flush="true"/>
<jsp:include page="/${themeDir}jsp/menu.jsp" flush="true"/>
</div><!--header-->
<hr class="hidden" />
<div id="contentwrap">
<c:import url="${bodyJsp}"/>
</div> <!-- contentwrap -->
<jsp:include page="/${themeDir}jsp/footer.jsp" flush="true"/>
</div> <!-- wrap -->
</body>
</html>

View file

@ -0,0 +1,22 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<% /***********************************************
A JSP for displaying a simple message.
This JSP is intened to be wraped by basicPage.jsp
request.attributes:
"msg" the message to display on the page.
bdc34 2009-02-03 created
**********************************************/
if (request.getAttribute("msg") == null ){
throw new JspException(
"bodyMsg.jsp expects that request parameter 'msg' be set to"
+ " the message for the page.\n"
);
}
// only get the msg from the attributes, because of cross site exploits,
// never from the parameters.
out.print( (String)request.getAttribute("msg") );
%>

View file

@ -0,0 +1,15 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils" %>
<% /***********************************************
debug.jsp will just display the request info in a div.
It is uesful to use at the body jsp for a new controller before
you have writen the jsp that you intend to use.
bdc34 2006-02-06
**********************************************/
%>
<div class='debug'>
<%= MiscWebUtils.getReqInfo(request) %>
</div>

View file

@ -0,0 +1,5 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

View file

@ -0,0 +1,52 @@
<%-- $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" %>
<%@ page import="javax.servlet.ServletException" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest"%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Portal"%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.ApplicationBean"%>
<%@ page import="org.apache.commons.logging.Log" %>
<%@ page import="org.apache.commons.logging.LogFactory" %>
<%!
public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.templates.page.headContent.jsp");
%>
<%
VitroRequest vreq = new VitroRequest(request);
Portal portal = vreq.getPortal();
String themeDir = portal != null ? portal.getThemeDir() : Portal.DEFAULT_THEME_DIR_FROM_CONTEXT;
themeDir = request.getContextPath() + '/' + themeDir;
%>
<!-- headContent.jsp -->
<link rel="stylesheet" type="text/css" href="<%=themeDir%>css/screen.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="<%=themeDir%>css/print.css" media="print"/>
<%-- <c:url var="jqueryPath" value="/js/jquery.js"/>
<script type="text/javascript" src="${jqueryPath}"></script> --%>
<link rel="stylesheet" type="text/css" href="<%=themeDir%>css/edit.css"/>
<title><c:out value="${requestScope.title}"/></title>
<%
// nac26 080424: the following line should only be uncommented for PHILLIPS (vivo.cornell.edu) to ensure we're only tracking stats on the live site
// <script type="text/javascript" src="http://vivostats.mannlib.cornell.edu/?js"></script>
%>
<c:if test="${!empty scripts}"><jsp:include page="${scripts}"/></c:if>
<%--
mw542 021009: Brian C said this was ignoring the catch tags throwing exceptions. we should find a better way to include css/js anyway
<c:set var="customJsp"><c:out value="${requestScope.bodyJsp}" default="/debug.jsp"/></c:set>
<c:set var="customHeadJsp">
<c:if test="${fn:substringAfter(customJsp,'.jsp') == ''}">${fn:substringBefore(customJsp,'.jsp')}${"Head.jsp"}</c:if>
</c:set>
<c:if test="${customJsp != '/debug.jsp' && customHeadJsp != ''}">
<c:catch var="fileCheck">
<c:import url="${customHeadJsp}"/>
</c:catch>
</c:if>
--%>
<!-- end headContent.jsp -->

View file

@ -0,0 +1,157 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page import="java.util.*"%>
<%@ page import="java.net.URLEncoder"%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.*" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %><%/* this odd thing points to something in web.xml */ %>
<%@ page errorPage="/error.jsp"%>
<%
/***********************************************
Display a}x9n;:[
Search Results
request.attributes:
a Map object with the name "collatedResultsLists"
collatedGroupNames
request.parameters:
None yet.
Consider sticking < % = MiscWebUtils.getReqInfo(request) % > in the html output
for debugging info.
**********************************************/
if (request.getAttribute("collatedResultsLists") == null) {
String e = "searchBaisc.jsp expects that request attribute " +
"'collatedResultsLists' be set to a Map of Lists of results to display.";
throw new JspException(e);
}
if (request.getAttribute("collatedGroupNames") == null) {
String e = "searchBaisc.jsp expects that request attribute "
+ "'collatedGroupNames' be set to a list of keys in collatedResultsLists.";
throw new JspException(e);
}
int switchdivs = 0; // for making IDs for the plus-icon expansion divs
edu.cornell.mannlib.vitro.webapp.beans.Portal portal = (Portal) request.getAttribute("portalBean");
int portalId = portal.getPortalId();
Map results = (Map) request.getAttribute("collatedResultsLists");
out.println("<div id='content' class='contentsBrowseGroup'>");
//do classgroup toc
Iterator it = results.keySet().iterator();
out.println("<p class='searchTOC'>Jump to results of type: ");
while (it.hasNext()) {
Object key = it.next();
VClassGroup grp = (VClassGroup) results.get(key);
out.println(" <a href='#" + grp.getLocalName() + "'>" + key + "</a> ");
}
out.println(" </p>");
//get each ClassGroup
it = results.keySet().iterator();
while (it.hasNext()) {
Object key = it.next();
VClassGroup grp = (VClassGroup) results.get(key);
out.println("<h2 id='" + grp.getLocalName() + "'>" + key + "</h2>");
//get each VClassList
Iterator it2 = grp.iterator();
while (it2.hasNext()) {
VClassList vcl = (VClassList) it2.next();
int resultSetSize = vcl.getEntities().size();
int displayLimit = vcl.getDisplayLimit();
if (resultSetSize - displayLimit == 1)
++displayLimit;
boolean hiddenDivStarted = false;
out.println("<h3>" + vcl.getName() + " (" + resultSetSize + ")</h3>");
out.println("<ul>");
List ents = vcl.getEntities();
if (ents == null || ents.size() == 0)
out.println("<li>none</li>");
else {
//get each entity
Iterator it3 = ents.iterator();
int count = 0;
while (it3.hasNext()) {
Individual ent = (Individual) it3.next();
++count;
String escapedURIStr = "";
try {
escapedURIStr = URLEncoder.encode(ent.getURI(),"UTF-8");
} catch (Exception e) {
/*unsupported encoding?*/
}
out.println("<li>");
out.println("<a href='"
+ response.encodeURL(request.getContextPath()+"/entity?uri=" + escapedURIStr + "&amp;home=" + portalId)
+ "'>" + ent.getName().replaceAll("&","&amp;") + "</a>");
if (ent.getMoniker() != null && ent.getMoniker().length() > 0) {
out.println(" | " + ent.getMoniker().replaceAll("&","&amp;"));
}
if (portal.getPortalId() == 6) { //show anchors in impact portal for submitter's name
if (ent.getAnchor() != null && ent.getAnchor().length() > 0) {
out.println(" | <span class='externalLink'>" + ent.getAnchor() + "</span>");
}
}
/* if (portal.getAppName().equalsIgnoreCase("VIVO") || portal.getAppName().equalsIgnoreCase("Research")) {
//Medha's desired display
if (ent.getUrl() != null && ent.getUrl().length() > 0) {
out.println(" | <a class='externalLink' href='"
+ response.encodeURL(ent.getUrl().replaceAll("&","&amp;")) + "'>"
+ ent.getAnchor().replaceAll("&","&amp;") + "</a>");
} else if (ent.getAnchor() != null && ent.getAnchor().length() > 0) {
out.println(" | <span class='externalLink'>" + ent.getAnchor().replaceAll("&","&amp;") + "</span>");
}
List linksList = ent.getLinksList();
if (linksList != null) {
Iterator lit = linksList.iterator();
while (lit.hasNext()) {
Link l = (Link) lit.next();
if (l.getUrl() != null && l.getUrl().length() > 0) {
out.println(" | <a class='externalLink' href='"
+ response.encodeURL(l.getUrl().replaceAll("&","&amp;")) + "'>"
+ l.getAnchor().replaceAll("&","&amp;") + "</a>");
} else {
out.println(" | <span class='externalLink'>" + l.getAnchor().replaceAll("&","&amp;") + "</span>");
}
}
}
} else { //show the Google-like excerpt */
if (ent.getDescription() != null && ent.getDescription().length() > 0) {
out.println("<div>" + ent.getDescription() + "</div>");
}
/* } */
out.println("</li>");
int remaining = resultSetSize - count;
if (count == displayLimit && remaining > 0) {
hiddenDivStarted = true; switchdivs++; %>
</ul>
<div style="color: black; cursor: pointer;" onclick="javascript:switchGroupDisplay('extra_ib<%=switchdivs%>','extraSw_ib<%=switchdivs%>','<%= response.encodeURL(portal.getThemeDir())%>site_icons')"
title="click to toggle additional entities on or off" class="navlinkblock" onmouseover="onMouseOverHeading(this)"
onmouseout="onMouseOutHeading(this)">
<span class="resultsMoreSpan"><img src='<%= response.encodeURL( portal.getThemeDir() )+"site_icons/plus.gif"%>' id="extraSw_ib<%=switchdivs%>" alt="more results"/>
<% out.println("<strong>"+remaining+" more</strong>"); %>
</span>
</div>
<% out.println("<div id='extra_ib"+switchdivs+"' style='display:none'>");
out.println(" <ul>");
}
if ((count == resultSetSize) && (hiddenDivStarted)) {
out.println("</ul></div> <!-- extra_ib"+switchdivs+"-->");
}
} // END while it3.hasNext()
if (!hiddenDivStarted) {
out.println("</ul>");
}
} // END else have entities
} // END while it2.hasNext()
} // END while it.hasNext()
%>
</div><!--contentsBrowseGroup-->

View file

@ -0,0 +1,35 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %><%/* this odd thing points to something in web.xml */ %>
<%@ page errorPage="/error.jsp"%>
<% /***********************************************
Used when the search results are empty.
request.attributes:
request.parameters:
None yet.
Consider sticking < % = MiscWebUtils.getReqInfo(request) % > in the html output
for debugging info.
**********************************************/
%>
<c:set var='lists' value='${requestScope.collatedResultsLists}'/>
<c:set var='groupNames' value='${requestScope.collatedGroupNames}'/>
<c:set var='portal' value='${requestScope.portal}'/>
<c:set var='portalBean' value='${requestScope.portalBean}'/>
<c:set var='portalId' scope='request' value='${portalBean.portalId}'/>
<c:set var='entitiesListJsp' value='/templates/entity/entityList.jsp'/>
<div id="content">
<div class="contents searchFailed">
<p class="warning">
<c:out value='${requestScope.message}'
default='No results were found for your query. Please modify your search and try again.'
escapeXml='false'/>
</p>
<jsp:include page="searchTips.jsp"/>
</div><!-- contents -->
</div><!-- content -->

View file

@ -0,0 +1,45 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.ApplicationBean" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %><%/* this odd thing points to something in web.xml */ %>
<!-- %@ page errorPage="/error.jsp"% -->
<% /***********************************************
Used to display a search form.
request.attributes:
request.parameters:
None yet.
Consider sticking < % = MiscWebUtils.getReqInfo(request) % > in the html output
for debugging info.
**********************************************/
%>
<c:set var='portal' value='${requestScope.portal}'/>
<c:set var='portalBean' value='${requestScope.portalBean}'/>
<c:set var='themeDir' >
<c:out value='${portal.themeDir}'/>
</c:set>
<div class='contents searchForm'>
<div class="advancedSearchForm">
<form name="filterForm" method="post" action="search">
<h3>Search</h3>
<input class="top_padded" style="width:97%;" name="querytext" value="" type="text"/>
<!-- supplanted by including OR, NOT etc. with search terms
<input name="inclusion" value="all" checked="checked" type="radio"/> all terms entered
<input name="inclusion" value="any" type="radio"/> any terms entered
</p>
-->
<p><input class="form-button" value=" Search" type="submit"/></p>
</form>
</div><!--advancedSearchForm-->
<div class='searchTips'>
<jsp:include page="searchTips.jsp"/>
</div>
</div>

View file

@ -0,0 +1,55 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %><%/* this odd thing points to something in web.xml */ %>
<%@ page errorPage="/error.jsp"%>
<% /***********************************************
Display a single search result group
request.attributes:
a List with objects with the named "entities"
a ClassGroup object named "classgroup"
request.parameters:
None yet.
Consider sticking < % = MiscWebUtils.getReqInfo(request) % > in the html output
for debugging info.
**********************************************/
if (request.getAttribute("entities") == null){
String e="searchGroup.jsp expects that request attribute 'entities' be set to the Entity object to display.";
throw new JspException(e);
}
if (request.getAttribute("classgroup") == null){
String e="searchGroup.jsp expects that request attribute 'classgroup' be set to the Entity object to display.";
throw new JspException(e);
}
%>
<c:set var='imageDir' value='images' />
<c:set var='entities' value='${requestScope.entities}'/><%/* just moving this into page scope for easy use */ %>
<c:set var='classgroup' value='${requestScope.classgroup}'/>
<c:set var='portal' value='${requestScope.portal}'/>
<c:set var='portalBean' value='${requestScope.portalBean}'/>
<div class='contents entity entity${entity.id}'>
<h1><c:out value="${entity.name}"/></h1>
<c:out value="${entity.moniker}" default="moniker?"/>
<c:if test="${!empty entity.anchor}">
<a href='<c:url value="${entity.url}"/>'>${entity.anchor}</a>
</c:if>
<c:forEach items="${entity.linksList}" var='link'>
| <a href='<c:url value="${link.url}"/>'${link.anchor}</a>
</c:forEach>
<c:if test="${!empty entity.imageThumb}">
<div class="thumbnail">
<c:if test="${!empty entity.imageFile}"><a target="_new" href="<c:url value='${imageDir}/${entity.imageFile}'/>"></c:if>
<img src="<c:url value='${imageDir}/${entity.imageThumb}'/>" title="click to view larger image in new window" width="150">
<c:if test="${!empty entity.imageFile}"></a></c:if>
</div>
</c:if>
<c:import url="${entityPropsListJsp}" /><%/* here we import the properties for the entity */ %>
<div class='description'>
<c:out value="${entity.description}" escapeXml ='false'/>
</div>
<jsp:include page="entityAdmin.jsp"/>
</div>

View file

@ -0,0 +1,173 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page import="java.util.*"%>
<%@ page import="java.net.URLEncoder"%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.*" %>
<%@ page import="org.apache.commons.lang.StringEscapeUtils" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Portal" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ page errorPage="/error.jsp"%>
<%
/***********************************************
Display Paged Search Results
request.attributes:
List object with the name "beans"
request.parameters:
None yet.
********************************************* */
if (request.getAttribute("beans") == null) {
String e = "searchBaisc.jsp expects that request attribute " +
"'beans' be set to a List of Individuals to display.";
throw new JspException(e);
}
Portal portal = (Portal) request.getAttribute("portalBean");
String portalParm = "&amp;home=" + portal.getPortalId();
%>
<div id='content'><!-- searchPaged.jsp -->
<h2>Search Results for '<c:out value="${querytext}"></c:out>'
<c:if test="${! (empty requestScope.classgroupName)}">
limited to type '${requestScope.classgroupName}'</c:if>
<c:if test="${! (empty requestScope.typeName)}">
limited to type '${requestScope.typeName}'</c:if>
</h2>
<div class='contentsBrowseGroup'>
<%
if( request.getAttribute("classgroups") != null ){
%> <div class="searchTOC"><span class="jumpText">Show only results of this <b>type</b>:</span> <%
List groups = (List) request.getAttribute("classgroups");
Iterator it = groups.iterator();
while(it.hasNext()){
VClassGroup grp = (VClassGroup)it.next();
out.println("<a href='"
+ "./search?querytext="
+ URLEncoder.encode(request.getParameter("querytext"))
+ "&classgroup="
+ URLEncoder.encode(grp.getURI())
+ "'>");
out.println(StringEscapeUtils.escapeHtml(grp.getPublicName()));
out.println("</a>");
}
out.println("</div>");
}
if( request.getAttribute("types") != null ){
%> <div class="searchTOC"><span class="jumpText">Show only results of this <b>sub-type</b>:</span> <%
List types = (List) request.getAttribute("types");
Iterator it = types.iterator();
while(it.hasNext()){
VClass type = (VClass)it.next();
out.println("<a href='"
+ "./search?querytext="
+ URLEncoder.encode(request.getParameter("querytext"))
+ "&type="
+ URLEncoder.encode(type.getURI())
+ "'>");
out.println(StringEscapeUtils.escapeHtml(type.getName()));
out.println("</a>");
}
out.println("</div>");
}
/* generate search result list */
List beans = (List) request.getAttribute("beans");
Iterator it = beans.iterator();
out.println("<ul class='searchhits'>");
while (it.hasNext()) {
Individual ent = (Individual) it.next();
String escapedURIStr = "";
try {
escapedURIStr = URLEncoder.encode(ent.getURI(),"UTF-8");
} catch (Exception e) { } // unsupported encoding?
out.println("<li>");
out.print("<a href='"
+ response.encodeURL(
getServletContext().getContextPath()
+"/entity?uri=" + escapedURIStr
+ portalParm )
+ "'>"
+ StringEscapeUtils.escapeHtml( ent.getName() )
+ "</a> ");
if (ent.getMoniker() != null && ent.getMoniker().length() > 0)
out.println(" | " + StringEscapeUtils.escapeHtml(ent.getMoniker()));
// For now, custom search views just add additional information to the name and moniker
String searchViewPrefix = "/templates/search/";
String customSearchView = null;
for (VClass type : ent.getVClasses(true)) { // first get directly asserted class(es)
if (type!=null) {
customSearchView = type.getCustomSearchView();
if (customSearchView!=null && customSearchView.length()>0 ) {
// NOTE we are NOT putting "individualURL" in the request scope
// An included custom search view jsp can optionally implement a test for "individualURL"
// as a way to optionally render additional text as a link
// SEE entityList.jsp and searchViewWithTimekey.jsp as an example
request.setAttribute("individual",ent); %>
| <jsp:include page="<%=searchViewPrefix+type.getCustomSearchView()%>"/>
<% request.removeAttribute("individual");
// TODO: figure out which of the directly asserted classes should have precedence; for now, just take the 1st
break; // have to break because otherwise customSearchView may get reset to null and trigger more evaluation
}
}
}
if (customSearchView == null ) { // try inferred classes, too
for (VClass type : ent.getVClasses()) {
if (type!=null) {
customSearchView = type.getCustomSearchView();
if (customSearchView!=null && customSearchView.length()>0 ) {
// SEE NOTE just above
request.setAttribute("individual",ent);
%><jsp:include page="<%=searchViewPrefix+type.getCustomSearchView()%>"/><%
request.removeAttribute("individual");
//TODO: figure out which of the inferred classes should have precedence; for now, just take the 1st
break;
}
}
}
}
if (ent.getDescription() != null && ent.getDescription().length() > 0) {
out.println("<div class='searchFragment'>" + ent.getDescription() + "</div>");
}
out.println("</li>");
} // END while it.hasNext()
out.println("</ul>");
/* generate pageing list */
int startIndex = (Integer)request.getAttribute("startIndex");
int hitsPerPage = (Integer)request.getAttribute("hitsPerPage");
int hitsLength = (Integer)request.getAttribute("hitsLength");
int maxHitSize = (Integer)request.getAttribute("maxHitSize");
String basePageUrl =
getServletContext().getContextPath() + "/search?querytext="
+URLEncoder.encode(request.getParameter("querytext"),"UTF-8") +
request.getAttribute("refinment");
out.println("<div class='searchpages'>");
out.println("Pages:");
for(int i=0; i<hitsLength; i=i+hitsPerPage){
if( i < maxHitSize - hitsPerPage){
String classCurrentPage = i >= (startIndex) && i < (startIndex+ hitsPerPage)?"class='currentPage'":"";
out.println("<a "+classCurrentPage+" href='"+ basePageUrl
+ "&startIndex="+ i + "&hitsPerPage=" + hitsPerPage
+ "'>" + ((i/hitsPerPage) + 1) + "</a>");
}else{
out.println("<a class='moreHits' href='"+ basePageUrl
+ "&startIndex="+ i + "&hitsPerPage=" + hitsPerPage
+ "'>more...</a>");
break;
}
}
out.println("</div>");
%>
</div>
</div><!--content from searchPaged.jsp -->

View file

@ -0,0 +1,18 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<h3>Search Tips</h3>
<ul>
<li>Use short, single terms unless your searches are returning too many results</li>
<li>When you enter more than one term, the search will look for records containing <strong>all</strong> of them unless you add the word "OR" between your terms.</li>
<li>"NOT" can help limit searches -- e.g., <i>climate NOT change</i></li>
<li>Except for boolean operators, searches are <strong>not</strong> case-sensitive, so "Geneva" and "geneva" are equivalent</li>
<li>Enclose a phrase in quotes (") to search for the whole phrase, not individual words (e.g., "protein folding") -- <i>both leading and ending quotes are required</i></li>
<li>Phrase searches may be combined with boolean operators: <i>"climate change" OR "global warming"</i></li>
<li>The search uses <strong>stemming</strong> by default so that close word variations will also be found (e.g., "sequence" also matches "sequences" and "sequencing").
Use the wildcard <strong>*</strong> character to match wider variation (e.g., <strong>nano*</strong> to match both
<i>nanotechnology</i> and <i>nanofabrication</i>), but note that searching uses <i>stemmed</i>, or shortened, versions of words,
so "cogniti*" finds nothing while "cognit*" finds both <i>cognitive</i> and <i>cognition</i></li>
<li>If you're not sure of the spelling, put a <strong>~</strong> at the end -- e.g., <i>cabage~</i> finds <i>cabbage</i>,
<i>steven~</i> finds <i>Stephen</i> and <i>Stefan</i> (as well as a few unwanted extra words)</li>
<li>To match a person or unit's primary entry, enter <i>name: Smith</i> or <i>name: Biology</i></li>
</ul>

View file

@ -0,0 +1,45 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Tab" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ page errorPage="/error.jsp"%>
<% /***********************************************
Displays the little group of things at the bottom of the page
for administrators and editors.
request.attributes:
an Tab object with the name "leadingTab"
request.parameters:
None, should only work with requestScope attributes for security reasons.
Consider sticking < % = MiscWebUtils.getReqInfo(request) % > in the html output
for debugging info.
bdc34 2006-01-22 created
**********************************************/
Tab leadingTab = (Tab) request.getAttribute("leadingTab");
if (leadingTab == null) {
String e = "tabAdmin.jsp expects that request attribute 'leadingTab' be set to a TabBean object";
throw new JspException(e);
}
%>
<c:if test="${sessionScope.loginHandler.loginStatus == 'authenticated' && sessionScope.loginHandler.loginRole > 3 }">
<c:set var='tab' value='${requestScope.leadingTab}'/><%/* just moving this into page scope for easy use */ %>
<c:set var='portal' value='${requestScope.portalBean.portalId}'/>
<div class='admin bottom'>
<c:url var="editHref" value="tabEdit">
<c:param name="home" value="${currentPortalId}"/>
<c:param name="controller" value="Tab"/>
<c:param name="id" value="${tab.tabId}"/>
</c:url>
<c:set var="editHref">
<c:out value="${editHref}" escapeXml="true"/>
</c:set>
<a href="${editHref}">edit tab: <em>${tab.title}</em></a>
<% /* | <a href='<c:url value="cloneEntity?home=${portal}&tabId=${tab.tabId}"/>'> <i>clone tab</i> ${tab.title}</a> */ %>
</div>
</c:if>

View file

@ -0,0 +1,139 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page errorPage="/error.jsp"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.TabWebUtil" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Tab" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest" %>
<%@ page import="java.util.Collection" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Portal" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Link" %>
<%@ page import="java.net.URLEncoder" %>
<%@ page import="org.joda.time.format.DateTimeFormatter" %>
<%@ page import="org.joda.time.format.ISODateTimeFormat" %>
<%@ page import="org.joda.time.DateTime" %>
<%
/******************************
Takes tab and populates Atom feed with:
requested tab and its description
entities associated with this tab
immediate children of this tab and their descriptions
******************************/
response.setContentType("application/atom+xml");
Tab leadingTab = (Tab) request.getAttribute("leadingTab");
if (leadingTab == null) {
String e = "tabprimary expects that request attribute 'leadingTab' be set to a TabBean object";
throw new JspException(e);
}
Collection<Individual> individuals = leadingTab.getRelatedEntities();
Collection<Tab> tabs = leadingTab.getChildTabs();
Portal portal = (Portal)request.getAttribute("portalBean");
int portalId = -1;
if (portal==null) {
portalId=1;
} else {
portalId=portal.getPortalId();
}
DateTime dt = new DateTime();
DateTimeFormatter dtf = ISODateTimeFormat.basicDateTimeNoMillis();
String time = dtf.print(dt.getMillis());
time = time.substring(0,4)+"-"+time.substring(4,6)+"-"+time.substring(6,11)+":"+time.substring(11,13)+":"+time.substring(13,15)+"Z";
%>
<%!
public String forURL(String frag)
{
String result = null;
try
{
result = URLEncoder.encode(frag, "UTF-8");
} catch (Exception ex) {
throw new RuntimeException("UTF-8 not supported", ex);
}
return result;
}
public String escapeEntity(String frag)
{
if(frag.contains("&")) frag = replaceAll(frag, "&", "&amp;");
if(frag.contains("'")) frag = replaceAll(frag, "'", "&apos;");
if(frag.contains("\"")) frag = replaceAll(frag, "\"", "&quot;");
if(frag.contains(">")) frag = replaceAll(frag, ">", "&gt;");
if(frag.contains("<")) frag = replaceAll(frag, "<", "&lt;");
return frag;
}
public String replaceAll(String original, String match, String replace)
{
int index1 = original.indexOf(match);
int index2 = original.indexOf(replace);
if(index1 == index2 && index1 != -1)
{
original = original.substring(0, index1+replace.length()+1)+replaceAll(original.substring(index1+replace.length()+1), match, replace);
return original;
}
if(index1 == -1) return original;
String before = original.substring(0, index1) + replace;
return before + replaceAll(original.substring(index1+1), match, replace);
}
%>
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en" xml:base="http://<%= request.getServerName()+":"+request.getLocalPort() %>">
<title><%= escapeEntity(leadingTab.getTitle()) %></title>
<subtitle><%= leadingTab.getDescription() %></subtitle>
<link href="<%= "http://"+request.getServerName()+":"+request.getLocalPort()+request.getContextPath()+escapeEntity("/index.jsp?home="+portalId+"&"+leadingTab.getTabDepthName()+"="+leadingTab.getTabId()+"&view=atom") %>" rel="self" type="application/atom+xml" />
<link href="<%= "http://"+request.getServerName()+":"+request.getLocalPort()+request.getContextPath()+escapeEntity("/index.jsp?home="+portalId+"&"+leadingTab.getTabDepthName()+"="+leadingTab.getTabId()) %>" rel="alternate" type="text/html" />
<id><%= "http://"+request.getServerName()+":"+request.getLocalPort()+request.getContextPath()+escapeEntity("/index.jsp?home="+portalId+"&"+leadingTab.getTabDepthName()+"="+leadingTab.getTabId()) %></id>
<updated><%= time %></updated>
<author>
<name>Vivo</name>
<email>vivo@cornell.edu</email>
</author>
<% for(Individual i:individuals) { %>
<entry>
<title><%= escapeEntity(i.getName()) %></title>
<% if (i.getLinksList() == null) { %>
<% for(Link l: i.getLinksList()) { %>
<link href="<%= l.getUrl() %>" rel="alternate" type="text/html" />
<% } %>
<% } else { %>
<link href="<%= escapeEntity(request.getContextPath().substring(1)+"/entity?home="+portalId+"&uri="+forURL(i.getURI())) %>" rel="alternate" type="text/html" />
<% } %>
<id><%= i.getURI() %></id>
<updated><%= time %></updated>
<% if (i.getBlurb() != null) { %>
<% if (i.getBlurb().matches(".*<.*>.*")) { %>
<summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><%= i.getBlurb() %></div></summary>
<% } %>
<% else { %>
<summary type="text"><%= i.getBlurb() %></summary>
<% } %>
<% } %>
<% if (i.getDescription() != null) { %>
<content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><%= i.getDescription() %></div></content>
<% } %>
</entry>
<% } %>
<% if (tabs != null) { %>
<% for(Tab t:tabs) { %>
<entry>
<title><%= escapeEntity(t.getTitle()) %></title>
<link href="<%= escapeEntity(request.getContextPath().substring(1)+"/index.jsp?home="+portalId+"&"+t.getTabDepthName()+"="+t.getTabId()) %>" rel="alternate" type="text/html" />
<id><%= "http://"+request.getServerName()+":"+request.getLocalPort()+request.getContextPath()+escapeEntity("/index.jsp?home="+portalId+"&"+t.getTabDepthName()+"="+t.getTabId()) %></id>
<updated><%= time %></updated>
<% if (t.getDescription() != null) { %>
<% if (t.getDescription().matches(".*<.*>.*")) { %>
<summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><%= t.getDescription() %></div></summary>
<% } %>
<% else { %>
<summary type="text"><%= t.getDescription() %></summary>
<% } %>
<% } %>
<% if (t.getBody() != null) { %>
<content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><%= t.getBody() %></div></content>
<% } %>
</entry>
<% } %>
<% } %>
</feed>

View file

@ -0,0 +1,145 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page import="org.apache.commons.logging.Log" %>
<%@ page import="org.apache.commons.logging.LogFactory" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.TabWebUtil" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Tab" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Portal" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %>
<%@ page errorPage="/error.jsp"%>
<% /***********************************************
Display a single tab or subtab in the most basic fashion.
Note: most of the depth based control is in tabSub.jsp
tabSubAsList.jsp and tabEntities.jsp. The only depth based
control of what gets displayed that is in this code is
the tab.body, which is only displayed on depth 1.
request.attributes:
a Tab object with the name "tab3223" where 3223 is
the id of the tab to display. This can be added to the attribute
list using TabWebUtil.stashTabsInRequest which gets called
in tabprimary.jsp.
request.parameters:
"tabDepth" String that is the depth of the tab in the display
leadingTab = 1, child of leadingTab = 2, etc.
if tabDepth is not set it defaults to 1
"tabId" id of the tab to display, defaults to leadingTab.
"noDesc" if true then don't display the tab.description, default is false.
"noEntities" if true then don't display the associated entities for this tab.
"noContent" if true then don't display the primary content tabs.
"noSubtabs" if true then don't display the subtabs associated with this tab.
"subtabsAsList" if true then display just children (not grand children,etc) subtabs as a list.
Consider sticking < % = MiscWebUtils.getReqInfo(request) % > in the html
output for debugging info.
bdc34 2006-01-03 created
**********************************************/
String INACTIVE = "";
String DEFAULT_LABEL = null;
/***************************************************
nac26 2008-05-08 following brian's lead from menu.jsp to get the portalId so it can be added to the tab links */
final Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.web.tabBasic.jsp");
Portal portal = (Portal)request.getAttribute("portalBean");
int portalId = -1;
if (portal==null) {
log.error("Attribute 'portalBean' missing or null; portalId defaulted to 1");
portalId=1;
} else {
portalId=portal.getPortalId();
}
/**************************************************/
String tabId = request.getParameter("tabId");
if (tabId == null) {
String e = "tabBasic expects that request parameter 'tabId' be set";
throw new JspException(e);
}
Tab tab = TabWebUtil.findStashedTab(tabId, request);
if (tab == null) {
String e = "tabBasic expects that request attribute 'leadingTab' will have the tab with tabId as a sub tab";
throw new JspException(e);
}
String obj = request.getParameter("tabDepth");
int depth = 1; //depth 1 represents primary tab level, 2 is secondary, etc.
if (obj == null) {
String e = "tabBasic expects that request parameter 'tabDepth' be set";
throw new JspException(e);
}
depth = Integer.parseInt((String) obj);
boolean entities = true;
if ("true".equalsIgnoreCase(request.getParameter("noEntities")))
entities = false;
boolean content = true;
if ("true".equalsIgnoreCase(request.getParameter("noContent")))
content = false;
boolean subtabs = true;
if ("true".equalsIgnoreCase(request.getParameter("noSubtabs")))
subtabs = false;
boolean subtabsAsList = false;
if ("true".equalsIgnoreCase(request.getParameter("subtabsAsList"))) {
subtabsAsList = true;
subtabs = false;
}
boolean noDesc = false;
if ("true".equalsIgnoreCase(request.getParameter("noDesc"))) {
noDesc = true;
}
String tabEntsController = Controllers.TAB_ENTITIES;
String titleLink = TabWebUtil.tab2TabAnchorElement(tab, request, depth, INACTIVE, DEFAULT_LABEL, portalId);
if (depth == 1)//don't make a link for root dispaly tab
titleLink = tab.getTitle();
Integer headingDepth = depth + 1;
String headingOpen = "<h" + headingDepth + ">";
String headingClose = "</h" + headingDepth + ">";
String tabDesc = "";
if (!noDesc && tab.getDescription() != null && !tab.getDescription().equals("&nbsp;"))
tabDesc = "<div class='tabDesc' >" + tab.getDescription() + "</div>";
String tabBody = "";
/* tab.body is only displayed for the depth 1 display tab */
if (depth <= 2 && tab.getBody() != null && !tab.getBody().equals("&nbsp;"))
tabBody = "<div class='tabBody'>" + tab.getBody() + "</div><!-- END div class='tabBody' -->";
%>
<div class="tab depth<%=depth%>" id="tab<%=tabId%>">
<%=headingOpen%><%=titleLink%><%=headingClose%>
<%=tabDesc%>
<%=tabBody%>
<% if( entities ){ %>
<jsp:include page="<%=tabEntsController%>" flush="true">
<jsp:param name="tabId" value="<%=tab.getTabId()%>"/>
<jsp:param name="tabDepth" value="<%=depth%>"/>
</jsp:include>
<% } %>
<% if( subtabs ) { %>
<jsp:include page="tabSub.jsp" flush="true">
<jsp:param name="tabId" value="<%=tab.getTabId()%>"/>
<jsp:param name="tabDepth" value="<%=depth%>"/>
</jsp:include>
<% }%>
<% if( subtabsAsList ) { %>
<jsp:include page="tabSubAsList.jsp" flush="true">
<jsp:param name="tabId" value="<%=tab.getTabId()%>"/>
<jsp:param name="tabDepth" value="<%=depth%>"/>
</jsp:include>
<% }%>
<% if(content) { %>
<jsp:include page="tabContent.jsp" flush="true">
<jsp:param name="tabId" value="<%=tab.getTabId()%>"/>
<jsp:param name="tabDepth" value="1" />
</jsp:include>
<% } %>
</div><!-- tab depth<%=depth%> -->

View file

@ -0,0 +1,95 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Tab" %>
<%@ page import="java.util.Collection,java.util.Iterator" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.TabWebUtil" %>
<%@ page errorPage="/error.jsp"%>
<%
int CutOffDepth = 3;
/***********************************************
Tab Content is to display the sub tabs of type primaryTabContent
Primary Content Tabs will have:
tab heading,
tab description
request.attributes
"leadingTab" the tab that is at the top of the display hierarchy
"tabDepth" String that is the depth of the tab in the display
leadingTab = 1, child of leadingTab = 2, etc.
Here tabDepth does not default, it must be set
bdc34 2006-01-12 created
**********************************************/
Tab leadingTab =(Tab) request.getAttribute("leadingTab");
if(leadingTab== null ) {
String e="tabContent expects that request attribute 'leadingTab' be set";
throw new JspException(e);
}
String tabId = request.getParameter("tabId");
if( tabId == null ){
String e="tabContent expects that request parameter 'tabId' be set";
throw new JspException(e);
}
Tab tab = null;
tab = TabWebUtil.findStashedTab(tabId,request);
if( tab == null ){
String e="tabContent expects that request attribute 'leadingTab' will have the tab with tabId as a sub tab";
throw new JspException(e);
}
String obj= request.getParameter("tabDepth");
int depth = 1; //depth 1 represents primary tab level, 2 is secondary, etc.
if( obj == null ){
String e="tabContent expects that request parameter 'tabDepth' be set";
throw new JspException(e);
}
depth = Integer.parseInt((String)obj);
int childDepth = depth + 1;
Collection children = tab.filterChildrenForContentTabs();
if( depth < CutOffDepth && children!= null ){
Iterator childIter=children.iterator();
boolean hasChildren = childIter.hasNext();
int columnSize = children.size();
if( hasChildren ){ %>
<div id='tabContent'><!-- tabContent.jsp -->
<table><tr>
<% }
while( childIter.hasNext() ) {
Tab contentTab = (Tab)childIter.next();
TabWebUtil.stashTabsInRequest(contentTab, request); %>
<% if (columnSize==2) {%>
<td class="span-12">
<% } %>
<% else if (columnSize==3) {%>
<td class="span-8">
<% } %>
<% else if (columnSize==4) {%>
<td class="span-6">
<% } %>
<% else {%>
<td>
<% } %>
<jsp:include page='tabBasic.jsp'>
<jsp:param name='tabDepth' value='<%=childDepth%>' />
<jsp:param name='tabId' value='<%=contentTab.getTabId()%>' />
<jsp:param name='noContent' value='true'/>
<jsp:param name='noSubtabs' value='true'/>
</jsp:include>
</td>
<% }
if( hasChildren ){ %>
</tr></table>
</div><!-- end tabContent div-->
<%}%>
<% } %>

View file

@ -0,0 +1,128 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page import="java.util.Collection" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Tab" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.TabWebUtil" %>
<%@ page import="java.util.Iterator" %>
<%@ page errorPage="/error.jsp"%>
<%
int CutOffDepth = 3; //tab depth at which subtabs stop being shown
int HorzSubTabCutOff = 8; //subtab count at which we switch to tabSubAsList.jsp
int EntsInDepth2TabsCutOff = 4; //subtab count at which entities stop being shown in depth 2 tabs.
int TabDescCutoffDepth = 3;//depth at which descriptions of subtabs stop being shown
/***********************************************
Display a set of subtabs for a tab
request.attributes
"leadingTab" the tab that is at the top of the display hierarchy
request.parameters
"tabId" id of the tab to do subtabs for
"noEntities" can be set to 'true' or 'false' and will control if
subtabs have entities. defaults to false/having entites;
"tabDepth" String that is the depth of the tab in the display
leadingTab = 1, child of leadingTab = 2, etc.
Here tabDepth does not default, it must be set
bdc34 2006-01-12 created
**********************************************/
Tab leadingTab = (Tab) request.getAttribute("leadingTab");
if (leadingTab == null) {
String e = "tabSub expects that request attribute 'leadingTab' be set";
throw new JspException(e);
}
String tabId = request.getParameter("tabId");
if (tabId == null) {
String e = "tabSub expects that request parameter 'tabId' be set";
throw new JspException(e);
}
Tab tab = null;
tab = TabWebUtil.findStashedTab(tabId, request);
if (tab == null) {
String e = "tabSub expects that request attribute 'leadingTab' will have the tab with tabId as a sub tab";
throw new JspException(e);
}
String obj = request.getParameter("tabDepth");
int depth = 1; //depth 1 represents primary tab level, 2 is secondary, etc.
if (obj == null) {
String e = "tabSub expects that request parameter 'tabDepth' be set";
throw new JspException(e);
}
depth = Integer.parseInt((String) obj);
int childDepth = depth + 1;
Collection children = tab.filterChildrenForSubtabs();
if (depth < CutOffDepth && children != null) {
if (children.size() >= HorzSubTabCutOff) { /* too many children, do tabSubAsList instead */ %>
<jsp:include page='tabSubAsList.jsp' >
<jsp:param name='tabDepth' value='<%=depth%>' />
<jsp:param name='tabId' value='<%=tabId%>' />
</jsp:include>
<% } else {
//here we figure out if these subtabs should have entities
//if we were passed a parameter, then maybe no entities
obj = request.getParameter("noEntities");
String noEntities = "true".equalsIgnoreCase(obj) ? "true" : "false";
//if we have more subtabs then the cutoff, no entities for the subtabs
noEntities = (children.size() >= EntsInDepth2TabsCutOff ? "true" : noEntities);
//if we are the first set of subtabs on a primary tab it seems there are no entities? sort of odd
noEntities = ((tab.PRIMARY_TAB == tab.getTabtypeId() && childDepth == 2) ? "true" : noEntities);
String noDesc = (childDepth >= TabDescCutoffDepth) ? "true" : "false";
Iterator childIter = children.iterator();
boolean hasChildren = childIter.hasNext();
int columnSize = children.size();
if (hasChildren) { %>
<div class='subtabs'><!-- tabSub.jsp -->
<table><tr>
<% }
while( childIter.hasNext() ) {
Tab subtab = (Tab)childIter.next();
TabWebUtil.stashTabsInRequest(subtab, request); %>
<% if (columnSize==1) {%>
<td class="span-24">
<% } %>
<% else if (columnSize==2) {%>
<td class="span-12">
<% } %>
<% else if (columnSize==3) {%>
<td class="span-8">
<% } %>
<% else if (columnSize==4) {%>
<td class="span-6">
<% } %>
<% else {%>
<td>
<% } %>
<jsp:include page='tabBasic.jsp'>
<jsp:param name='tabDepth' value='<%=childDepth%>' />
<jsp:param name='tabId' value='<%=subtab.getTabId()%>' />
<jsp:param name='noDesc' value='<%=noDesc%>'/>
<jsp:param name='noEntities' value='<%=noEntities%>'/>
<jsp:param name='noContent' value='true'/>
<jsp:param name='noSubtabs' value='true'/>
<jsp:param name='subtabsAsList' value='true'/>
</jsp:include>
</td>
<% }
if( hasChildren ){ %>
</tr></table>
</div><!-- end subtabs div-->
<%}
}
} %>

View file

@ -0,0 +1,87 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page import="java.lang.Integer" %>
<%@ page import="java.util.Collection" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.TabWebUtil" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Tab" %>
<%@ page errorPage="/error.jsp"%>
<%
int CutOffDepth = 3; //tab depth at which subtabs stop being shown
int TabDescCutoffDepth = 3;//depth at which descriptions of subtabs stop being shown
/***********************************************
Display a set of subtabs for a Tab as a <UL></UL>
Based on tabSub.
This does not attempt to display any subtabs, entities, etc.
request.attributes
"leadingTab" the tab that is at the top of the display hierarchy
request.parameters
"tabId" id of the tab to do subtabs for
"tabDepth" String that is the depth of the tab in the display
leadingTab = 1, child of leadingTab = 2, etc.
Here tabDepth does not default, it must be set
bdc34 2006-01-18 created
**********************************************/
Tab leadingTab = (Tab) request.getAttribute("leadingTab");
if (leadingTab == null) {
String e = "tabSub expects that request attribute 'leadingTab' be set";
throw new JspException(e);
}
String tabId = request.getParameter("tabId");
if (tabId == null) {
String e = "tabSub expects that request parameter 'tabId' be set";
throw new JspException(e);
}
Tab tab = null;
tab = TabWebUtil.findStashedTab(tabId, request);
if (tab == null) {
String e = "tabSub expects that request attribute 'leadingTab' will have the tab with tabId as a sub tab";
throw new JspException(e);
}
String obj = request.getParameter("tabDepth");
int depth = 1; //depth 1 represents primary tab level, 2 is secondary, etc.
if (obj == null) {
String e = "tabSub expects that request parameter 'tabDepth' be set";
throw new JspException(e);
}
depth = Integer.parseInt((String) obj);
int childDepth = depth + 1;
String noDesc = (childDepth >= TabDescCutoffDepth) ? "true" : "false";
//noDesc = "true";
Collection children = tab.filterChildrenForSubtabs();
if (depth < CutOffDepth && children != null) {
Iterator childIter = children.iterator();
boolean hasChildren = childIter.hasNext();
if (hasChildren) { %>
<div class='subtabs'><!-- tabSub.jsp -->
<ul class='tabSubAsList'>
<% }
while( childIter.hasNext() ) {
Tab subtab = (Tab)childIter.next();
TabWebUtil.stashTabsInRequest(subtab,request); %>
<li>
<jsp:include page='tabBasic.jsp'>
<jsp:param name='tabDepth' value='<%=childDepth%>' />
<jsp:param name='tabId' value='<%=subtab.getTabId()%>' />
<jsp:param name='noDesc' value='<%=noDesc%>'/>
<jsp:param name='yesBody' value='false'/>
<jsp:param name='noEntities' value='true'/>
<jsp:param name='noContent' value='true'/>
<jsp:param name='noSubtabs' value='true'/>
</jsp:include>
</li>
<% }
if( hasChildren ){ %>
</ul>
</div><!-- end subtabs div-->
<%}%>
<% } %>

View file

@ -0,0 +1,38 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page errorPage="/error.jsp"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.TabWebUtil" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Tab" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest" %>
<% /***********************************************
Display a primary tab.
A display of a primary tab will include:
primary tab heading,
the primary tab description,
the primary tab body,
the secondary tabs ,
the primary content tabs.
expected request.attributes:
'leadingTab' Tab to be desplayed as root of display hierarchy
bdc34 2006-01-03 created
**********************************************/
Tab leadingTab = (Tab) request.getAttribute("leadingTab");
if (leadingTab == null) {
String e = "tabprimary expects that request attribute 'leadingTab' be set to a TabBean object";
throw new JspException(e);
}
TabWebUtil.stashTabsInRequest(leadingTab, request); %>
<div id="content">
<div id='contents'>
<jsp:include page='/templates/tabs/tabBasic.jsp' flush='true'>
<jsp:param name='tabId' value='<%= leadingTab.getTabId() %>' />
<jsp:param name='tabDepth' value='1' />
</jsp:include>
<jsp:include page='/templates/tabs/tabAdmin.jsp' flush='true' />
</div> <!-- contents -->
</div><!-- content -->