2012-06-20 18:28:45 +02:00
|
|
|
<%@page pageEncoding="UTF-8" %>
|
2012-06-30 07:26:21 +02:00
|
|
|
|
|
|
|
<%@ page import="com.wisemapping.model.User" %>
|
|
|
|
<%@ page import="com.wisemapping.security.Utils" %>
|
2009-06-07 20:59:43 +02:00
|
|
|
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
|
|
|
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
|
|
|
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
|
|
|
|
2012-06-30 07:26:21 +02:00
|
|
|
<%
|
|
|
|
User user = Utils.getUser(false);
|
|
|
|
if (user != null) {
|
|
|
|
request.setAttribute("principal", user);
|
|
|
|
}
|
|
|
|
%>
|
|
|
|
|
2014-03-10 05:22:30 +01:00
|
|
|
<style>
|
|
|
|
.btn-header {
|
2014-03-13 04:41:45 +01:00
|
|
|
background-color: #F7C931;
|
2014-03-10 05:22:30 +01:00
|
|
|
border-color: #575757;
|
2014-03-13 04:41:45 +01:00
|
|
|
color: #000000;
|
2014-03-10 05:22:30 +01:00
|
|
|
}
|
|
|
|
.btn-header:hover {
|
2014-03-13 04:41:45 +01:00
|
|
|
background-color: #eee;
|
2014-03-10 05:22:30 +01:00
|
|
|
}
|
|
|
|
.WelcomeHeader {
|
|
|
|
position: relative;
|
|
|
|
float: left;
|
|
|
|
padding: 5px 10px;
|
|
|
|
font-size: 14px;
|
|
|
|
line-height: 1.5;
|
|
|
|
border: 1px solid transparent;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
2012-06-20 18:28:45 +02:00
|
|
|
<div id="settings-dialog-modal" class="modal fade">
|
2014-02-09 06:19:59 +01:00
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button class="close" data-dismiss="modal">x</button>
|
|
|
|
<h3><spring:message code="ACCOUNT"/></h3>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
2012-06-20 18:28:45 +02:00
|
|
|
|
2014-02-09 06:19:59 +01:00
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button class="btn btn-cancel"><spring:message code="CLOSE"/></button>
|
|
|
|
</div>
|
2012-06-20 18:28:45 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2009-06-07 20:59:43 +02:00
|
|
|
<div id="header">
|
|
|
|
<div id="headerToolbar">
|
|
|
|
<c:choose>
|
|
|
|
<c:when test="${principal != null}">
|
2014-03-10 05:22:30 +01:00
|
|
|
|
|
|
|
<div class='WelcomeHeader' >
|
2012-05-19 07:18:22 +02:00
|
|
|
<spring:message code="WELCOME"/>, ${principal.firstname}
|
2014-03-10 05:22:30 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="btn-group" id="headerActions">
|
|
|
|
|
|
|
|
<button type="button" onclick="location.href='c/maps/'" class="btn btn-sm btn-header"><spring:message code="MY_WISEMAPS"/></button>
|
|
|
|
|
|
|
|
<button type="button" onclick="accountInfo()" title="<spring:message code="ACCOUNT_DETAIL"/>" class="btn btn-sm btn-header">
|
|
|
|
<spring:message code="ACCOUNT"/>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button onclick="location.href='c/logout'" title="<spring:message code="LOGOUT"/>" type="button" class="btn btn-sm btn-header">
|
|
|
|
<spring:message code="LOGOUT"/>
|
|
|
|
</button>
|
|
|
|
|
2009-06-07 20:59:43 +02:00
|
|
|
</div>
|
|
|
|
</c:when>
|
2012-09-13 04:29:57 +02:00
|
|
|
<c:when test="${!param.removeSignin && !requestScope.removeSignin}">
|
2012-05-19 07:18:22 +02:00
|
|
|
<div id="headerActions">
|
2009-06-07 20:59:43 +02:00
|
|
|
<spring:message code="ALREADY_A_MEMBER"/>
|
2012-07-02 03:42:18 +02:00
|
|
|
<span><a href="c/login" title="<spring:message code="SIGN_IN"/>">
|
2009-06-07 20:59:43 +02:00
|
|
|
<spring:message code="SIGN_IN"/>
|
2012-05-19 07:18:22 +02:00
|
|
|
</a></span>
|
2012-06-20 18:28:45 +02:00
|
|
|
</div>
|
2009-06-07 20:59:43 +02:00
|
|
|
</c:when>
|
|
|
|
</c:choose>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<c:if test="${param.onlyActionHeader!=true}">
|
|
|
|
<div id="headerContent">
|
2012-09-01 19:30:32 +02:00
|
|
|
<a href="${requestScope['site.homepage']}" title="Homepage">
|
2009-06-07 20:59:43 +02:00
|
|
|
<div id="headerLogo"> </div>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<div id="headerSlogan">
|
|
|
|
<spring:message code="SITE.SLOGAN"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</c:if>
|
2012-04-06 22:05:42 +02:00
|
|
|
|
2012-06-20 18:28:45 +02:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
2014-03-10 05:22:30 +01:00
|
|
|
|
|
|
|
function accountInfo(event) {
|
|
|
|
$('#settings-dialog-modal .modal-body').load("c/account/settings",
|
|
|
|
function () {
|
|
|
|
$('#settings-dialog-modal .btn-cancel').unbind('click').click(function () {
|
|
|
|
$('#settings-dialog-modal').modal("hide");
|
|
|
|
window.location.reload();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
);
|
|
|
|
$('#settings-dialog-modal').modal();
|
|
|
|
event.preventDefault();
|
2012-09-27 00:42:24 +02:00
|
|
|
}
|
2012-06-20 18:28:45 +02:00
|
|
|
|
|
|
|
</script>
|
|
|
|
|