view src/main/webapp/componentes/template.jsp @ 102:6a508b605b5f

1. add new page : footer.jsp. 2. embed footer.jsp into other pages.
author Calvin Yeh <cyeh@mpipw-berlin.mpg.com>
date Fri, 29 Sep 2017 16:03:06 +0200
parents 3706405e9673
children
line wrap: on
line source

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<jsp:useBean id="sessionBean" class="de.mpiwg.web.jsp.SessionBean" scope="session" />

<% if(sessionBean.getMsgList() != null && !sessionBean.getMsgList().isEmpty()) { %>
  	<script>
  		$(function() {
    		$( "#msgDialog" ).dialog();
  		});
  	</script>

	<div id="msgDialog" title="Message">
		<table>
			<% for(String msg : sessionBean.getMsgList()) { %>
				<tr><td><label><%=msg %></label></td></tr>
			<% } %>
		</table>
	</div>
	<% sessionBean.resetMsgList(); %>
<% } %>

	<script>
		$(document).ready(function() {
			$("#loading").hide();
		});

  </script>


	<div id="loading">Loading...</div>

	<div id="header">
		<div id="logo">
			<h1><a href="#"><label class="titelPage">LoGaRT - Local Gazetteers Research Tools</label></a></h1>
		</div>
	</div>
	<div id="login">
		<div id="loginContent">

			<form name="loginForm"
				action="<%=sessionBean.getApplicationBean().getRootServer()%>/proxy.jsp"
				method="post"
				class="contentForm">
				<input name="bean" type="hidden" value="loginBean" />

			<% if(sessionBean.getUser() == null) { %>
			<table>
				<tr>
					<td><a href="<%=sessionBean.getApplicationBean().getDvnRootServer() %>/dataverseuser.xhtml?editMode=CREATE" target="_blank" style="font-size: 12px;">Create Account</a></td>
					<td><label>Login</label></td>
					<td><input type="text" name="userName"/></td>
					<td><input type="password" name="password" /></td>
					<td>
						<button value="Submit" onclick="setAction('login', 'loginForm');">Submit</button>
					</td>

				</tr>
			</table>
			<% } else { %>
			<table>
				<tr>
					<td>Logged in as: <%=sessionBean.getUser().getUserName() %></td>
					<td>|</td>
					<td><input type="submit" value="logout" class="link" onclick="setAction('logout', 'loginForm');"/></td>
					<td><a href="<%=sessionBean.getApplicationBean().getDvnRootServer() %>" target="_blank">Go To LGDataverse</a></td>
				</tr>
			</table>
			<% } %>
		</form>

		</div>
	</div>

	<div class="menu">
	    <a href="<%=sessionBean.getApplicationBean().getRootServer()%>/pages/topicList.jsp">Topics</a>
	    <a href="<%=sessionBean.getApplicationBean().getRootServer()%>/pages/home.jsp">Tasks</a>
	    <!--
	    <a href="<%=sessionBean.getApplicationBean().getRootServer()%>/pages/createFile.jsp" class="current">Create File</a>
	    -->
	    <a href="<%=sessionBean.getApplicationBean().getRootServer()%>/pages/search.jsp">Sections</a>
	    <a href="<%=sessionBean.getApplicationBean().getRootServer()%>/pages/fullTextSearch.jsp">Full Text Search</a>
	    <a href="<%=sessionBean.getApplicationBean().getRootServer()%>/pages/books.jsp">Books</a>
        <a href="<%=sessionBean.getApplicationBean().getRootServer()%>/pages/about.jsp">About</a>

	</div>