Tweak the build script, so a developer can build vitro-core and it won't have any effect when they build vivoweb in the same workspace.

This commit is contained in:
jeb228 2010-01-29 22:12:41 +00:00
commit 3f17d16d7b
68 changed files with 40148 additions and 0 deletions

View file

@ -0,0 +1,59 @@
<%-- $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.vitro.webapp.filters.VitroRequestPrep" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep" %>
<%@ page import="java.util.List" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ page errorPage="/error.jsp"%>
<c:if test="${sessionScope.loginHandler != null &&
sessionScope.loginHandler.loginStatus == 'authenticated' &&
sessionScope.loginHandler.loginRole >= sessionScope.loginHandler.editor}">
<c:set var="showCuratorEdits" value="true"/>
</c:if>
<c:set var='entity' value='${requestScope.entity}'/><%/* just moving this into page scope for easy use */ %>
<c:set var='dashboardPropsListJsp' value='/dashboardPropList'/>
<c:set var='portal' value='${currentPortalId}'/>
<c:set var='portalBean' value='${currentPortal}'/>
<c:set var='imageDir' value='images' />
<div id="dashboard"<c:if test="${showCuratorEdits}"> class="loggedIn"</c:if>>
<c:if test="${!empty entity.imageThumb}">
<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 class="headshot" 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>
<c:if test="${!empty entity.citation}"><div class="citation">${entity.citation}</div></c:if>
</c:if>
<ul class="profileLinks">
<c:if test="${!empty entity.anchor}">
<c:choose>
<c:when test="${!empty entity.url}">
<c:url var="entityUrl" value="${entity.url}" />
<li><a class="externalLink" href="<c:out value="${entityUrl}"/>">${entity.anchor}</a></li>
</c:when>
<c:otherwise><li>${entity.anchor}</li></c:otherwise>
</c:choose>
</c:if>
<c:if test="${!empty entity.linksList }">
<c:forEach items="${entity.linksList}" var='link'>
<c:url var="linkUrl" value="${link.url}" />
<li><a class="externalLink" href="<c:out value="${linkUrl}"/>">${link.anchor}</a></li>
</c:forEach>
</c:if>
</ul>
<c:if test="${showCuratorEdits}">
<c:import url="${dashboardPropsListJsp}">
<%-- unless a value is provided, properties not assigned to a group will not appear on the dashboard --%>
<c:param name="unassignedPropsGroupName" value=""/>
</c:import>
</c:if>
</div>

View file

@ -0,0 +1,95 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page language="java"%>
<%@ page import="java.util.Calendar" %>
<%@ page import="org.apache.commons.logging.Log" %>
<%@ page import="org.apache.commons.logging.LogFactory" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest"%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.*"%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Portal" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %><%/* this odd thing points to something in web.xml */ %>
<jsp:useBean id="loginHandler" class="edu.cornell.mannlib.vedit.beans.LoginFormBean" scope="session" />
<%
/**
* @version 1.00
* @author Jon Corson-Rikert
* UPDATES:
* 2006-01-04 bdc removed <head> and <body> tags and moved from <table> to <div>
* 2005-07-07 JCR included LoginFormBean so can substitute filterbrowse for portalbrowse for authorized users
*/
final Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.web.themes.vivo-basic.footer.jsp");
VitroRequest vreq = new VitroRequest(request);
Portal portal = vreq.getPortal();
if (portal==null) {
log.error("portal from vreq.getPortal() null in themes/vivo-basic/footer.jsp");
}
HttpSession currentSession = request.getSession();
boolean authorized = false;
if (loginHandler.getLoginStatus().equals("authenticated")) /* test if session is still valid */
if (currentSession.getId().equals(loginHandler.getSessionId()))
if (request.getRemoteAddr().equals(
loginHandler.getLoginRemoteAddr()))
authorized = true;
%>
<c:set var="currentYear" value="<%= Calendar.getInstance().get(Calendar.YEAR) %>" />
<c:set var='context' value="<%=vreq.getContextPath()%>" />
<c:set var='themePath'>
<c:if test="${!empty context && context != ''}">/${context}</c:if>/<%=portal.getThemeDir()%>
</c:set>
<c:set var='themeDir'><c:out value='${themePath}' default='/themes/vivo-basic/' /></c:set>
<c:set var="currentPortal" value="<%=portal.getPortalId()%>"/>
<div id='footer'>
<% if (!(portal.getBannerImage() == null || portal.getBannerImage().equals("")))
{ %>
<img class="footerLogo" src="${themeDir}site_icons/<%=portal.getBannerImage()%>" alt="<%=portal.getShortHand()%>"/>
<% } %>
<div class='footerLinks'>
<ul class="otherNav">
<c:url var="aboutHref" value="<%= Controllers.ABOUT %>">
<c:param name="home" value="${currentPortal}"/>
</c:url>
<c:set var="aboutHref">
<c:out value="${aboutHref}" escapeXml="true"/>
</c:set>
<li><a href="${aboutHref}" title="more about this web site">About</a></li>
<c:url var="contactHref" value="/comments">
<c:param name="home" value="${currentPortal}"/>
</c:url>
<c:set var="contactHref">
<c:out value="${contactHref}" escapeXml="true"/>
</c:set>
<li class="last"><a href="${contactHref}" title="feedback form">Contact Us</a></li>
</ul>
</div>
<% if (portal.getCopyrightAnchor() != null && portal.getCopyrightAnchor().length()>0) { %>
<div class='copyright'>
&copy;${currentYear}&nbsp;
<% if (portal.getCopyrightURL() != null && portal.getCopyrightURL().length()>0) { %>
<a href="<%=portal.getCopyrightURL()%>">
<% } %>
<%=portal.getCopyrightAnchor()%>
<% if (portal.getCopyrightURL() != null && portal.getCopyrightURL().length()>0) { %>
</a>
<% } %>
</div>
<div class='copyright'>
All Rights Reserved. <a href="termsOfUse?home=<%=portal.getPortalId()%>">Terms of Use</a>
</div>
<% } %>
</div>

View file

@ -0,0 +1,131 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page language="java" %>
<%@ page errorPage="error.jsp"%>
<%@ page import="org.apache.commons.logging.Log" %>
<%@ page import="org.apache.commons.logging.LogFactory" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.TabMenu" %>
<%@ 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.web.BreadCrumbsUtil" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<jsp:useBean id="loginHandler" class="edu.cornell.mannlib.vedit.beans.LoginFormBean" scope="session" />
<%
/**
*
* @version 1.00
* @author Jon Corson-Rikert, Brian Caruso, and Brian Lowe
*
* UPDATES:
* 2009-04-20 MW542 moved search form to menu.jsp
* 2007-09-27 BJL moved VIVO and CALS-specific markup to VIVO clone
* 2006-01-31 BJL edited to remove deprecated markup
* 2005-11-06 JCR put styling on extra search selection box
* 2005-10-25 JCR changed local ALL CALS RESEARCH constant to appBean.getSharedPortalFlagNumeric()
* 2005-10-11 JCR tweaks to VIVO search label spacing in header
* 2005-09-15 JCR,BDC converted to use revised ApplicationBean and PortalBean
* 2005-08-16 JCR added CALS_IMPACT contant and modified code to use CALS display for that portal
* 2005-08-01 JCR changed ordering of other portals being displayed to displayRank instead of appName (affects SGER, CALS portals)
* 2005-07-05 JCR retrieving ONLY_CURRENT and ONLY_PUBLIC from database and setting in ApplicationBean
* 2005-06-20 JCR enabling a common CALS research portal via ALL CALS RESEARCH
* 2005-06-20 JCR removed MIN_STATUS_ID and minstatus parameter from search -- has been changed to interactive-only maxstatus parameter
* JCR 2005-06-14 : added isInitialized() test for appBean and portalBean
*/
HttpSession currentSession = request.getSession();
String currentSessionIdStr = currentSession.getId();
int securityLevel = -1;
String loginName = null;
if (loginHandler.testSessionLevel(request) > -1) {
securityLevel = Integer.parseInt(loginHandler.getLoginRole());
loginName = loginHandler.getLoginName();
}
final Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.web.menu.jsp");
VitroRequest vreq = new VitroRequest(request);
Portal portal = vreq.getPortal();
int portalId = -1;
if (portal==null) {
log.error("Attribute 'portalBean' missing or null; portalId defaulted to 1");
portalId=1;
} else {
portalId=portal.getPortalId();
}
String fixedTabStr=(fixedTabStr=request.getParameter("fixed"))==null?null:fixedTabStr.equals("")?null:fixedTabStr;
%>
<c:set var='context' value="<%=vreq.getContextPath()%>" />
<c:set var='themePath'>
<c:if test="${!empty context && context != ''}">/${context}</c:if>/<%=portal.getThemeDir()%>
</c:set>
<c:set var='themeDir'><c:out value='${themePath}' default='/themes/vivo-basic/' /></c:set>
<c:set var="currentPortal" value="<%=portal.getPortalId()%>"/>
<%
String homeURL = (portal.getRootBreadCrumbURL()!=null && portal.getRootBreadCrumbURL().length()>0) ?
portal.getRootBreadCrumbURL() : request.getContextPath()+"/";
%>
<!-- uncomment this div to place your institutional branding/identity at the top of every page
<div id="institution">
</div>
-->
<div id="identity">
<h1><a title="Home" href="<%=homeURL%>"><%out.print(portal.getAppName());%></a></h1>
<% if (portal.getShortHand() != null) { %>
<em><%out.print(portal.getShortHand());%></em>
<% } %>
<ul id="otherMenu">
<%-- A user is logged in --%>
<% if (securityLevel > 0) { %>
<c:url var="logoutHref" value="<%= Controllers.LOGOUT_JSP %>">
<c:param name="home" value="${currentPortal}" />
<c:param name="loginSubmitMode" value="Log Out" />
</c:url>
<c:url var="siteAdminHref" value="<%= Controllers.SITE_ADMIN %>">
<c:param name="home" value="${currentPortal}" />
</c:url>
<li class="border">
Logged in as <strong><%= loginName %></strong> (<a href="${logoutHref}">Log out</a>)
</li>
<li class="border"><a href="${siteAdminHref}" >Site Admin</a></li>
<%-- A user is not logged in --%>
<% } else { %>
<c:url var="loginHref" value="<%= Controllers.LOGIN %>">
<c:param name="home" value="${currentPortal}"/>
<c:param name="login" value="block"/>
</c:url>
<li class="border"><a title="log in to manage this site" href="${loginHref}">Log in</a></li>
<% } %>
<c:url var="aboutHref" value="<%= Controllers.ABOUT %>">
<c:param name="home" value="${currentPortal}"/>
</c:url>
<c:set var="aboutHref">
<c:out value="${aboutHref}" escapeXml="true"/>
</c:set>
<li class="border"><a href="${aboutHref}" title="more about this web site">About</a></li>
<li><a href='<c:url value="/comments"><c:param name="home" value="${currentPortal}"/></c:url>'>Contact Us</a></li>
</ul>
</div><!-- end identity -->

View file

@ -0,0 +1,146 @@
<%-- $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.TabMenu" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Portal" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.ApplicationBean" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.BreadCrumbsUtil" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.TabWebUtil" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.PortalWebUtil" %>
<%@page import="java.util.List"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<jsp:useBean id="loginHandler" class="edu.cornell.mannlib.vedit.beans.LoginFormBean" scope="session" />
<%
/***********************************************
Make the Tab menu list and search block
mw542 2009-04-24 moved search from identity.jsp, updated with new code from bdc34
bdc34 2006-01-03 created
**********************************************/
final Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.web.menu.jsp");
Portal portal = (Portal)request.getAttribute("portalBean");
int portalId = -1;
if (portal==null) {
portalId=1;
} else {
portalId=portal.getPortalId();
}
VitroRequest vreq = new VitroRequest(request);
List primaryTabs = vreq.getWebappDaoFactory().getTabDao().getPrimaryTabs(portalId);
request.setAttribute("primaryTabs", primaryTabs);
int tabId = TabWebUtil.getTabIdFromRequest(vreq);
int rootId = TabWebUtil.getRootTabId(vreq);
List tabLevels = vreq.getWebappDaoFactory().getTabDao().getTabHierarcy(tabId,rootId);
request.setAttribute("tabLevels", tabLevels);
String uri = (String)request.getAttribute("javax.servlet.forward.request_uri");
if(uri != null){
request.setAttribute("indexClass", uri.indexOf("browsecontroller") > 0 ? "class=\"activeTab\"" : "");
if ( uri.indexOf("about") > 0) {
request.setAttribute("aboutClass","class=\"activeTab\"");
}
if ( uri.indexOf("comments") > 0) {
request.setAttribute("commentsClass","class=\"activeTab\"");
}
}
// application variables not stored in application bean
final String DEFAULT_SEARCH_METHOD = "fulltext";
final int FILTER_SECURITY_LEVEL = 4;
final int VIVO_SEARCHBOX_SIZE = 20;
ApplicationBean appBean = vreq.getAppBean();
PortalWebUtil.populateSearchOptions(portal, appBean, vreq.getWebappDaoFactory().getPortalDao());
PortalWebUtil.populateNavigationChoices(portal, request, appBean, vreq.getWebappDaoFactory().getPortalDao());
HttpSession currentSession = request.getSession();
String currentSessionIdStr = currentSession.getId();
int securityLevel = -1;
String loginName = null;
if (loginHandler.testSessionLevel(request) > -1) {
securityLevel = Integer.parseInt(loginHandler.getLoginRole());
loginName = loginHandler.getLoginName();
}
%>
<c:set var="themeDir">
<c:out value="<%=portal.getThemeDir()%>" default="themes/vivo-basic" />
</c:set>
<c:url var="themePath" value="/${themeDir}" />
<c:url var="searchURL" value="/search"/>
<c:set var="currentPortal" value="<%=portal.getPortalId()%>"/>
<c:set var="rootTab" value="<%=rootId%>"/>
<!-- ************** START menu.jsp ************** -->
<div id="navAndSearch" class="block">
<div id="primaryAndOther">
<ul id="primary">
<c:forEach items="${primaryTabs}" var="tab">
<li>
<c:remove var="activeClass"/>
<c:if test="${param.primary==tab.tabId}">
<c:set var="activeClass"> class="activeTab" </c:set>
</c:if>
<c:forEach items="${tabLevels}" var="subTab">
<c:if test="${subTab==tab.tabId && subTab != rootTab}">
<c:set var="activeClass"> class="activeTab" </c:set>
</c:if>
</c:forEach>
<c:url var="tabHref" value="/index.jsp"><c:param name="primary" value="${tab.tabId}"/></c:url>
<a ${activeClass} href="${tabHref}">
<c:out value="${tab.title}"/></a>
</li>
</c:forEach>
<li>
<a ${indexClass} href="<c:url value="/browsecontroller"/>"
title="list all contents by type">
Index</a>
</li>
</ul>
</div><!--END 'primaryAndOther'-->
<%-- TabMenu.getSecondaryTabMenu(vreq) --%>
<%------------- Search Form -------------%>
<div id="searchBlock">
<form id="searchForm" action="${searchURL}" >
<label for="search">Search </label>
<% if (securityLevel>=FILTER_SECURITY_LEVEL && appBean.isFlag1Active()) { %>
<select id="search-form-modifier" name="flag1" class="form-item" >
<option value="nofiltering" selected="selected">entire database (<%=loginName%>)</option>
<option value="${currentPortal}"><%=portal.getShortHand()%></option>
</select>
<% } else {%>
<input type="hidden" name="flag1" value="${currentPortal}" />
<% } %>
<input type="text" name="querytext" id="search" class="search-form-item" value="<c:out value="${requestScope.querytext}"/>" size="<%=VIVO_SEARCHBOX_SIZE%>" />
<input class="search-form-submit" name="submit" type="submit" value="Search" />
</form>
</div>
<%-- this div is needed for clearing floats --%>
<%-- <div class="clear"></div> --%>
</div><!-- END 'navigation' -->
<div id="breadcrumbs" class="small"><%=BreadCrumbsUtil.getBreadCrumbsDiv(request)%></div>
<!-- ************************ END menu.jsp ************************ -->