wisemapping-open-source/wise-webapp/src/main/webapp/jsp/header.jsp

92 lines
3.2 KiB
Plaintext
Raw Normal View History

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);
}
%>
2012-06-20 18:28:45 +02:00
<div id="settings-dialog-modal" class="modal fade">
<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
</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}">
<div id="headerActions">
2012-05-19 07:18:22 +02:00
<spring:message code="WELCOME"/>, ${principal.firstname}
| <span><a href="c/maps/"><spring:message
code="MY_WISEMAPS"/></a></span>
| <span><a id="userSettingsBtn" href="#"
title="<spring:message code="ACCOUNT_DETAIL"/>"><spring:message
code="ACCOUNT"/></a></span>
| <span><a href="c/logout"
title="<spring:message code="LOGOUT"/>"><spring:message code="LOGOUT"/></a></span>
2009-06-07 20:59:43 +02:00
</div>
</c:when>
<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">
<a href="${requestScope['site.homepage']}" title="Homepage">
2009-06-07 20:59:43 +02:00
<div id="headerLogo">&nbsp;</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">
var userSettingsLink = $('#userSettingsBtn');
if (userSettingsLink) {
userSettingsLink.click(
function (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-06-20 18:28:45 +02:00
</script>