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

86 lines
2.9 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-header">
<button class="close" data-dismiss="modal">x</button>
<h3><spring:message code="ACCOUNT"/></h3>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
2012-06-30 07:26:21 +02:00
<button class="btn btn-cancel"><spring:message code="CLOSE"/></button>
2012-06-20 18:28:45 +02:00
</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}
2012-07-02 03:42:18 +02:00
| <span><a href="c/maps/"><spring:message
2012-06-20 18:28:45 +02:00
code="MY_WISEMAPS"/></a></span>
| <span><a id="userSettingsBtn" href="#"
title="<spring:message code="ACCOUNT_DETAIL"/>"><spring:message
code="ACCOUNT"/></a></span>
2012-07-02 03:42:18 +02:00
| <span><a href="c/logout"
2012-06-20 18:28:45 +02:00
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!=true}">
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-07-02 03:42:18 +02:00
<a href="c/home" 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">
$('#userSettingsBtn').click(
2012-06-30 07:26:21 +02:00
function (event) {
2012-07-02 03:42:18 +02:00
$('#settings-dialog-modal .modal-body').load("c/account/settings",
2012-06-30 07:26:21 +02:00
function () {
$('#settings-dialog-modal .btn-cancel').unbind('click').click(function () {
$('#settings-dialog-modal').modal("hide");
window.location.reload();
});
}
);
2012-06-20 18:28:45 +02:00
$('#settings-dialog-modal').modal();
event.preventDefault();
});
</script>