diff src/main/webapp/componentes/template.jsp @ 0:3e62083dbcbf

First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
author "jurzua <jurzua@mpiwg-berlin.mpg.de>"
date Thu, 23 Apr 2015 15:46:01 +0200
parents
children 8702aa85d0fb
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/webapp/componentes/template.jsp	Thu Apr 23 15:46:01 2015 +0200
@@ -0,0 +1,68 @@
+<%@ 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(); %>
+<% } %>
+	
+	<div id="header">
+		<div id="logo">
+			<h1><a href="#"><label class="titelPage">Local Gazetter Server</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() %>/faces/login/AddAccountPage.xhtml"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 Dataverse</a></td>
+				</tr>
+			</table>
+			<% } %>
+		</form>
+		
+		</div>
+	</div>
+	
+	<div class="menu">
+	    <a href="<%=sessionBean.getApplicationBean().getRootServer()%>/pages/home.jsp">Home</a>
+	    <a href="<%=sessionBean.getApplicationBean().getRootServer()%>/pages/createFile.jsp" class="current">Create File</a>
+	    <a href="<%=sessionBean.getApplicationBean().getRootServer()%>/pages/search.jsp">Search</a>
+	</div>	
\ No newline at end of file