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

Matija Obreza's avatar
Matija Obreza committed
3
<header id="header">
4
5
6
    <div class="container">
        <div class="clearfix">
            <div class="pull-left">
Matija Obreza's avatar
Matija Obreza committed
7
        <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>
8
9
            </div>

10
      <form class="navbar-form navbar-left" role="search" id="search" method="get" action="<c:url value="/acn/search" />">
11
                <div class="form-group">
Matija Obreza's avatar
Matija Obreza committed
12
          <input type="text" class="form-control" name="q" placeholder="<spring:message code="search.input.placeholder" />">
13
                </div>
Matija Obreza's avatar
Matija Obreza committed
14
        <button type="submit" class="btn"><img src="<c:url value="/html/images/icon_search.png" />" alt="" /></button>
15
16
17
18
19
            </form>

            <ul class="nav navbar-nav navbar-right">
                <security:authorize access="isAnonymous()">
                    <li class="dropdown">
Matija Obreza's avatar
Matija Obreza committed
20
						<a href="#" class="dropdown-toggle" data-toggle="dropdown"><spring:message code="page.login" /></a>
21
22
23
24
25
                        <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>
Matija Obreza's avatar
Matija Obreza committed
26
                  						<input type="email" class="form-control" id="username" name="j_username" placeholder="<spring:message code="login.username"/>" />
27
28
29
                                    </div>
                                    <div class="form-group">
                                        <label for="password"><spring:message code="login.password"/></label>
Matija Obreza's avatar
Matija Obreza committed
30
                 						<input type="password" class="form-control" id="password" name="j_password" placeholder="<spring:message code="login.password"/>" />
31
32
33
                                    </div>
                                    <div class="checkbox">
                                        <label>
Matija Obreza's avatar
Matija Obreza committed
34
                  							<input type="checkbox" name="_spring_security_remember_me"  id="_spring_security_remember_me"/>
35
36
37
38
39
                                            <spring:message code="login.remember-me"/>
                                        </label>
                                    </div>
                                    <button type="submit" class="btn btn-green"><spring:message
                                            code="login.login-button"/></button>
Matija Obreza's avatar
Matija Obreza committed
40
41
42
                                    <span class="or">-</span>
	                            	<a href="<c:url value="/google/login" />" class="btn btn-default google-signin"><spring:message code="login.with-google-plus"/></a>
					                <a href="<c:url value="/registration" />" class="btn btn-default"><spring:message code="login.register-now"/></a>
43
44
45
46
47
48
49
                                </form>
                            </li>
                        </ul>
                    </li>
                </security:authorize>
                <security:authorize access="isAuthenticated()">
                    <li class="dropdown">
Matija Obreza's avatar
Matija Obreza committed
50
         				<a href="#" class="dropdown-toggle" data-toggle="dropdown"><spring:message code="user.pulldown.heading" arguments="${user.user.name}" /></a>
51
52
                        <ul class="dropdown-menu pull-left">
                            <security:authorize access="hasRole('ADMINISTRATOR')">
Matija Obreza's avatar
Matija Obreza committed
53
54
55
							<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>
56
                            </security:authorize>
Matija Obreza's avatar
Matija Obreza committed
57
58
                            <li><a href="<c:url value="/profile/${user.username}" />"><spring:message code="user.pulldown.profile"/></a></li>
                            <li><a id="logout" href="<c:url value="/logout" />"><spring:message code="user.pulldown.logout"/></a>
59
60
61
62
63
64
                            </li>
                        </ul>
                    </li>
                </security:authorize>

                <li class="dropdown" id="lang">
Matija Obreza's avatar
Matija Obreza committed
65
         		  <a href="#" class="dropdown-toggle" data-toggle="dropdown"><c:out value="${pageContext.response.locale.displayLanguage}" /> <b class="caret"></b></a>
66
67
68
69
70
71
72
73
74
75
76
77
78
79
                    <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>
Matija Obreza's avatar
Matija Obreza committed
80
						<li><a target="_blank" href="https://www.transifex.com/projects/p/genesys/">Translate Genesys</a></li>
81
82
83
84
                    </ul>
                </li>
            </ul>
        </div>
Matija Obreza's avatar
Matija Obreza committed
85
86
    </div>
</header>
87

Matija Obreza's avatar
Matija Obreza committed
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<!-- Mobile Header -->
<div class="mobile-header">
    <div class="header-top">
      <div class="container">
        <a href="#" class="mobile-menu-show"><img src="<c:url value="/html/images/icon_mobile_menu.png" />" alt="" /></a>
        <a href="#" class="mobile-menu-hide"><img src="<c:url value="/html/images/icon_mobile_menu_back.png" />" alt="" /></a>
        
        <ul class="nav navbar-nav navbar-right">
              <security:authorize access="isAnonymous()">
                    <li class="dropdown">
						<a href="#" class="dropdown-toggle" data-toggle="dropdown"><spring:message code="page.login" /></a>
                        <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>
                                    <span class="or">-</span>
	                            	<a href="<c:url value="/google/login" />" class="btn btn-default google-signin"><spring:message code="login.with-google-plus"/></a>
					                <a href="<c:url value="/registration" />" class="btn btn-default"><spring:message code="login.register-now"/></a>
                                </form>
                            </li>
                        </ul>
                    </li>
                </security:authorize>
                <security:authorize access="isAuthenticated()">
                    <li class="dropdown">
         				<a href="<c:url value="/profile" />" 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 id="logout" href="<c:url value="/logout" />"><spring:message code="user.pulldown.logout"/></a></li>
                        </ul>
                    </li>
                </security:authorize>
          </li>
          <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> 
    
    <div class="logo-container">
      <div class="container">
        <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>
    </div>
    
    <form role="search" id="search" action="<c:url value="/acn/search" />">
      <div class="container">
        <div class="form-group">
          <input type="text" class="form-control" placeholder="Search Genesys ..." />
        </div>
        <button type="submit" class="btn"><img src="<c:url value="/html/images/icon_search.png" />" alt="" /></button>
      </div>
    </form>
178

Matija Obreza's avatar
Matija Obreza committed
179
</div> <!-- Mobile Header end -->