index.jsp 10.7 KB
Newer Older
Matija Obreza's avatar
Matija Obreza committed
1
2
<!DOCTYPE html>

Matija Obreza's avatar
Matija Obreza committed
3
<%@ include file="/WEB-INF/jsp/init.jsp" %>
4
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
Maxym Borodenko's avatar
Maxym Borodenko committed
5
<spring:eval expression="T(java.text.DateFormatSymbols).getInstance(pageContext.response.locale).getMonths()" var="monthNames" />
Matija Obreza's avatar
Matija Obreza committed
6
7
8

<html>
<head>
Matija Obreza's avatar
Matija Obreza committed
9
<title><spring:message code="page.home.title" /></title>
Matija Obreza's avatar
Matija Obreza committed
10
</head>
Matija Obreza's avatar
Matija Obreza committed
11
<body class="welcome-page">
12
	<div class="row no-space intro">
Matija Obreza's avatar
Matija Obreza committed
13
		<div class="hidden-sm hidden-xs col-md-6 col-lg-6">
14
15
16
			<div class="intro-image">
			</div>
		</div>
Matija Obreza's avatar
Matija Obreza committed
17
		<div class="col-sm-12 col-md-6 col-lg-6 no-space">
18
19
20
			<div class="intro-text">
				<c:if test="${welcomeBlurp ne null}">
					<div class="">
21
						<cms:blurb blurb="${welcomeBlurp}"/>
22
						<a class="btn btn-default" href="<c:url value="/content/about/about" />"><spring:message code="welcome.read-more" /></a>
Matija Obreza's avatar
Matija Obreza committed
23
24
					</div>
				</c:if>
25
			</div>
26
		</div>
Matija Obreza's avatar
Matija Obreza committed
27
	</div>
Matija Obreza's avatar
Posts    
Matija Obreza committed
28

Matija Obreza's avatar
Matija Obreza committed
29
	<div class="row no-space map">
Taisiya Glushko's avatar
Taisiya Glushko committed
30
31
		<div id="stats" class="col-md-4 col-sm-12 col-xs-12">
			<h2 class="short text-right pull-left">
Maxym Borodenko's avatar
Maxym Borodenko committed
32
				<spring:message code="welcome.quick-overview" />
Matija Obreza's avatar
Matija Obreza committed
33
			</h2>
34

Matija Obreza's avatar
Matija Obreza committed
35
			<div class="stats-map">
Matija Obreza's avatar
Matija Obreza committed
36
37
38
				<div class="all-stats">
					<%-- 	        <div class="one-stat"><a href="<c:url value="/geo/" />"><spring:message code="stats.number-of-countries" arguments="${numberOfCountries}" /></a></div> --%>
					<div class="one-stat">
Matija Obreza's avatar
Matija Obreza committed
39
						<a href="<c:url value="/explore" />">
40
							<spring:message code="stats.number-of-accessions" arguments="${numberOfActiveAccessions}" />
Matija Obreza's avatar
Matija Obreza committed
41
42
						</a>
					</div>
Maxym Borodenko's avatar
Maxym Borodenko committed
43
44
45
					<div class="one-stat">
						<a href="<c:url value="${genesysCatalogUrl}/datasets" />">
							<spring:message code="stats.number-of-datasets" arguments="${numberOfPublishedDatasets}" />
46
						</a>
Maxym Borodenko's avatar
Maxym Borodenko committed
47
					</div>
Matija Obreza's avatar
Matija Obreza committed
48
					<div class="one-stat">
Matija Obreza's avatar
Matija Obreza committed
49
50
						<a href="<c:url value="/wiews/active" />">
							<spring:message code="stats.number-of-institutes" arguments="${numberOfInstitutes}" />
Matija Obreza's avatar
Matija Obreza committed
51
52
53
						</a>
					</div>
				</div>
Matija Obreza's avatar
Matija Obreza committed
54
				<p><spring:message code="maps.accession-map.intro" /></p>
Matija Obreza's avatar
Matija Obreza committed
55
56
57
			</div>
		</div>

58
		<div class="col-xs-12 col-md-8 map-wrapper-mobile">
59
		<%-- 	<h2>
Matija Obreza's avatar
Matija Obreza committed
60
				<spring:message code="maps.accession-map" />
61
			</h2> --%>
Matija Obreza's avatar
Matija Obreza committed
62
			<div class="">
63
				<div id="globalmap" x-href="<c:url value="/explore/map" />" class="gis-map"></div>
Matija Obreza's avatar
Matija Obreza committed
64
65
66
			</div>
		</div>
	</div>
67

Matija Obreza's avatar
Matija Obreza committed
68
	<div class="row see-also-row">
Taisiya Glushko's avatar
Taisiya Glushko committed
69
		<div class="col-md-4 col-sm-12 col-xs-12 no-space">
Matija Obreza's avatar
Matija Obreza committed
70
			<div class="see-also-block">
71
				<div class="content">
Taisiya Glushko's avatar
Taisiya Glushko committed
72
					<h2 class="short text-right pull-left">
Matija Obreza's avatar
Matija Obreza committed
73
						<spring:message code="welcome.search-genesys" />
74
					</h2>
Matija Obreza's avatar
Matija Obreza committed
75
					<div class="body">
Matija Obreza's avatar
Matija Obreza committed
76
77
						<div class="row">
							<div class="col-lg-4 hidden-md">
78
								<div class="see-also-img" style="background-image: url('<c:url value="${cdnServers.next}/html/1/images/three-1.jpg" />');"></div>
Matija Obreza's avatar
Matija Obreza committed
79
							</div>
Taisiya Glushko's avatar
Taisiya Glushko committed
80
							<div class="col-xs-12 col-sm-12 col-md-12 col-lg-8 no-space">
Matija Obreza's avatar
Matija Obreza committed
81
82
83
84

								<p>
									<spring:message code="search.search-query-missing" />
								</p>
Taisiya Glushko's avatar
Taisiya Glushko committed
85
								<form action="<c:url value="/acn/search2" />" class="form-inline home-search">
Matija Obreza's avatar
Matija Obreza committed
86
									<div class="form-group">
87
88
										<input name="q"  class="form-control" placeholder="<spring:message code="search.input.placeholder" />" />
										<button class="search-btn"></button>
Matija Obreza's avatar
Matija Obreza committed
89
									</div>
Matija Obreza's avatar
Matija Obreza committed
90
								</form>
91
							</div>
Matija Obreza's avatar
Matija Obreza committed
92
						</div>
93
94
					</div>
				</div>
Matija Obreza's avatar
Matija Obreza committed
95
96
			</div>
		</div>
Matija Obreza's avatar
Matija Obreza committed
97
98

		<!-- Block Organizations -->
Taisiya Glushko's avatar
Taisiya Glushko committed
99
		<div class="col-md-4 col-sm-12 col-xs-12 no-space">
Matija Obreza's avatar
Matija Obreza committed
100
			<div class="see-also-block">
101
				<div class="content">
Taisiya Glushko's avatar
Taisiya Glushko committed
102
					<h2 class="short text-right pull-left">
103
						<c:out value="${organizationsBlurb.title}" />
104
					</h2>
105
					<div class="body free-text">
106
						<c:out value="${organizationsBlurb.body}" escapeXml="false" />
107
108
					</div>
				</div>
Matija Obreza's avatar
Matija Obreza committed
109

Matija Obreza's avatar
Matija Obreza committed
110
111
			</div>
		</div>
112

Matija Obreza's avatar
Matija Obreza committed
113
			<!-- Block Help -->
Taisiya Glushko's avatar
Taisiya Glushko committed
114
		<div class="col-md-4 col-sm-12 col-xs-12 no-space">
115
			<div class="see-also-block">
Matija Obreza's avatar
Matija Obreza committed
116

117
				<div class="content">
Taisiya Glushko's avatar
Taisiya Glushko committed
118
					<h2 class="short text-right pull-left">
119
120
						<spring:message code="menu.help" />
					</h2>
Matija Obreza's avatar
Matija Obreza committed
121
122
123
					<div class="body">
						<div class="row">
							<div class="col-lg-4 hidden-md">
124
								<div class="see-also-img" style="background: url('<c:url value="${cdnServers.next}/html/1/images/three-3.jpg" />') 82% no-repeat;"></div>
Matija Obreza's avatar
Matija Obreza committed
125
126
							</div>
							<div class="col-md-12 col-lg-8  no-space">
127
								<a href="<c:url value='/content/help/how-to-use-genesys' />">
Matija Obreza's avatar
Matija Obreza committed
128
129
130
131
									<spring:message code="help.page.intro" />
								</a>
							</div>
						</div>
Matija Obreza's avatar
Matija Obreza committed
132

Matija Obreza's avatar
Matija Obreza committed
133
					</div>
Matija Obreza's avatar
Matija Obreza committed
134
135
136
				</div>
			</div>
		</div>
Matija Obreza's avatar
Matija Obreza committed
137
	</div>
138

Matija Obreza's avatar
Matija Obreza committed
139
140
		<div class="center-divider">
			<div class="row white-background">
Matija Obreza's avatar
Matija Obreza committed
141
142

		<!-- left column end / middle columns start -->
Taisiya Glushko's avatar
Taisiya Glushko committed
143
144
			<div class="col-lg-8 col-md-8 col-xs-12 no-space" id="middle-col">
				<h2 class="short text-right pull-left">
Matija Obreza's avatar
Matija Obreza committed
145
					<spring:message code="activity.recent-activity" />
Matija Obreza's avatar
Matija Obreza committed
146
			</h2>
Matija Obreza's avatar
Matija Obreza committed
147
148
149
150
151
152
153
154
155
156

			<div class="tab-content">
				<div class="tab-pane active" id="news-feed">
					<security:authorize access="hasRole('ADMINISTRATOR')">
						<a href="<c:url value="/content/activitypost/new" />" class="pull-right close" style="">
							<spring:message code="activitypost.add-new-post" />
						</a>
					</security:authorize>

					<div class="all-posts">
Maxym Borodenko's avatar
Maxym Borodenko committed
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
						<div class="post type-article">
							<div class="post-head clearfix" x-href="<c:url value="/acn/updates" />">
								<div class="user-icon hidden-sm hidden-xs"></div>
								<div class="post-head-content" dir="ltr">
									<p><spring:message code='accession.page.updates.title' /></p>
								</div>
							</div>

							<div class="post-inner clearfix post-left-pad">
								<div class="post-content" dir="ltr" style="margin-bottom: 22px;">
									<p><spring:message code='accession.page.updates.intro' /></p>
									<c:forEach items="${accessionsUpdates}" var="update" begin="0" end="4">
										<div class="row">
											<div class="col-lg-3 col-md-3 col-sm-3 col-xs-4">
												<b>
													<c:if test="${update[0] ne null}">
														${update[2]} ${monthNames[update[1]-1]} ${update[0]}
													</c:if>
													<c:if test="${update[0] eq null}">
														----
													</c:if>
												</b>
											</div>
											<div class="col-lg-6 col-md-6 col-sm-6 col-xs-4"><a href="<c:url value='/wiews/${update[3].code}' />">${update[3].fullName}</a></div>
											<div class="col-lg-3 col-md-3 col-sm-3 col-xs-4 text-right"><b><fmt:formatNumber value="${update[4]}" /></b></div>
										</div>
									</c:forEach>
								</div>
							</div>
						</div>

188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
						<c:if test="${lastDatasetsUpdates.size() gt 0}">
							<div class="post type-article">
								<div class="post-head clearfix" x-href="<c:url value='${genesysCatalogUrl}/datasets' />">
									<div class="user-icon hidden-sm hidden-xs"></div>
									<div class="post-head-content" dir="ltr">
										<p><spring:message code='news.datasets.last-published' /></p>
									</div>
								</div>

								<div class="post-inner clearfix post-left-pad">
									<div class="post-content" dir="ltr" style="margin-bottom: 22px;">
										<p><spring:message code='news.datasets.last-published.intro' /></p>
										<c:forEach items="${lastDatasetsUpdates}" var="update" begin="0" end="4">
											<div class="row">
												<div class="col-lg-3 col-md-3 col-sm-3 col-xs-4">
													<b>
														<c:if test="${update[0] ne null}">
															${update[2]} ${monthNames[update[1]-1]} ${update[0]}
														</c:if>
														<c:if test="${update[0] eq null}">
															----
														</c:if>
													</b>
												</div>
												<div class="col-lg-6 col-md-6 col-sm-6 col-xs-4"><a href="<c:url value='${genesysCatalogUrl}/datasets/${update[4]}' />">${update[3]}</a></div>
												<div class="col-lg-3 col-md-3 col-sm-3 col-xs-4 text-right"><b>${update[5]}</b></div>
											</div>
										</c:forEach>
									</div>
								</div>
							</div>
						</c:if>

Matija Obreza's avatar
Matija Obreza committed
221
222
223
224
						<c:forEach items="${lastNews}" var="activityPost" varStatus="status">
							<cms:activitypost activityPost="${activityPost}" />
						</c:forEach>
					</div>
Matija Obreza's avatar
Matija Obreza committed
225
226

					<a id="show-moar-news" href="<c:url value="/content/news" />"><spring:message code="news.content.page.all.title" /></a>
Matija Obreza's avatar
Matija Obreza committed
227
228
229
				</div>
			</div>
		</div>
Matija Obreza's avatar
Matija Obreza committed
230
231

		<!-- middle column end / right columns start -->
Taisiya Glushko's avatar
Taisiya Glushko committed
232
		<div class="col-lg-4 col-md-4 col-xs-12 no-space" id="right-col">
Matija Obreza's avatar
Matija Obreza committed
233
234
			<c:if test="${sideBlurp ne null}">
				<div class="content-block">
Taisiya Glushko's avatar
Taisiya Glushko committed
235
					<h2 class="short text-right pull-left"><c:out value="${sideBlurp.title}" /></h2>
Matija Obreza's avatar
Matija Obreza committed
236
					<cms:blurb blurb="${sideBlurp}"/>
Matija Obreza's avatar
Matija Obreza committed
237
238
				</div>
			</c:if>
239
240


Matija Obreza's avatar
Matija Obreza committed
241
			<div class="content-block" id="crop-list">
Taisiya Glushko's avatar
Taisiya Glushko committed
242
				<h2 class="short text-right pull-left">
Matija Obreza's avatar
Matija Obreza committed
243
244
245
246
247
248
249
250
251
					<spring:message code="crop.croplist" />
				</h2>
				<sec:authorize access="hasRole('ADMINISTRATOR')">
					<form method="post" action="<c:url value="/c/rebuild" />">
						<input type="submit" class="btn form-control" value="Rebuild" />
						<!-- CSRF protection -->
						<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
					</form>
				</sec:authorize>
Matija Obreza's avatar
Matija Obreza committed
252
				<%-- <div class="dropdown padding10">
Matija Obreza's avatar
Matija Obreza committed
253
254
					<input class="form-control autocomplete-genus" placeholder="<spring:message code="autocomplete.genus" />" x-source="<c:url value="/explore/ac/taxonomy.genus" />" />
				</div>
Matija Obreza's avatar
Matija Obreza committed
255
			</div> --%>
Matija Obreza's avatar
Matija Obreza committed
256
257

			<c:if test="${cropList ne null and cropList.size() gt 0}">
Matija Obreza's avatar
Matija Obreza committed
258
				<c:set var="cropCount" value="${cropList.size()}" />
Matija Obreza's avatar
Matija Obreza committed
259
					<ul class="nav">
Matija Obreza's avatar
Matija Obreza committed
260
						<div class="row">
Taisiya Glushko's avatar
Taisiya Glushko committed
261
							<div class="col-md-12 col-sm-12 col-xs-12">
Matija Obreza's avatar
Matija Obreza committed
262
								<li class="all-crops">
263
									<a class="show" href="<c:url value="/c/" />">
Matija Obreza's avatar
Matija Obreza committed
264
265
266
										<spring:message code="crop.all-crops" />
									</a>
								</li>
267
268
269
270
271
272
273
274
275
276
277
								<c:forEach items="${cropList}" var="crop" varStatus="status">
									<li>
										<a class="show" href="<c:url value="/c/${crop.shortName}" />">
											<c:out value="${crop.getName(pageContext.response.locale)}" />
										</a>
									</li>
									<c:if test="${status.count % Math.round(cropCount / 3) == 0}">
											</div>
											<div class="col-md-12 col-sm-12 col-xs-12">
									</c:if>
								</c:forEach>
Matija Obreza's avatar
Matija Obreza committed
278
279
							</div>
						</div>
Matija Obreza's avatar
Matija Obreza committed
280
281
					</ul>
				</div>
Matija Obreza's avatar
Matija Obreza committed
282
				</div>
Matija Obreza's avatar
Matija Obreza committed
283
			</c:if>
Matija Obreza's avatar
Matija Obreza committed
284
		</div>
285
	</div>
286
287


Matija Obreza's avatar
Matija Obreza committed
288
	<content tag="javascript">
Matija Obreza's avatar
Matija Obreza committed
289
<!-- Index Javascripts -->
290
<script type="text/javascript">
Maxym Borodenko's avatar
Maxym Borodenko committed
291
292
293

	//The document and all resources are loaded
    window.onload = function() {
294
        $(".genesys-page #content .intro"). css("background-image", "url( '<c:url value="${cdnServers.next}/html/1/images/welcome-bg.png" />' )");
Maxym Borodenko's avatar
Maxym Borodenko committed
295
296
    };

297
  $( document ).ready(function() {
298
299
300
      $('#home-li').find("a").addClass('active active-group');
      $('#home-li').addClass('active');
      $(".autocomplete-genus").each(function() {
301
302
			var t=$(this);
			t.autocomplete({ delay: 200, minLength: 3, source: t.attr('x-source'),
Matija Obreza's avatar
Matija Obreza committed
303
304
305
				messages: { noResults: '', results: function() {} },
				select: function(event, ui) { document.location.pathname='/acn/t/'+ui.item.value; } });
		});
306
307
308
  });
</script>
</content>
309

Matija Obreza's avatar
Matija Obreza committed
310
</body>
311
</html>