Project

General

Profile

« Previous | Next » 

Revision 3647

set the clientViewHelper object in the session so that login/logout link can be determined in the header iFrame.

View differences:

lib/style/skins/saeon/SaeonLogin.jspx
63 63
		<jsp:scriptlet>
64 64
			clientViewHelper = ClientViewHelper.clientViewHelperInstance(request);
65 65
			clientViewHelper.clientRequest(request, response);
66
			request.getSession().setAttribute("clientViewHelper", clientViewHelper);
66 67
        </jsp:scriptlet>
67 68

  
68 69
	<table>
lib/style/skins/saeon/header.jsp
26 26
<!--____________________________max_width____________________________________-->
27 27

  
28 28
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
29
<%@page import="edu.ucsb.nceas.metacat.clientview.ClientViewHelper"%>
29 30
<html>
30 31
<head>
31 32
<title>SAEON - South African Environmental Observation Network
......
80 81
</ul>
81 82
</div>
82 83

  
84
<%
85
Object obj = request.getSession().getAttribute("clientViewHelper");
86
ClientViewHelper cvh = null;
87
String loginHTML = "";
88
if (obj != null) {
89
	cvh = (ClientViewHelper) obj;
90
}
91
if (cvh != null && cvh.isLoggedIn()) {
92
	loginHTML = "<a target='_top' href='./index.jsp?action=Logout&qformat=saeon'> Logout </a>";
93
}
94
else {
95
	loginHTML = "<a target='_top' href='./index.jsp'> Login </a>";
96
}
97
%>
98

  
83 99
<h5 class="hiddenStructure">Personal tools</h5>
84 100
<ul id="portal-personaltools">
85
	<!-- <li><a href="./login.jsp"> Log in </a></li> -->
101
	<li><%=loginHTML %></li>
86 102
	<li><a href="@cgi-prefix@/ldapweb.cgi"> Join </a></li>
87 103
</ul>
88 104

  

Also available in: Unified diff