header.jsp 2.26 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<%@include file="/WEB-INF/jsp/init.jsp"%>

<div id="header">
	<div class="clearfix">
		<div class="pull-left">
			<a href="<c:url value="/" />"><img style="height: 40px;" src="<c:url value="/html/images/logo2.png" />" /></a>
		</div>

		<div class="pull-right searcher" style="margin-top: 5px;">
			<form class="form-inline" method="get" action="<c:url value="/search" />">
				<div class="input-group">
					<input type="text" name="q" class="form-control" placeholder="<spring:message code="search.input.placeholder" />" /> <span class="input-group-btn">
						<button type="submit" class="btn notimportant">
							<spring:message code="search.button.label" />
						</button>
					</span>
				</div>
			</form>
		</div>

		<div class="notimportant navbar pull-right">
			<div class="nav-collapse">
				<ul class="nav">
					<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown"> <spring:message code="sample.message.locale.${pageContext.response.locale}" /> <b class="caret"></b>
					</a>
						<ul class="dropdown-menu">
							<li><a href="?lang=en"><spring:message code="sample.message.locale.en" /></a></li>
							<li><a href="?lang=sl"><spring:message code="sample.message.locale.sl" /></a></li>
						</ul></li>
				</ul>
			</div>
		</div>

		<div class="notimportant navbar pull-right">
			<sec:authorize access="isAnonymous()">
				<ul class="nav">
					<li><a href="<c:url value="/login" />">Login</a>
					<%-- or <a href="<c:url value="/registration" />"><spring:message code="user.create-new-account" /></a> --%></li>
				</ul>
			</sec:authorize>
			<sec:authorize access="isAuthenticated()">
				<ul class="nav">
					<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" title="<spring:message code="sample.message.change.locale"/>"> You are <b>${user.username}</b> <b class="caret"></b>
					</a>
						<ul class="dropdown-menu">
							<sec:authorize access="hasRole('ADMINISTRATOR')">
								<li><a href="<c:url value="/admin/" />">Administation</a></li>
							</sec:authorize>
							<li><a href="<c:url value="/profile" />"><spring:message code="user.pulldown.profile" /></a></li>
							<li><a href="<c:url value="/logout" />"><spring:message code="user.pulldown.logout" /></a></li>
						</ul></li>
				</ul>
			</sec:authorize>
		</div>

	</div>
</div>