header.jsp 5.45 KB
Newer Older
1
2
<%@include file="/WEB-INF/jsp/init.jsp"%>

Matija Obreza's avatar
Matija Obreza committed
3
4
5
6
7
8
9
<header id="header">
  <div class="container">
    <div class="clearfix">
      <div class="pull-left">
        <a href="<c:url value="/" />"><img src="<c:url value="/html/images/logo_genesys.png" />" alt="Genesys - Gateway to Genetic Resources" title="Genesys - Gateway to Genetic Resources" /></a>
      </div>
      
10
      <form class="navbar-form navbar-left" role="search" id="search" method="get" action="<c:url value="/acn/search" />">
Matija Obreza's avatar
Matija Obreza committed
11
12
13
14
15
16
17
        <div class="form-group">
          <input type="text" class="form-control" name="q" placeholder="<spring:message code="search.input.placeholder" />">
        </div>
        <button type="submit" class="btn"><img src="<c:url value="/html/images/icon_search.png" />" alt="" /></button>
      </form>
                
      <ul class="nav navbar-nav navbar-right">
18
      	<security:authorize access="isAnonymous()">
Matija Obreza's avatar
Matija Obreza committed
19
        <li class="dropdown">
20
          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><spring:message code="page.login" /></a>
Matija Obreza's avatar
Matija Obreza committed
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
          <ul class="dropdown-menu pull-left">
            <li>
              <form role="form" method="post" action="/login-attempt">
                <div class="form-group">
                  <label for="username"><spring:message code="login.username"/>:</label>
                  <input type="email" class="form-control" id="username" name="j_username" placeholder="<spring:message code="login.username"/>" />
                </div>
                <div class="form-group">
                  <label for="password"><spring:message code="login.password"/></label>
                  <input type="password" class="form-control" id="password" name="j_password" placeholder="<spring:message code="login.password"/>" />
                </div>
                <div class="checkbox">
                  <label>
                  	<input type="checkbox" name="_spring_security_remember_me"  id="_spring_security_remember_me"/>
	                <spring:message code="login.remember-me"/>
                  </label>
                </div>
                <button type="submit" class="btn btn-green"><spring:message code="login.login-button" /></button>
39
                <span class="or"></span>
Matija Obreza's avatar
Matija Obreza committed
40
41
42
43
44
                <a href="<c:url value="/registration" />" class="btn btn-default"><spring:message code="login.register-now"/></a>
              </form>
            </li>
          </ul>
        </li>
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
        </security:authorize>
        <security:authorize access="isAuthenticated()">
          <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><spring:message code="user.pulldown.heading" arguments="${user.user.name}" /></a>
			 <ul class="dropdown-menu pull-left">
				<security:authorize access="hasRole('ADMINISTRATOR')">
					<li><a href="<c:url value="/admin/" />"><spring:message code="user.pulldown.administration" /></a></li>
					<li><a href="<c:url value="/profile/list" />"><spring:message code="user.pulldown.users" /></a></li>
					<li><a href="<c:url value="/team" />"><spring:message code="user.pulldown.teams" /></a></li>
				</security:authorize>
				<li><a href="<c:url value="/profile/${user.username}" />"><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>
		</security:authorize>
		
Matija Obreza's avatar
Matija Obreza committed
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
        <li class="dropdown" id="lang">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><c:out value="${pageContext.response.locale.displayLanguage}" /> <b class="caret"></b></a>
          <ul class="dropdown-menu" role="menu">
			<li><a href="?lang=en">English</a></li>
			<li><a href="?lang=ar">Arabic</a></li>
			<li><a href="?lang=de">German</a></li>
			<li><a href="?lang=es">Spanish</a></li>
			<li><a href="?lang=fa">Persian</a></li>
			<li><a href="?lang=fr">French</a></li>
			<li><a href="?lang=pt">Portugese</a></li>
			<li><a href="?lang=ru">Russian</a></li>
			<li><a href="?lang=zh">Chinese</a></li>
			<%-- Only show fully translated languages --%>
			<security:authorize access="isAuthenticated()">
			<li><a href="?lang=sl">Slovene</a></li>
			</security:authorize>
			<li><a target="_blank" href="https://www.transifex.com/projects/p/genesys/">Translate Genesys</a></li>
          </ul>
        </li>
      </ul>
    </div>
    
  </div>
</header>
85

Matija Obreza's avatar
Matija Obreza committed
86
<!--
87
88

		<div class="notimportant navbar pull-right">
Matija Obreza's avatar
Matija Obreza committed
89
			<security:authorize access="isAnonymous()">
90
				<ul class="nav">
Matija Obreza's avatar
Matija Obreza committed
91
					<li><a href="<c:url value="/login" />"><spring:message code="page.login" /></a>
92
				</ul>
Matija Obreza's avatar
Matija Obreza committed
93
94
			</security:authorize>
			<security:authorize access="isAuthenticated()">
95
				<ul class="nav">
96
					<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" title="<spring:message code="locale.language.change"/>"><spring:message code="user.pulldown.heading" arguments="${user.user.name}" /> <b class="caret"></b>
97
98
					</a>
						<ul class="dropdown-menu">
Matija Obreza's avatar
Matija Obreza committed
99
							<security:authorize access="hasRole('ADMINISTRATOR')">
Matija Obreza's avatar
Matija Obreza committed
100
								<li><a href="<c:url value="/admin/" />"><spring:message code="user.pulldown.administration" /></a></li>
101
								<li><a href="<c:url value="/profile/list" />"><spring:message code="user.pulldown.users" /></a></li>
Matija Obreza's avatar
Matija Obreza committed
102
							</security:authorize>
Matija Obreza's avatar
Matija Obreza committed
103
							<li><a href="<c:url value="/profile/${user.username}" />"><spring:message code="user.pulldown.profile" /></a></li>
104
105
106
							<li><a href="<c:url value="/logout" />"><spring:message code="user.pulldown.logout" /></a></li>
						</ul></li>
				</ul>
Matija Obreza's avatar
Matija Obreza committed
107
			</security:authorize>
108
		</div>
Matija Obreza's avatar
Matija Obreza committed
109
-->