NIHVIVO-1389 NIHVIVO-1407 NIHVIVO-1437 Significant refactoring of templates both in vitro core and vivo themes to ensure consistent markup with 3 different base templates at play (page.ftl, basicPage.jsp and formPrefix/formSuffix.jsp) Resulted in creating smaller component freemarker templates that could be included by all of the base templates, whether ftl or jsp. This is a temporary compromise while we continue our conversion to Freemarker. The goal was to keep jsp files outside of the theme and working behind the scenes.

This commit is contained in:
nac26 2010-12-08 14:04:45 +00:00
parent f0131adbd0
commit c9fa835a9e
28 changed files with 210 additions and 978 deletions

View file

@ -1,118 +0,0 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%-- This is a temporary file and will be removed once we have completed the transition to freemarker --%>
<%@ page import="java.util.List" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep"%>
<%@ 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.controller.freemarker.FreemarkerHttpServlet" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jstl/functions" prefix="fn" %>
<%
FreemarkerHttpServlet.getFreemarkerComponentsForJsp(request);
%>
<%
VitroRequest vreq = new VitroRequest(request);
Portal portal = vreq.getPortal();
String contextRoot = vreq.getContextPath();
String themeDir = portal != null ? portal.getThemeDir() : Portal.DEFAULT_THEME_DIR_FROM_CONTEXT;
themeDir = contextRoot + '/' + themeDir;
%>
<c:set var="portal" value="${requestScope.portalBean}"/>
<c:set var="themeDir"><%=themeDir%></c:set>
<c:set var="bodyJsp"><c:out value="${requestScope.bodyJsp}" default="/debug.jsp"/></c:set>
<c:set var="title"><c:out value="${requestScope.title}" /></c:set>
<%-- test for Wilma theme to help for smooth transition --%>
<c:choose>
<c:when test="${fn:contains(themeDir,'wilma')}">
<jsp:include page="/themes/wilma/templates/edit/formPrefix.jsp" flush="true"/>
</c:when>
<c:otherwise>
<!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">
<head> <!-- formPrefix.jsp -->
<script type="text/javascript" src="<c:url value="/js/jquery.js"/>"></script>
<%
String useTinyMCE = (useTinyMCE=request.getParameter("useTinyMCE")) != null && !(useTinyMCE.equals("")) ? useTinyMCE : "false";
if (useTinyMCE.equalsIgnoreCase("true")) {
String height = (height=request.getParameter("height")) != null && !(height.equals("")) ? height : "200";
String width = (width=request.getParameter("width")) != null && !(width.equals("")) ? width : "75%";
String defaultButtons="bold,italic,underline,separator,link,bullist,numlist,separator,sub,sup,charmap,separator,undo,redo,separator,code";
String buttons = (buttons=request.getParameter("buttons")) != null && !(buttons.equals("")) ? buttons : defaultButtons;
String tbLocation = (tbLocation=request.getParameter("toolbarLocation")) != null && !(tbLocation.equals("")) ? tbLocation : "top";
%>
<script language="javascript" type="text/javascript" src="../js/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
theme : "advanced",
mode : "textareas",
theme_advanced_buttons1 : "<%=buttons%>",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "<%=tbLocation%>",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_path : false,
theme_advanced_resizing : true,
height : "<%=height%>",
width : "<%=width%>",
valid_elements : "a[href|name|title],br,p,i,em,cite,strong/b,u,sub,sup,ul,ol,li",
fix_list_elements : true,
fix_nesting : true,
cleanup_on_startup : true,
gecko_spellcheck : true,
forced_root_block: false
//forced_root_block : 'p',
// plugins: "paste",
// theme_advanced_buttons1_add : "pastetext,pasteword,selectall",
// paste_create_paragraphs: false,
// paste_create_linebreaks: false,
// paste_use_dialog : true,
// paste_auto_cleanup_on_paste: true,
// paste_convert_headers_to_strong : true
// save_callback : "customSave",
// content_css : "example_advanced.css",
// extended_valid_elements : "a[href|target|name]",
// plugins : "table",
// theme_advanced_buttons3_add_before : "tablecontrols,separator",
// invalid_elements : "li",
// theme_advanced_styles : "Header 1=header1;Header 2=header2;Header 3=header3;Table Row=tableRow1", // Theme specific setting CSS classes
});
</script>
<% } %>
<% String useAutoComplete = (useAutoComplete=request.getParameter("useAutoComplete")) != null && !(useAutoComplete.equals("")) ? useAutoComplete : "false";
if (useAutoComplete.equalsIgnoreCase("true")) { %>
<link rel="stylesheet" type="text/css" href="<c:url value="/js/jquery_plugins/jquery-autocomplete/jquery.autocomplete.css"/>" />
<% } %>
<c:forEach var="cssFile" items="${customCss}">
<link rel="stylesheet" type="text/css" href="<c:url value="${cssFile}"/>" media="screen"/>
</c:forEach>
<link rel="stylesheet" type="text/css" href="<c:url value="/js/jquery_plugins/thickbox/thickbox.css"/>" />
<link rel="stylesheet" type="text/css" href="${themeDir}css/screen.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="${themeDir}css/formedit.css" media="screen"/>
<title>Edit</title>
</head>
<body class="formsEdit">
<div id="wrap" class="container">
<jsp:include page="/templates/page/freemarkerTransition/identity.jsp" flush="true"/>
<jsp:include page="/templates/page/freemarkerTransition/menu.jsp" flush="true"/>
<div id="contentwrap">
<div id="content" class="form">
<!-- end of formPrefix.jsp -->
</c:otherwise>
</c:choose>

View file

@ -1,65 +0,0 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%-- This is a temporary file and will be removed once we have completed the transition to freemarker --%>
<%@ page import="java.util.List" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep"%>
<%@ 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.controller.freemarker.FreemarkerHttpServlet" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jstl/functions" prefix="fn" %>
<%
FreemarkerHttpServlet.getFreemarkerComponentsForJsp(request);
%>
<%
VitroRequest vreq = new VitroRequest(request);
Portal portal = vreq.getPortal();
String contextRoot = vreq.getContextPath();
String themeDir = portal != null ? portal.getThemeDir() : Portal.DEFAULT_THEME_DIR_FROM_CONTEXT;
themeDir = contextRoot + '/' + themeDir;
%>
<c:set var="portal" value="${requestScope.portalBean}"/>
<c:set var="themeDir"><%=themeDir%></c:set>
<c:set var="bodyJsp"><c:out value="${requestScope.bodyJsp}" default="/debug.jsp"/></c:set>
<c:set var="title"><c:out value="${requestScope.title}" /></c:set>
<%-- test for Wilma theme to help for smooth transition --%>
<c:choose>
<c:when test="${fn:contains(themeDir,'wilma')}">
<jsp:include page="/themes/wilma/templates/edit/formSuffix.jsp" flush="true"/>
</c:when>
<c:otherwise>
</div> <!-- #content.form -->
</div>
<div class="push"></div>
<jsp:include page="/templates/page/freemarkerTransition/footer.jsp" flush="true"/>
</div><!-- end wrap -->
<script type="text/javascript" src="<c:url value="/js/extensions/String.js"/>"></script></script>
<script type="text/javascript" src="<c:url value="/js/jquery_plugins/jquery.bgiframe.pack.js"/>"></script>
<script type="text/javascript" src="<c:url value="/js/jquery_plugins/thickbox/thickbox-compressed.js"/>"></script>
<!-- <script type="text/javascript" src="<c:url value="/js/jquery_plugins/ui.datepicker.js"/>"></script> -->
<% String useAutoComplete = (useAutoComplete=request.getParameter("useAutoComplete")) != null && !(useAutoComplete.equals("")) ? useAutoComplete : "false";
if (useAutoComplete.equalsIgnoreCase("true")) { %>
<script type="text/javascript" src="<c:url value="/js/jquery_plugins/jquery-autocomplete/jquery.autocomplete.pack.js"/>"></script>
<% } %>
<c:forEach var="jsFile" items="${customJs}">
<script type="text/javascript" src="<c:url value="${jsFile}"/>"></script>
</c:forEach>
</body>
</html>
</c:otherwise>
</c:choose>

View file

@ -393,7 +393,7 @@ SPARQL queries for existing values. --%>
</div>
<%-- DO NOT CHANGE IDS, CLASSES, OR HTML STRUCTURE IN THIS FORM WITHOUT UNDERSTANDING THE IMPACT ON THE JAVASCRIPT! --%>
<form id="addAuthorForm" action="<c:url value="/edit/processRdfForm2.jsp"/>" >
<form id="addAuthorForm" class="customForm" action="<c:url value="/edit/processRdfForm2.jsp"/>" >
<h3>Add an Author</h3>

View file

@ -284,7 +284,7 @@ PREFIX core: <${vivoCore}>
<%@ include file="unsupportedBrowserMessage.jsp" %>
<%-- DO NOT CHANGE IDS, CLASSES, OR HTML STRUCTURE IN THIS FORM WITHOUT UNDERSTANDING THE IMPACT ON THE JAVASCRIPT! --%>
<form id="addGrantRoleToPerson" class="noIE67" action="<c:url value="/edit/processRdfForm2.jsp"/>" >
<form id="addGrantRoleToPerson" class="customForm noIE67" action="<c:url value="/edit/processRdfForm2.jsp"/>" >
<p><v:input type="text" id="relatedIndLabel" name="grantLabel" label="Grant Name ${requiredHint}" cssClass="acSelector" size="50" disabled="${disabledVal}" /></p>

View file

@ -232,7 +232,7 @@ SPARQL queries for existing values. --%>
<%@ include file="unsupportedBrowserMessage.jsp" %>
<%-- DO NOT CHANGE IDS, CLASSES, OR HTML STRUCTURE IN THIS FORM WITHOUT UNDERSTANDING THE IMPACT ON THE JAVASCRIPT! --%>
<form id="addPublicationForm" class="noIE67" action="<c:url value="/edit/processRdfForm2.jsp"/>" >
<form id="addPublicationForm" class="customForm noIE67" action="<c:url value="/edit/processRdfForm2.jsp"/>" >
<p class="inline"><v:input type="select" label="Publication Type ${requiredHint}" name="pubType" id="typeSelector" /></p>

View file

@ -398,7 +398,7 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
<h2>${titleVerb}&nbsp;${roleActivityTypeLabel} entry for <%= subjectName %></h2>
<%-- DO NOT CHANGE IDS, CLASSES, OR HTML STRUCTURE IN THIS FORM WITHOUT UNDERSTANDING THE IMPACT ON THE JAVASCRIPT! --%>
<form id="addRoleForm" action="<c:url value="/edit/processRdfForm2.jsp"/>" >
<form id="addRoleForm" class="customForm" action="<c:url value="/edit/processRdfForm2.jsp"/>" >
<p class="inline"><v:input type="select" label="${roleActivityTitleCase} Type ${requiredHint}" name="roleActivityType" disabled="${disabledVal}" id="typeSelector" /></p>

View file

@ -40,7 +40,7 @@ var customForm = {
// NB These must be assigned after the elements have been loaded onto the page.
initObjects: function(){
this.form = $('#content form');
this.form = $('form.customForm');
this.fullViewOnly = $('.fullViewOnly');
this.button = $('#submit');
this.requiredLegend = $('#requiredLegend');

View file

@ -175,7 +175,7 @@ parameter set up by editRequestDispatch.
<h2>Create a new ${typeName}</h2>
<form action="<c:url value="/edit/processRdfForm2.jsp"/>" >
<form class="customForm" action="<c:url value="/edit/processRdfForm2.jsp"/>" >
<c:if test="${! isPersonType}">
<v:input type="text" label="Name ${requiredHint}" id="label" size="30" />
</c:if>

View file

@ -184,7 +184,7 @@
<jsp:include page="${preForm}"/>
<h2>${title}</h2>
<form action="<c:url value="/edit/processRdfForm2.jsp"/>" >
<form class="customForm" action="<c:url value="/edit/processRdfForm2.jsp"/>" >
<v:input type="text" label="title" id="title" size="30"/>
<v:input type="select" label="person" id="personUri" />
<v:input type="text" label="start year (YYYY)" id="startYear" size="4"/>

View file

@ -399,7 +399,7 @@ This goes to an experimental FM based form:
<h2>${titleVerb}&nbsp;educational training entry for <%= subjectName %></h2>
<form action="<c:url value="/edit/processRdfForm2.jsp"/>" >
<form class="customForm" action="<c:url value="/edit/processRdfForm2.jsp"/>" >
<v:input type="select" label="Degree" id="degree" />

View file

@ -316,7 +316,7 @@
<h2>${titleVerb}&nbsp;position entry for <%= subjectName %></h2>
<form action="<c:url value="/edit/processRdfForm2.jsp"/>" >
<form class="customForm" action="<c:url value="/edit/processRdfForm2.jsp"/>" >
<p class="inline"><v:input type="select" label="Organization Type ${requiredHint}" name="orgType" disabled="${disabledVal}" id="typeSelector" /></p>

View file

@ -1,60 +0,0 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%-- This is a temporary file and will be removed once we have completed the transition to freemarker --%>
<%@ 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" %>
<%@ taglib uri="http://java.sun.com/jstl/functions" prefix="fn" %>
<%@ page errorPage="/error.jsp"%>
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Portal"%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet" %>
<%
FreemarkerHttpServlet.getFreemarkerComponentsForJsp(request);
%>
<%
VitroRequest vreq = new VitroRequest(request);
Portal portal = vreq.getPortal();
String contextRoot = vreq.getContextPath();
String themeDir = portal != null ? portal.getThemeDir() : Portal.DEFAULT_THEME_DIR_FROM_CONTEXT;
themeDir = contextRoot + '/' + themeDir;
%>
<c:set var="portal" value="${requestScope.portalBean}"/>
<c:set var="themeDir"><%=themeDir%></c:set>
<c:set var="bodyJsp"><c:out value="${requestScope.bodyJsp}" default="/debug.jsp"/></c:set>
<c:set var="title"><c:out value="${requestScope.title}" /></c:set>
<%-- test for Wilma theme to help for smooth transition --%>
<c:choose>
<c:when test="${fn:contains(themeDir,'wilma')}">
<jsp:include page="/themes/wilma/templates/page/basicPage.jsp" flush="true"/>
</c:when>
<c:otherwise>
<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="/templates/page/freemarkerTransition/identity.jsp" flush="true"/>
<jsp:include page="/templates/page/freemarkerTransition/menu.jsp" flush="true"/>
</div><!-- #header -->
<hr class="hidden" />
<div id="contentwrap">
<c:import url="${bodyJsp}"/>
</div> <!-- #contentwrap -->
<jsp:include page="/templates/page/freemarkerTransition/footer.jsp" flush="true"/>
</div> <!-- #wrap -->
</body>
</html>
</c:otherwise>
</c:choose>

View file

@ -2,25 +2,29 @@
<#import "lib-list.ftl" as l>
<div id="footer">
</div> <!-- content -->
</div> <!-- contentwrap -->
<#if urls.bannerImage??>
<img class="footerLogo" src="${urls.bannerImage}" alt="${siteTagline!}" />
</#if>
<div id="footer">
<#if urls.bannerImage??>
<img class="footerLogo" src="${urls.bannerImage}" alt="${siteTagline!}" />
</#if>
<div class="footerLinks">
<ul class="otherNav">
<@l.firstLastList>
<#include "subMenuLinks.ftl">
</@l.firstLastList>
</ul>
</div>
<div class="footerLinks">
<ul class="otherNav">
<@l.firstLastList>
<#include "subMenuLinks.ftl">
</@l.firstLastList>
</ul>
</div>
<#include "copyright.ftl">
<#include "copyright.ftl">
All Rights Reserved. <a href="${urls.termsOfUse}">Terms of Use</a>
All Rights Reserved. <a href="${urls.termsOfUse}">Terms of Use</a>
<#include "version.ftl">
</div>
<#include "version.ftl">
</div>
</div> <!-- wrap -->
<#include "scripts.ftl">

View file

@ -0,0 +1,11 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<meta charset="utf-8" />
<title>${title}</title>
<#include "stylesheets.ftl">
<link rel="stylesheet" href="${urls.theme}/css/screen.css" media="screen" />
<link rel="stylesheet" href="${urls.theme}/css/print.css" media="print" />
<#include "headScripts.ftl">

View file

@ -1,5 +0,0 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Template for home page body contents -->
<p>This is the home page of the VIVO vivo-basic theme.</p>

View file

@ -1,36 +0,0 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#import "lib-list.ftl" as l>
<#-- 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="${urls.home}">${siteName}</a></h1>
<#-- RY We will need this in non-NIHVIVO versions
<#if siteTagline?has_content>
<em>${siteTagline}</em>
</#if>
-->
<ul id="otherMenu">
<@l.firstLastList>
<#if user.loggedIn>
<li>
Logged in as <strong>${user.loginName}</strong> (<a href="${urls.logout}">Log out</a>)
</li>
<#if user.hasSiteAdminAccess>
<li><a href="${urls.siteAdmin}">Site Admin</a></li>
</#if>
<#else>
<li><a title="log in to manage this site" href="${urls.login}">Log in</a></li>
</#if>
<#include "subMenuLinks.ftl">
</@l.firstLastList>
</ul>
</div>

View file

@ -1,13 +1,46 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<div id="primaryAndOther">
<ul id="primary">
<#list tabMenu.items as item>
<li>
<a href="${item.url}" <#if item.active> class="activeTab" </#if>>
${item.linkText}
</a>
</li>
</#list>
</ul>
</div>
<#-- Note to UI team: do not change this div without also making the corresponding change in menu.jsp -->
<div id="navAndSearch" class="block">
<div id="primaryAndOther">
<ul id="primary">
<#list tabMenu.items as item>
<li>
<a href="${item.url}" <#if item.active> class="activeTab" </#if>>
${item.linkText}
</a>
</li>
</#list>
</ul>
</div>
<div id="searchBlock">
<form id="searchForm" action="${urls.search}" >
<label for="search">Search </label>
<#if user.showFlag1SearchField>
<select id="search-form-modifier" name="flag1" class="form-item" >
<option value="nofiltering" selected="selected">entire database (${user.loginName})</option>
<option value="${portalId}">${siteTagline!}</option>
</select>
<#else>
<input type="hidden" name="flag1" value="${portalId}" />
</#if>
<input type="text" name="querytext" id="search" class="search-form-item" value="${querytext!}" size="20" />
<input class="search-form-submit" name="submit" type="submit" value="Search" />
</form>
</div>
</div> <!-- navAndSearch -->
</div> <!-- header -->
<hr class="hidden" />
<div id="contentwrap">
<#if flash?has_content>
<section id="flash-message" role="alert">
${flash}
</section>
</#if>
<div id="content">

View file

@ -1,46 +1,20 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#include "doctype.html">
<#import "lib-list.ftl" as l>
${stylesheets.addFromTheme("/css/screen.css")}
<#-- print stylesheet commented out for now until we can add a media parameter to stylesheets.add method -->
<#-- ${stylesheets.addFromTheme("/css/print.css")} -->
<#include "head.ftl">
<body>
<div id="wrap" class="container">
<div id="header">
<!DOCTYPE html>
<html lang="en">
<head>
<#include "head.ftl">
</head>
<body>
<#include "identity.ftl">
<#include "menu.ftl">
${body}
<#include "identity.ftl">
<#-- Note to UI team: do not change this div without also making the corresponding change in menu.jsp -->
<div id="navAndSearch" class="block">
<#include "menu.ftl">
<#include "search.ftl">
</div> <!-- navAndSearch -->
<#include "breadcrumbs.ftl">
</div> <!-- header -->
<hr class="hidden" />
<div id="contentwrap">
<#if flash?has_content>
<section id="flash-message" role="alert">
${flash}
</section>
</#if>
<div id="content">
${body}
</div> <!-- content -->
</div> <!-- contentwrap -->
<#include "footer.ftl">
</div> <!-- wrap -->
<#include "scripts.ftl">
</body>
</body>
</html>

View file

@ -1,19 +0,0 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<div id="searchBlock">
<form id="searchForm" action="${urls.search}" >
<label for="search">Search </label>
<#if user.showFlag1SearchField>
<select id="search-form-modifier" name="flag1" class="form-item" >
<option value="nofiltering" selected="selected">entire database (${user.loginName})</option>
<option value="${portalId}">${siteTagline!}</option>
</select>
<#else>
<input type="hidden" name="flag1" value="${portalId}" />
</#if>
<input type="text" name="querytext" id="search" class="search-form-item" value="${querytext!}" size="20" />
<input class="search-form-submit" name="submit" type="submit" value="Search" />
</form>
</div>

View file

@ -1,113 +0,0 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%-- This is a temporary file and will be removed once we have completed the transition to freemarker --%>
<%@ 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" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Portal"%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet" %>
<%
FreemarkerHttpServlet.getFreemarkerComponentsForJsp(request);
%>
<%
VitroRequest vreq = new VitroRequest(request);
Portal portal = vreq.getPortal();
String contextRoot = vreq.getContextPath();
String themeDir = portal != null ? portal.getThemeDir() : Portal.DEFAULT_THEME_DIR_FROM_CONTEXT;
themeDir = contextRoot + '/' + themeDir;
%>
<c:set var="portal" value="${requestScope.portalBean}"/>
<c:set var="themeDir"><c:out value="${themeDir}" /></c:set>
<c:set var="bodyJsp"><c:out value="${requestScope.bodyJsp}" default="/debug.jsp"/></c:set>
<c:set var="title"><c:out value="${requestScope.title}" /></c:set>
<!DOCTYPE html>
<html lang="en">
<head> <!-- formPrefix.jsp -->
<meta charset="utf-8" />
<title>Edit</title>
<link rel="stylesheet" href="../css/edit.css" />
<link rel="stylesheet" href="<%=themeDir%>css/screen.css" />
<!-- script for enabling new HTML5 semantic markup in IE browsers-->
<script type="text/javascript" src="../js/html5.js"></script>
<script type="text/javascript" src="../js/jquery.js"></script>
<c:if test="${!empty scripts}"><jsp:include page="${scripts}"/></c:if>
<%
String useTinyMCE = (useTinyMCE=request.getParameter("useTinyMCE")) != null && !(useTinyMCE.equals("")) ? useTinyMCE : "false";
if (useTinyMCE.equalsIgnoreCase("true")) {
String height = (height=request.getParameter("height")) != null && !(height.equals("")) ? height : "200";
String width = (width=request.getParameter("width")) != null && !(width.equals("")) ? width : "75%";
String defaultButtons="bold,italic,underline,separator,link,bullist,numlist,separator,sub,sup,charmap,separator,undo,redo,separator,code";
String buttons = (buttons=request.getParameter("buttons")) != null && !(buttons.equals("")) ? buttons : defaultButtons;
String tbLocation = (tbLocation=request.getParameter("toolbarLocation")) != null && !(tbLocation.equals("")) ? tbLocation : "top";
%>
<script language="javascript" type="text/javascript" src="../js/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
theme : "advanced",
mode : "textareas",
theme_advanced_buttons1 : "<%=buttons%>",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "<%=tbLocation%>",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_path : false,
theme_advanced_resizing : true,
height : "<%=height%>",
width : "<%=width%>",
valid_elements : "a[href|name|title],br,p,i,em,cite,strong/b,u,sub,sup,ul,ol,li",
fix_list_elements : true,
fix_nesting : true,
cleanup_on_startup : true,
gecko_spellcheck : true,
forced_root_block: false
//forced_root_block : 'p',
// plugins: "paste",
// theme_advanced_buttons1_add : "pastetext,pasteword,selectall",
// paste_create_paragraphs: false,
// paste_create_linebreaks: false,
// paste_use_dialog : true,
// paste_auto_cleanup_on_paste: true,
// paste_convert_headers_to_strong : true
// save_callback : "customSave",
// content_css : "example_advanced.css",
// extended_valid_elements : "a[href|target|name]",
// plugins : "table",
// theme_advanced_buttons3_add_before : "tablecontrols,separator",
// invalid_elements : "li",
// theme_advanced_styles : "Header 1=header1;Header 2=header2;Header 3=header3;Table Row=tableRow1", // Theme specific setting CSS classes
});
</script>
<% } %>
<% String useAutoComplete = (useAutoComplete=request.getParameter("useAutoComplete")) != null && !(useAutoComplete.equals("")) ? useAutoComplete : "false";
if (useAutoComplete.equalsIgnoreCase("true")) { %>
<link rel="stylesheet" type="text/css" href="<c:url value="/js/jquery_plugins/jquery-autocomplete/jquery.autocomplete.css"/>" />
<% } %>
<c:forEach var="cssFile" items="${customCss}">
<link rel="stylesheet" type="text/css" href="<c:url value="${cssFile}"/>" media="screen"/>
</c:forEach>
<link rel="stylesheet" type="text/css" href="<c:url value="/js/jquery_plugins/thickbox/thickbox.css"/>" />
</head>
<body class="formsEdit">
${ftl_menu}
<div id="content">
<!-- end of formPrefix.jsp -->

View file

@ -1,54 +0,0 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%-- This is a temporary file and will be removed once we have completed the transition to freemarker --%>
<%@ 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" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Portal"%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet" %>
<%
FreemarkerHttpServlet.getFreemarkerComponentsForJsp(request);
%>
<%
VitroRequest vreq = new VitroRequest(request);
Portal portal = vreq.getPortal();
String contextRoot = vreq.getContextPath();
String themeDir = portal != null ? portal.getThemeDir() : Portal.DEFAULT_THEME_DIR_FROM_CONTEXT;
themeDir = contextRoot + '/' + themeDir;
%>
<c:set var="portal" value="${requestScope.portalBean}"/>
<c:set var="themeDir"><c:out value="${themeDir}" /></c:set>
<c:set var="bodyJsp"><c:out value="${requestScope.bodyJsp}" default="/debug.jsp"/></c:set>
<c:set var="title"><c:out value="${requestScope.title}" /></c:set>
</div><!-- #wrapper-content -->
${ftl_footer}
<script type="text/javascript" src="<c:url value="/js/extensions/String.js"/>"></script>
<script type="text/javascript" src="<c:url value="/js/jquery_plugins/jquery.bgiframe.pack.js"/>"></script>
<script type="text/javascript" src="<c:url value="/js/jquery_plugins/thickbox/thickbox-compressed.js"/>"></script>
<!-- <script type="text/javascript" src="<c:url value="/js/jquery_plugins/ui.datepicker.js"/>"></script> -->
<% String useAutoComplete = (useAutoComplete=request.getParameter("useAutoComplete")) != null && !(useAutoComplete.equals("")) ? useAutoComplete : "false";
if (useAutoComplete.equalsIgnoreCase("true")) { %>
<script type="text/javascript" src="<c:url value="/js/jquery_plugins/jquery-autocomplete/jquery.autocomplete.pack.js"/>"></script>
<% } %>
<c:forEach var="jsFile" items="${customJs}">
<script type="text/javascript" src="<c:url value="${jsFile}"/>"></script>
</c:forEach>
</body>
</html>

View file

@ -1,33 +1,39 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- This is a temporary file and will be removed once we have completed the transition to freemarker -->
</div> <!-- #wrapper-content -->
<footer role="contentinfo">
<#if copyright??>
<p class="copyright"><small>&copy;${copyright.year?c}
<#if copyright.url??>
<a href="${copyright.url}">${copyright.text}</a>
<#else>
${copyright.text}
</#if>
</#if>
All Rights Reserved | <a class="terms" href="${urls.termsOfUse}">Terms of Use</a></small> | Powered by <a class="powered-by-vivo" href="http://vivoweb.org" target="_blank"><strong>VIVO</strong></a>
<#if user.hasRevisionInfoAccess>
| Version <a href="${version.moreInfoUrl}">${version.label}</a>
</#if>
</p>
</#if>
<nav role="navigation">
<ul id="footer-nav">
<li><a href="${urls.about}">About</a></li>
<ul id="footer-nav" role="list">
<li role="listitem"><a href="${urls.about}">About</a></li>
<#if urls.contact??>
<li><a href="${urls.contact}">Contact Us</a></li>
</#if>
<li><a href="http://www.vivoweb.org/support" target="blank">Support</a></li>
<li role="listitem"><a href="${urls.contact}">Contact Us</a></li>
</#if>
<li role="listitem"><a href="http://www.vivoweb.org/support" target="blank">Support</a></li>
</ul>
</nav>
</footer>
${scripts.tags}
<!--[if lt IE 7]>
<script type="text/javascript" src="${urls.base}/js/jquery_plugins/supersleight.js"></script>
<script type="text/javascript" src="${urls.base}/js/utils.js"></script>
<![endif]-->
<#include "googleAnalytics.ftl">
<!--[if (gte IE 6)&(lte IE 8)]>
<script type="text/javascript" src="${urls.base}/js/selectivizr.js"></script>
<![endif]-->
<#include "scripts.ftl">

View file

@ -0,0 +1,22 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<meta charset="utf-8" />
<!-- Google Chrome Frame open source plug-in brings Google Chrome's open web technologies and speedy JavaScript engine to Internet Explorer-->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>${title}</title>
<meta name="description" content="" />
<meta name="keywords" content="" />
<#include "stylesheets.ftl">
<link rel="stylesheet" href="${urls.theme}/css/screen.css" />
<#include "headScripts.ftl">
<!--[if lt IE 7]>
<link rel="stylesheet" href="css/ie6.css" />
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" href="css/ie7.css" />
<![endif]-->

View file

@ -0,0 +1,53 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<header id="branding" role="banner">
<h1 class="vivo-logo"><a href="${urls.home}"><span class="displace">${siteName}</span></a></h1>
<!-- Since we are using a graphic text for the tagline, we won't render ${siteTagline}
<#if siteTagline?has_content>
<em>${siteTagline}</em>
</#if>-->
<nav role="navigation">
<ul id="header-nav" role="list">
<#if user.loggedIn>
<li role="listitem"><span class="loginIcon">U</span> ${user.loginName}</li>
<li role="listitem"><a href="${urls.logout}">Log out</a></li>
<#if user.hasSiteAdminAccess>
<li role="listitem"><a href="${urls.siteAdmin}">Site Admin</a></li>
</#if>
<#else>
<li role="listitem"><a title="log in to manage this site" href="${urls.login}">Log in</a></li>
</#if>
<#-- List of links that appear in submenus, like the header and footer. -->
<li role="listitem"><a href="${urls.about}">About</a></li>
<#if urls.contact??>
<li role="listitem"><a href="${urls.contact}">Contact Us</a></li>
</#if>
<li role="listitem"><a href="http://www.vivoweb.org/support" target="blank">Support</a></li>
<li role="listitem"><a href="${urls.index}">Index</a></li>
</ul>
</nav>
<section id="search" role="region">
<fieldset>
<legend>Search form</legend>
<form id="search-form" action="${urls.search}" name="search" role="search">
<#if user.showFlag1SearchField>
<select id="search-form-modifier" name="flag1" class="form-item" >
<option value="nofiltering" selected="selected">entire database (${user.loginName})</option>
<option value="${portalId}">${siteTagline!}</option>
</select>
<#else>
<input type="hidden" name="flag1" value="${portalId}" />
</#if>
<div id="search-field">
<input type="text" name="querytext" class="search-vivo" value="${querytext!}" />
<input type="submit" value="Search" class="submit">
</div>
</form>
</fieldset>
</section>
</header>

View file

@ -1,66 +1,16 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- This is a temporary file and will be removed once we have completed the transition to freemarker -->
<header id="branding" role="banner">
<h1 class="vivo-logo"><a href="${urls.home}"><span class="displace">${siteName}</span></a></h1>
<!-- Since we are using a graphic text for the tagline, we won't render ${siteTagline}
<#if siteTagline?has_content>
<em>${siteTagline}</em>
</#if>-->
<#import "lib-list.ftl" as l>
<nav role="navigation">
<ul id="header-nav">
<#if user.loggedIn>
<li><span class="loginIcon">U</span> ${user.loginName}</li>
<li><a href="${urls.logout}">Log out</a></li>
<#if user.hasSiteAdminAccess>
<li><a href="${urls.siteAdmin}">Site Admin</a></li>
</#if>
<#else>
<li><a title="log in to manage this site" href="${urls.login}">Log in</a></li>
</#if>
<#-- List of links that appear in submenus, like the header and footer. -->
<li><a href="${urls.about}">About</a></li>
<#if urls.contact??>
<li><a href="${urls.contact}">Contact Us</a></li>
</#if>
<li><a href="http://www.vivoweb.org/support" target="blank">Support</a></li>
<li role="listitem"><a href="${urls.index}">Index</a></li>
</ul>
</nav>
<section id="search" role="region">
<fieldset>
<legend>Search form</legend>
<form id="search-form" action="${urls.search}" name="search" role="search">
<#if user.showFlag1SearchField>
<select id="search-form-modifier" name="flag1" class="form-item" >
<option value="nofiltering" selected="selected">entire database (${user.loginName})</option>
<option value="${portalId}">${siteTagline!}</option>
</select>
<#else>
<input type="hidden" name="flag1" value="${portalId}" />
</#if>
<div id="search-field">
<input type="text" name="querytext" class="search-vivo" value="${querytext!}" />
<input type="submit" value="Search" class="submit">
</div>
</form>
</fieldset>
</section>
</header>
<nav role="navigation">
<ul id="main-nav">
<#list tabMenu.items as item>
<li><a href="${item.url}" <#if item.active> class="selected" </#if>>${item.linkText}</a></li>
<ul id="main-nav" role="list">
<#list menu.items as item>
<li role="listitem"><a href="${item.url}" <#if item.active> class="selected" </#if>>${item.linkText}</a></li>
</#list>
</ul>
</nav>
<div id="wrapper-content">
<div id="wrapper-content" role="main">
<#if flash?has_content>
<section id="flash-message" role="alert">
${flash}
</section>
</#if>

View file

@ -5,94 +5,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<!-- Google Chrome Frame open source plug-in brings Google Chrome's open web technologies and speedy JavaScript engine to Internet Explorer-->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>${title}</title>
<meta name="description" content="" />
<meta name="keywords" content="" />
<#include "stylesheets.ftl">
<link rel="stylesheet" href="${urls.theme}/css/screen.css" />
<#include "headScripts.ftl">
<!--[if lt IE 7]>
<link rel="stylesheet" href="css/ie6.css" />
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" href="css/ie7.css" />
<![endif]-->
<#include "head.ftl">
</head>
<body>
<header id="branding" role="banner">
<h1 class="vivo-logo"><a href="${urls.home}"><span class="displace">${siteName}</span></a></h1>
<!-- Since we are using a graphic text for the tagline, we won't render ${siteTagline}
<#if siteTagline?has_content>
<em>${siteTagline}</em>
</#if>-->
<nav role="navigation">
<ul id="header-nav" role="list">
<#if user.loggedIn>
<li role="listitem"><span class="loginIcon">U</span> ${user.loginName}</li>
<li role="listitem"><a href="${urls.logout}">Log out</a></li>
<#if user.hasSiteAdminAccess>
<li role="listitem"><a href="${urls.siteAdmin}">Site Admin</a></li>
</#if>
<#else>
<li role="listitem"><a title="log in to manage this site" href="${urls.login}">Log in</a></li>
</#if>
<#-- List of links that appear in submenus, like the header and footer. -->
<li role="listitem"><a href="${urls.about}">About</a></li>
<#if urls.contact??>
<li role="listitem"><a href="${urls.contact}">Contact Us</a></li>
</#if>
<li role="listitem"><a href="http://www.vivoweb.org/support" target="blank">Support</a></li>
<li role="listitem"><a href="${urls.index}">Index</a></li>
</ul>
</nav>
<section id="search" role="region">
<fieldset>
<legend>Search form</legend>
<form id="search-form" action="${urls.search}" name="search" role="search">
<#if user.showFlag1SearchField>
<select id="search-form-modifier" name="flag1" class="form-item" >
<option value="nofiltering" selected="selected">entire database (${user.loginName})</option>
<option value="${portalId}">${siteTagline!}</option>
</select>
<#else>
<input type="hidden" name="flag1" value="${portalId}" />
</#if>
<div id="search-field">
<input type="text" name="querytext" class="search-vivo" value="${querytext!}" />
<input type="submit" value="Search" class="submit">
</div>
</form>
</fieldset>
</section>
</header>
<#include "identity.ftl">
<nav role="navigation">
<ul id="main-nav" role="list">
<#list tabMenu.items as item>
<li role="listitem"><a href="${item.url}" <#if item.active> class="selected" </#if>>${item.linkText}</a></li>
</#list>
</ul>
</nav>
<div id="wrapper-content" role="main">
<#if flash?has_content>
<section id="flash-message" role="alert">
${flash}
</section>
</#if>
<#include "menu.ftl">
<section id="intro" role="region">
<h2>What is VIVO?</h2>
@ -224,43 +143,7 @@
<p class="view-all"><a class="view-all-style" href="#">View All <span class="pictos-arrow-10">4</span></a></p>
</section> <!-- #latest-publications -->
</section> <!-- $highlights -->
</div> <!-- #wrapper-content -->
<footer role="contentinfo">
<#if copyright??>
<p class="copyright"><small>&copy;${copyright.year?c}
<#if copyright.url??>
<a href="${copyright.url}">${copyright.text}</a>
<#else>
${copyright.text}
</#if>
All Rights Reserved | <a class="terms" href="${urls.termsOfUse}">Terms of Use</a></small> | Powered by <a class="powered-by-vivo" href="http://vivoweb.org" target="_blank"><strong>VIVO</strong></a>
<#if user.hasRevisionInfoAccess>
| Version <a href="${version.moreInfoUrl}">${version.label}</a>
</#if>
</p>
</#if>
<nav role="navigation">
<ul id="footer-nav" role="list">
<li role="listitem"><a href="${urls.about}">About</a></li>
<#if urls.contact??>
<li role="listitem"><a href="${urls.contact}">Contact Us</a></li>
</#if>
<li role="listitem"><a href="http://www.vivoweb.org/support" target="blank">Support</a></li>
</ul>
</nav>
</footer>
${scripts.tags}
<!--[if lt IE 7]>
<script type="text/javascript" src="${urls.base}/js/jquery_plugins/supersleight.js"></script>
<script type="text/javascript" src="${urls.base}/js/utils.js"></script>
<![endif]-->
<!--[if (gte IE 6)&(lte IE 8)]>
<script type="text/javascript" src="${urls.base}/js/selectivizr.js"></script>
<![endif]-->
<#include "googleAnalytics.ftl">
<#include "footer.ftl">
</body>
</html>

View file

@ -1,140 +1,20 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#import "lib-list.ftl" as l>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<!-- Google Chrome Frame open source plug-in brings Google Chrome's open web technologies and speedy JavaScript engine to Internet Explorer-->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>${title}</title>
<meta name="description" content="" />
<meta name="keywords" content="" />
<#include "stylesheets.ftl">
<link rel="stylesheet" href="${urls.theme}/css/screen.css" />
<#include "headScripts.ftl">
<!--[if lt IE 7]>
<link rel="stylesheet" href="css/ie6.css" />
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" href="css/ie7.css" />
<![endif]-->
<#include "head.ftl">
</head>
<body>
<header id="branding" role="banner">
<h1 class="vivo-logo"><a href="${urls.home}"><span class="displace">${siteName}</span></a></h1>
<!-- Since we are using a graphic text for the tagline, we won't render ${siteTagline}
<#if siteTagline?has_content>
<em>${siteTagline}</em>
</#if>-->
<nav role="navigation">
<ul id="header-nav" role="list">
<#if user.loggedIn>
<li role="listitem"><span class="loginIcon">U</span> ${user.loginName}</li>
<li role="listitem"><a href="${urls.logout}">Log out</a></li>
<#if user.hasSiteAdminAccess>
<li role="listitem"><a href="${urls.siteAdmin}">Site Admin</a></li>
</#if>
<#else>
<li role="listitem"><a title="log in to manage this site" href="${urls.login}">Log in</a></li>
</#if>
<#-- List of links that appear in submenus, like the header and footer. -->
<li role="listitem"><a href="${urls.about}">About</a></li>
<#if urls.contact??>
<li role="listitem"><a href="${urls.contact}">Contact Us</a></li>
</#if>
<li role="listitem"><a href="http://www.vivoweb.org/support" target="blank">Support</a></li>
<li role="listitem"><a href="${urls.index}">Index</a></li>
</ul>
</nav>
<section id="search" role="region">
<fieldset>
<legend>Search form</legend>
<form id="search-form" action="${urls.search}" name="search" role="search">
<#if user.showFlag1SearchField>
<select id="search-form-modifier" name="flag1" class="form-item" >
<option value="nofiltering" selected="selected">entire database (${user.loginName})</option>
<option value="${portalId}">${siteTagline!}</option>
</select>
<#else>
<input type="hidden" name="flag1" value="${portalId}" />
</#if>
<div id="search-field">
<input type="text" name="querytext" class="search-vivo" value="${querytext!}" />
<input type="submit" value="Search" class="submit">
</div>
</form>
</fieldset>
</section>
</header>
<#include "identity.ftl">
<nav role="navigation">
<ul id="main-nav" role="list">
<#list tabMenu.items as item>
<li role="listitem"><a href="${item.url}" <#if item.active> class="selected" </#if>>${item.linkText}</a></li>
</#list>
</ul>
</nav>
<#include "menu.ftl">
<div id="wrapper-content" role="main">
<#if flash?has_content>
<section id="flash-message" role="alert">
${flash}
</section>
</#if>
${body}
</div> <!-- #wrapper-content -->
${body}
<footer role="contentinfo">
<#if copyright??>
<p class="copyright"><small>&copy;${copyright.year?c}
<#if copyright.url??>
<a href="${copyright.url}">${copyright.text}</a>
<#else>
</#if>
All Rights Reserved | <a class="terms" href="${urls.termsOfUse}">Terms of Use</a></small> | Powered by <a class="powered-by-vivo" href="http://vivoweb.org" target="_blank"><strong>VIVO</strong></a>
<#if user.hasRevisionInfoAccess>
| Version <a href="${version.moreInfoUrl}">${version.label}</a>
</#if>
</p>
</#if>
<nav role="navigation">
<ul id="footer-nav" role="list">
<li role="listitem"><a href="${urls.about}">About</a></li>
<#if urls.contact??>
<li role="listitem"><a href="${urls.contact}">Contact Us</a></li>
</#if>
<li role="listitem"><a href="http://www.vivoweb.org/support" target="blank">Support</a></li>
</ul>
</nav>
</footer>
${scripts.tags}
<!--[if lt IE 7]>
<script type="text/javascript" src="${urls.base}/js/jquery_plugins/supersleight.js"></script>
<script type="text/javascript" src="${urls.base}/js/utils.js"></script>
<![endif]-->
<!--[if (gte IE 6)&(lte IE 8)]>
<script type="text/javascript" src="${urls.base}/js/selectivizr.js"></script>
<![endif]-->
<#include "googleAnalytics.ftl">
<#include "footer.ftl">
</body>
</html>

View file

@ -1,114 +0,0 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%-- This is a temporary file and will be removed once we have completed the transition to freemarker --%>
<%@ 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" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Portal"%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet" %>
<% /***********************************************
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);
}
*/
%>
<%
FreemarkerHttpServlet.getFreemarkerComponentsForJsp(request);
%>
<%
VitroRequest vreq = new VitroRequest(request);
Portal portal = vreq.getPortal();
String contextRoot = vreq.getContextPath();
String themeDir = portal != null ? portal.getThemeDir() : Portal.DEFAULT_THEME_DIR_FROM_CONTEXT;
themeDir = contextRoot + '/' + themeDir;
%>
<c:set var="portal" value="${requestScope.portalBean}"/>
<c:set var="themeDir"><c:out value="${themeDir}" /></c:set>
<c:set var="bodyJsp"><c:out value="${requestScope.bodyJsp}" default="/debug.jsp"/></c:set>
<c:set var="title"><c:out value="${requestScope.title}" /></c:set>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>${title}</title>
<link rel="stylesheet" href="<%=themeDir%>css/screen.css" />
${ftl_stylesheets}
${ftl_headScripts}
<c:if test="${!empty scripts}"><jsp:include page="${scripts}"/></c:if>
<!--[if lt IE 7]>
<script type="text/javascript" src="<%=themeDir%>js/jquery_plugins/supersleight.js"></script>
<script type="text/javascript" src="<%=themeDir%>js/utils.js"></script>
<link rel="stylesheet" href="css/ie6.css" />
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" href="css/ie7.css" />
<![endif]-->
<!--[if (gte IE 6)&(lte IE 8)]>
<script type="text/javascript" src="<%=themeDir%>js/selectivizr.js"></script>
<![endif]-->
</head>
<body ${requestScope.bodyAttr}>
${ftl_menu}
<c:import url="${bodyJsp}"/>
${ftl_footer}
</body>
</html>