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

3
<%@ include file="/WEB-INF/jsp/init.jsp" %>
Matija Obreza's avatar
Matija Obreza committed
4 5 6

<html>
<head>
Matija Obreza's avatar
Matija Obreza committed
7
<title><c:out value="${faoInstitute.fullName}" /><c:if test="${faoInstitute.acronym != ''}"> | <c:out value="${faoInstitute.acronym}" /></c:if> |
Matija Obreza's avatar
Matija Obreza committed
8
	<c:out value="${faoInstitute.code}" /></title>
9

Matija Obreza's avatar
Matija Obreza committed
10
<local:content-headers description="${jspHelper.htmlToText(blurp.summary, 150)}" title="${faoInstitute.fullName}" keywords="${faoInstitute.acronym}, ${faoInstitute.fullName}, ${faoInstitute.code}" />
11

Matija Obreza's avatar
Matija Obreza committed
12 13
<meta name="description"
	content="<spring:message code="faoInstitute.meta-description" arguments="${faoInstitute.fullName}|${faoInstitute.acronym}" argumentSeparator="|" />
14
  	<c:out value="${jspHelper.htmlToText(blurp.summary)}" />" />
Matija Obreza's avatar
Matija Obreza committed
15
</head>
Matija Obreza's avatar
Matija Obreza committed
16
<body typeof="schema:Organization" class="wiews-institute">
Taisiya Glushko's avatar
Taisiya Glushko committed
17
	<h1 class="green-bg">
Matija Obreza's avatar
Matija Obreza committed
18
		<c:if test="${faoInstitute.acronym != ''}"><c:out value="${faoInstitute.acronym}" /></c:if>
Taisiya Glushko's avatar
Taisiya Glushko committed
19
		<small><c:out value="${faoInstitute.code}" /></small>
Matija Obreza's avatar
Matija Obreza committed
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
	</h1>

<%-- <div class="col-sm-4">
	<spring:message code="faoInstitute.code" />:
	<c:out value="${faoInstitute.code}" />
</div>
<div class="col-sm-4">
	<spring:message code="faoInstitute.acronym" />:
	<c:out value="${faoInstitute.acronym}" />
</div> --%>
	<%-- <div class="col-sm-4">
	<spring:message code="faoInstitute.email" />:
	<c:out value="${faoInstitute.email}" />
</div> --%>
	<%-- 		<p>
		<c:out value="${faoInstitute.type}" />
	</p>
--%>

Taisiya Glushko's avatar
Taisiya Glushko committed
39 40 41 42
<div class="row map-wrapper dark-background">
	<div class="genebank-info-wrapper clearfix">
			<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 genebank-info striped">
				<h1 property="schema:Organization#name"><c:out value="${faoInstitute.fullName}" /></h1>
43
				<div class="row">
Taisiya Glushko's avatar
Taisiya Glushko committed
44 45
					<div class="col-lg-3 col-md-3 col-sm-6 col-xs-4"><p><spring:message code="faoInstitute.country" /></p></div>
					<div class="col-lg-9 col-md-9 col-sm-6 col-xs-8 text-ellipsis" property="schema:Organization#location">
46
						<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
Taisiya Glushko's avatar
Taisiya Glushko committed
47 48
							<a href="<c:url value="/geo" />" itemprop="url"><span itemprop="title"><spring:message code="menu.countries" /></span></a>
							<span class="glyphicon glyphicon-menu-right"></span>
49 50
							<span itemprop="child" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
								<a href="<c:url value="/geo/${faoInstitute.country.code3}" />" itemprop="url">
Matija Obreza's avatar
Matija Obreza committed
51
									<span itemprop="title"><c:out value="${faoInstitute.country.getName(pageContext.response.locale)}" /></span>
52
								</a>
Matija Obreza's avatar
Matija Obreza committed
53
							</span>
54 55
						</span>
					</div>
Matija Obreza's avatar
Matija Obreza committed
56 57
				</div>

Taisiya Glushko's avatar
Taisiya Glushko committed
58 59 60
				<div class="row">
					<div class="col-lg-3 col-md-3 col-sm-6 col-xs-4"><p><spring:message code="faoInstitute.url" /></p></div>
					<div class="col-lg-9 col-md-9 col-sm-6 col-xs-8 text-ellipsis">
61
						<c:forEach items="${faoInstitute.safeUrls}" var="url">
Taisiya Glushko's avatar
Taisiya Glushko committed
62
							<div class="text-ellipsis"><a target="_blank" rel="nofollow" href="<c:out value="${url}" />">
Taisiya Glushko's avatar
Taisiya Glushko committed
63
								<span dir="ltr"><c:out value="${url}" /></span>
64
							</a></div>
Matija Obreza's avatar
Matija Obreza committed
65
						</c:forEach>
66 67 68 69
						<c:choose>
							<c:when test="${'en es fr ru ar zh'.indexOf(pageContext.response.locale.language) ge 0}"><c:set var="wiewsLang" value="${pageContext.response.locale.language}" /></c:when>
							<c:otherwise><c:set var="wiewsLang" value="en" /></c:otherwise>
						</c:choose>
Taisiya Glushko's avatar
Taisiya Glushko committed
70
						<div class="text-ellipsis"><a target="_blank" rel="nofollow"
Taisiya Glushko's avatar
Taisiya Glushko committed
71
							href="<c:url value="http://www.fao.org/wiews/instab/${wiewsLang}/"><c:param name="instcode" value="${faoInstitute.code}" /></c:url>">
72
							<spring:message code="faoInstitute.wiewsLink" arguments="${faoInstitute.code}" />
73
						</a></div>
74
					</div>
Matija Obreza's avatar
Matija Obreza committed
75 76
				</div>

77 78
				<c:if test="${organizations.size() gt 0}">
					<div class="row">
Taisiya Glushko's avatar
Taisiya Glushko committed
79 80
						<div class="col-lg-3 col-md-3 col-sm-6 col-xs-4"><p><spring:message code="faoInstitute.member-of-organizations-and-networks" /></p></div>
						<div class="col-lg-9 col-md-9 col-sm-6 col-xs-8">
81 82
							<c:forEach items="${organizations}" var="organization">
								<a href="<c:url value="/org/${organization.slug}" />">
Taisiya Glushko's avatar
Taisiya Glushko committed
83
									<span dir="ltr"><c:out value="${organization.title}" /></span>
84 85 86
								</a>
							</c:forEach>
						</div>
Matija Obreza's avatar
Matija Obreza committed
87
					</div>
88 89
				</c:if>

Taisiya Glushko's avatar
Taisiya Glushko committed
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 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
				<div class="row accessionCount">
					<div class="col-lg-3 col-md-3 col-sm-6 col-xs-4"><p><spring:message code="faoInstitutes.stat.accessionCount" /></p></div>
					<div class="col-lg-9 col-md-9 col-sm-6 col-xs-8">
						<p><span class="stats-number"><fmt:formatNumber value="${countByInstitute}" /></span></p>
						<div class="buttons-container pull-right">
							<c:if test="${countByInstitute gt 0}">
							<a class="btn btn-primary" title="<spring:message code="faoInstitute.data-title" arguments="${faoInstitute.fullName}" />" href="<c:url value="/wiews/${faoInstitute.code}/data" />">
								<span class="glyphicon glyphicon-list"></span>
								<spring:message code="view.accessions" />
							</a>
							<a class="btn btn-default" title="<spring:message code="faoInstitute.overview-title" arguments="${faoInstitute.fullName}" />" href="<c:url value="/wiews/${faoInstitute.code}/overview" />">
								<span class="glyphicon glyphicon-search"></span>
								<spring:message code="data-overview.short" />
							</a>
							<c:if test="${datasetCount gt 0}">
								<a class="btn btn-default" title="<spring:message code="faoInstitute.datasets-title" arguments="${faoInstitute.fullName}" />" href="<c:url value="/wiews/${faoInstitute.code}/datasets" />">
									<spring:message code="view.datasets" />
								</a>
							</c:if>
							<div class="btn-group">
								<form class="form-horizontal" style="display:inline;" method="post" action="<c:url value="/download/wiews/${faoInstitute.code}/download" />">
									<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
									<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
										<span class="glyphicon glyphicon-save"></span>
										<span>
											<spring:message code="download" />
										</span>
										<span class="caret"></span>
									</button>

									<ul class="dropdown-menu">
										<security:authorize access="isAuthenticated()">
											<li>
												<button name="mcpd" class="btn btn-inline" type="submit">
													<spring:message code="filter.download-mcpd" />
												</button>
												<button name="pdci" class="btn btn-inline" type="submit">
													<spring:message code="filter.download-pdci" />
												</button>
											</li>
										</security:authorize>
										<li>
											<button name="dwca" class="btn btn-inline" type="submit">
												<spring:message code="metadata.download-dwca" />
											</button>
										</li>
									</ul>
								</form>
							</div>
						</c:if>
					</div>
				</div>
				</div>

				<div class="row">
					<div class="col-lg-3 col-md-3 col-sm-6 col-xs-4"><p><spring:message code="faoInstitutes.stat.datasetCount" /></p></div>
					<div class="col-lg-9 col-md-9 col-sm-6 col-xs-8"><p><span class="stats-number"><fmt:formatNumber value="${datasetCount}" /></span></p>
					</div>
				</div>

				<div class="row buttons-wrapper">
					<c:if test="${countByInstitute gt 0}">
						<a class="btn btn-primary" title="<spring:message code="faoInstitute.data-title" arguments="${faoInstitute.fullName}" />" href="<c:url value="/wiews/${faoInstitute.code}/data" />">
							<span class="glyphicon glyphicon-list"></span>
							<spring:message code="view.accessions" />
						</a>
						<a class="btn btn-default" title="<spring:message code="faoInstitute.overview-title" arguments="${faoInstitute.fullName}" />" href="<c:url value="/wiews/${faoInstitute.code}/overview" />">
							<span class="glyphicon glyphicon-search"></span>
							<spring:message code="data-overview.short" />
						</a>
						<c:if test="${datasetCount gt 0}">
							<a class="btn btn-default" title="<spring:message code="faoInstitute.datasets-title" arguments="${faoInstitute.fullName}" />" href="<c:url value="/wiews/${faoInstitute.code}/datasets" />">
								<spring:message code="view.datasets" />
							</a>
						</c:if>
						<div class="btn-group">
							<form class="form-horizontal" style="display:inline;" method="post" action="<c:url value="/download/wiews/${faoInstitute.code}/download" />">
								<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
								<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
									<span class="glyphicon glyphicon-save"></span>
										<span>
											<spring:message code="download" />
										</span>
									<span class="caret"></span>
								</button>

								<ul class="dropdown-menu">
									<security:authorize access="isAuthenticated()">
										<li>
											<button name="mcpd" class="btn btn-inline" type="submit">
												<spring:message code="filter.download-mcpd" />
											</button>
											<button name="pdci" class="btn btn-inline" type="submit">
												<spring:message code="filter.download-pdci" />
											</button>
										</li>
									</security:authorize>
									<li>
										<button name="dwca" class="btn btn-inline" type="submit">
											<spring:message code="metadata.download-dwca" />
										</button>
									</li>
								</ul>
							</form>
						</div>
					</c:if>
				</div>
Matija Obreza's avatar
Matija Obreza committed
197
				<%-- <c:if test="${faoInstitute.latitude ne null}">
198 199 200 201 202 203 204 205
					<div class="row">
						<div class="col-xs-3"></div>

						<div class="col-xs-9">
							<span property="schema:Organization#location">
								<span typeof="schema:Place">
									<span property="schema:Place#geo">
										<span typeof="schema:GeoCoordinates">
Matija Obreza's avatar
Matija Obreza committed
206
											<span property="schema:GeoCoordinates#latitude"><c:out value="${faoInstitute.latitude}" /></span>
207
											,
Matija Obreza's avatar
Matija Obreza committed
208
											<span property="schema:GeoCoordinates#longitude"><c:out value="${faoInstitute.longitude}" /></span>
209
										</span>
Matija Obreza's avatar
Matija Obreza committed
210 211 212
									</span>
								</span>
							</span>
213
						</div>
Matija Obreza's avatar
Matija Obreza committed
214
					</div>
Matija Obreza's avatar
Matija Obreza committed
215
				</c:if> --%>
Matija Obreza's avatar
Matija Obreza committed
216

Taisiya Glushko's avatar
Taisiya Glushko committed
217
				<%--<div class="row">
218 219 220 221
					<div class="col-xs-12">
						<local:tweet text="${faoInstitute.fullName}" hashTags="${faoInstitute.code},${faoInstitute.acronym},GenesysPGR" iconOnly="true" />
						<local:linkedin-share text="${faoInstitute.fullName}" summary="${blurp.body}" iconOnly="true" />
					</div>
Taisiya Glushko's avatar
Taisiya Glushko committed
222
				</div>--%>
Matija Obreza's avatar
Matija Obreza committed
223
		</div>
Matija Obreza's avatar
Matija Obreza committed
224
		<c:if test="${faoInstitute.latitude ne null}">
Taisiya Glushko's avatar
Taisiya Glushko committed
225 226 227 228
			<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 map-container" style="">
				<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
					<div id="map" class="gis-map"></div>
				</div>
Matija Obreza's avatar
Matija Obreza committed
229 230
			</div>
		</c:if>
Matija Obreza's avatar
Matija Obreza committed
231
	</div>
Taisiya Glushko's avatar
Taisiya Glushko committed
232
</div>
Matija Obreza's avatar
Matija Obreza committed
233

234 235 236 237 238 239 240 241 242
	<gui:alert type="warning" display="${not faoInstitute.current}">
		<spring:message code="faoInstitute.institute-not-current" />
		<a href="<c:url value="/wiews/${faoInstitute.vCode}" />"> <spring:message code="faoInstitute.view-current-institute" arguments="${faoInstitute.vCode}" />
		</a>
	</gui:alert>

	<gui:alert type="info" display="${faoInstitute.current and countByInstitute eq 0}">
		<spring:message code="faoInstitute.no-accessions-registered" />
	</gui:alert>
Matija Obreza's avatar
Matija Obreza committed
243

Taisiya Glushko's avatar
Taisiya Glushko committed
244
		<%--<h3>
Matija Obreza's avatar
Matija Obreza committed
245 246 247 248 249 250
			<span>
				<spring:message code="heading.general-info" />
			</span>
		</h3>
		<div class="row">
			<div class="col-md-offset-2 col-md-10">
Matija Obreza's avatar
Matija Obreza committed
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265
				<ul class="funny-list statistics">
					<li class="clearfix odd">
						<span class="stats-number">
							<fmt:formatNumber value="${countByInstitute}" />
						</span>
						<spring:message code="faoInstitutes.stat.accessionCount" />
					</li>
					<li class="clearfix even">
						<span class="stats-number">
							<fmt:formatNumber value="${datasetCount}" />
						</span>
						<spring:message code="faoInstitutes.stat.datasetCount" />
					</li>
				</ul>
				<c:if test="${datasetCount gt 0}">
266
					<p><spring:message code="statistics.phenotypic.stats-text" arguments="${statisticsPheno.elStats}" /></p>
Matija Obreza's avatar
Matija Obreza committed
267
				</c:if>
Matija Obreza's avatar
Matija Obreza committed
268 269 270 271 272

				<c:if test="${countByInstitute gt 0}">
						<div class="row" style="margin-top: 2em;">
							<div class="col-sm-12">
								<a class="btn btn-primary" title="<spring:message code="faoInstitute.data-title" arguments="${faoInstitute.fullName}" />" href="<c:url value="/wiews/${faoInstitute.code}/data" />">
273
										<span class="glyphicon glyphicon-list"></span>
Matija Obreza's avatar
Matija Obreza committed
274 275 276
									<spring:message code="view.accessions" />
								</a>
								<a class="btn btn-default" title="<spring:message code="faoInstitute.overview-title" arguments="${faoInstitute.fullName}" />" href="<c:url value="/wiews/${faoInstitute.code}/overview" />">
277
									<span class="glyphicon glyphicon-eye-open"></span>
Matija Obreza's avatar
Matija Obreza committed
278 279 280
									<spring:message code="data-overview.short" />
								</a>
								<c:if test="${datasetCount gt 0}">
281
									<a class="btn btn-default" title="<spring:message code="faoInstitute.datasets-title" arguments="${faoInstitute.fullName}" />" href="<c:url value="/wiews/${faoInstitute.code}/datasets" />">
Matija Obreza's avatar
Matija Obreza committed
282 283 284
										<spring:message code="view.datasets" />
									</a>
								</c:if>
285
								<div class="btn-group">
Matija Obreza's avatar
Matija Obreza committed
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314
								<form class="form-horizontal" method="post" action="<c:url value="/download/wiews/${faoInstitute.code}/download" />">
									<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
									<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
										<span class="glyphicon glyphicon-download"></span>
										<span>
											<spring:message code="download" />
										</span>
										<span class="caret"></span>
									</button>

									<ul class="dropdown-menu">
										<security:authorize access="isAuthenticated()">
											<li>
												<button name="mcpd" class="btn btn-inline" type="submit">
													<spring:message code="filter.download-mcpd" />
												</button>
												<button name="pdci" class="btn btn-inline" type="submit">
													<spring:message code="filter.download-pdci" />
												</button>
											</li>
										</security:authorize>
										<li>
											<button name="dwca" class="btn btn-inline" type="submit">
												<spring:message code="metadata.download-dwca" />
											</button>
										</li>
									</ul>
								</form>
							</div>
Matija Obreza's avatar
Matija Obreza committed
315
							</div>
Matija Obreza's avatar
Matija Obreza committed
316
						</div>
Matija Obreza's avatar
Matija Obreza committed
317 318
				</c:if>
			</div>
Taisiya Glushko's avatar
Taisiya Glushko committed
319
		</div>--%>
Matija Obreza's avatar
Matija Obreza committed
320

321
<div class="statistics-wrapper clearfix">
Matija Obreza's avatar
Matija Obreza committed
322
		<c:if test="${statisticsCrops ne null and statisticsCrops.totalCount gt 0}">
Taisiya Glushko's avatar
Taisiya Glushko committed
323 324 325 326 327 328 329
			<div class="collect-info col-lg-6 col-md-12 col-sm-12 col-xs-12 stat-by-crop">
				<h4 class="row section-heading"><span><spring:message code="faoInstitute.stat-by-crop" /></span></h4>
				<c:set var="rowCount" value="${statisticsCrops.terms.size()}" />
					<c:if test="${rowCount gt 4}">
						<c:set var="cssClass" value="min-height"></c:set>
					</c:if>
				<div class="section-inner-content clearfix ${cssClass}">
330
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 statistics">
Taisiya Glushko's avatar
Taisiya Glushko committed
331 332
						<local:term-result termResult="${statisticsCrops}" type="crop" />
					</div>
Matija Obreza's avatar
Matija Obreza committed
333 334 335
				</div>
			</div>
		</c:if>
336

337
		<c:if test="${statisticsCropName ne null and statisticsCropName.numberOfElements gt 0}">
338 339 340 341 342 343 344
			<div class="collect-info col-lg-6 col-md-12 col-sm-12 col-xs-12 stat-by-genus">
				<h4 class="row section-heading"><span><spring:message code="faoInstitute.stat-by-cropName" arguments="${statisticsGenus.numberOfElements}" /></span></h4>
				<div class="section-inner-content clearfix ${cssClass}">
					<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 statistics">
						<c:forEach items="${statisticsCropName.content}" var="stat" varStatus="status">
							<div class="row">
								<div class="col-lg-8 col-md-6 col-sm-6 col-xs-6 ${status.count % 2 == 0 ? 'even' : 'odd'}">
345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361
									<c:choose>
										<c:when test="${stat[0] eq null}">
											<span>
												<em>
													<spring:message code="data-overview.missingCount" />
												</em>
											</span>
										</c:when>
										<c:otherwise>
											<a title="<spring:message code="faoInstitute.link-species-data" arguments="${faoInstitute.fullName}|${faoInstitute.acronym}|${stat[0]}" argumentSeparator="|" />"
												href="<c:url value="/wiews/${faoInstitute.code}/cropName/${stat[0]}" />">
												<span dir="ltr">
													<c:out value="${stat[0]}" />
												</span>
											</a>
										</c:otherwise>
									</c:choose>
362 363 364 365 366 367 368 369 370 371 372
								</div>
								<div class="col-lg-4 col-md-6 col-sm-6 col-xs-6 ${status.count % 2 == 0 ? 'even' : 'odd'}">
									<span class="stats-number"><fmt:formatNumber value="${stat[1]}" /></span>
								</div>
							</div>
						</c:forEach>
					</div>
					<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
						<div class="chart chart-pie">
							<div id="chartStatsByCropName" style="height: 192px;"></div>
						</div>
373 374 375 376
					</div>
				</div>
			</div>
		</c:if>
377

Matija Obreza's avatar
Matija Obreza committed
378

Matija Obreza's avatar
Matija Obreza committed
379
		<c:if test="${statisticsGenus ne null and statisticsGenus.numberOfElements gt 0}">
Taisiya Glushko's avatar
Taisiya Glushko committed
380 381 382
			<div class="collect-info col-lg-6 col-md-12 col-sm-12 col-xs-12 stat-by-genus">
				<h4 class="row section-heading"><span><spring:message code="faoInstitute.stat-by-genus" arguments="${statisticsGenus.numberOfElements}" /></span></h4>
				<div class="section-inner-content clearfix ${cssClass}">
383
					<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 statistics">
Taisiya Glushko's avatar
Taisiya Glushko committed
384 385 386
						<c:forEach items="${statisticsGenus.content}" var="stat" varStatus="status">
							<div class="row">
								<div class="col-lg-8 col-md-6 col-sm-6 col-xs-6 ${status.count % 2 == 0 ? 'even' : 'odd'}">
387
									<%-- <span class="index-number">${status.count + pagedData.size * pagedData.number}</span> --%>
Taisiya Glushko's avatar
Taisiya Glushko committed
388
									<a title="<spring:message code="faoInstitute.link-species-data" arguments="${faoInstitute.fullName}|${faoInstitute.acronym}|${stat[0]}" argumentSeparator="|" />" href="<c:url value="/wiews/${faoInstitute.code}/t/${stat[0]}" />">
Matija Obreza's avatar
Matija Obreza committed
389
										<span dir="ltr" class="sci-name"><i><c:out value="${stat[0]}" /></i></span>
Taisiya Glushko's avatar
Taisiya Glushko committed
390 391 392 393 394 395 396 397 398 399 400 401 402
									</a>
								</div>
								<div class="col-lg-4 col-md-6 col-sm-6 col-xs-6 ${status.count % 2 == 0 ? 'even' : 'odd'}">
									<span class="stats-number"><fmt:formatNumber value="${stat[1]}" /></span>
								</div>
							</div>
						</c:forEach>
					</div>
					<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
						<div class="chart chart-pie">
							<div id="chartStatsByGenus" style="height: 192px;"></div>
						</div>
					</div>
Matija Obreza's avatar
Matija Obreza committed
403 404
				</div>
			</div>
Matija Obreza's avatar
Matija Obreza committed
405
		</c:if>
406

Matija Obreza's avatar
Matija Obreza committed
407
		<c:if test="${statisticsTaxonomy ne null and statisticsTaxonomy.numberOfElements gt 0}">
Taisiya Glushko's avatar
Taisiya Glushko committed
408 409 410
			<div class="collect-info col-lg-6 col-md-12 col-sm-12 col-xs-12 stat-by-species">
				<h4 class="row section-heading"><span><spring:message code="faoInstitute.stat-by-species" arguments="${statisticsTaxonomy.numberOfElements}" /></span></h4>
				<div class="section-inner-content clearfix ${cssClass}">
411
					<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 statistics">
Taisiya Glushko's avatar
Taisiya Glushko committed
412 413 414
						<c:forEach items="${statisticsTaxonomy.content}" var="stat" varStatus="status">
							<div class="row">
								<div class="col-lg-8 col-md-6 col-sm-6 col-xs-6 ${status.count % 2 == 0 ? 'even' : 'odd'}">
415
									<%-- <span class="index-number">${status.count + pagedData.size * pagedData.number}</span> --%>
Taisiya Glushko's avatar
Taisiya Glushko committed
416 417
									<a title="<spring:message code="faoInstitute.link-species-data" arguments="${faoInstitute.fullName}|${faoInstitute.acronym}|${stat[0].genus} ${stat[0].species}" argumentSeparator="|" />" href="<c:url value="/wiews/${faoInstitute.code}/t/${stat[0].genus}/${stat[0].species}" />">
										<span dir="ltr" class="sci-name">
Matija Obreza's avatar
Matija Obreza committed
418
											<c:out escapeXml="false" value="${stat[0].taxonNameHtml}" />
Taisiya Glushko's avatar
Taisiya Glushko committed
419 420 421 422 423 424 425 426 427 428 429 430 431 432
										</span>
									</a>
								</div>
								<div class="col-lg-4 col-md-6 col-sm-6 col-xs-6">
									<span class="stats-number"><fmt:formatNumber value="${stat[1]}" /></span>
								</div>
							</div>
						</c:forEach>
					</div>
					<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
						<div class="chart chart-pie">
							<div id="chartStatsBySpecies" style="height: 192px"></div>
						</div>
					</div>
Matija Obreza's avatar
Matija Obreza committed
433 434
				</div>
			</div>
Matija Obreza's avatar
Matija Obreza committed
435
		</c:if>
Matija Obreza's avatar
Matija Obreza committed
436 437 438 439

		<!-- See also end -->

	<c:if test="${statisticsPDCI.count gt 0 and statisticsPDCI.count eq countByInstitute}">
Taisiya Glushko's avatar
Taisiya Glushko committed
440 441 442 443
		<div class="collect-info col-lg-6 col-md-12 col-sm-12 col-xs-12 pdci">
			<h4 class="row section-heading"><span><spring:message code="accession.pdci" /></span></h4>
			<div class="section-inner-content clearfix ${cssClass}">
				<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
Matija Obreza's avatar
Matija Obreza committed
444 445
					<div class="chart chart-histogram">
						<div id="chartPDCI" style="height: 200px"></div>
Matija Obreza's avatar
Matija Obreza committed
446
					</div>
Taisiya Glushko's avatar
Taisiya Glushko committed
447 448
					<p><spring:message code="accession.pdci.stats-text" arguments="${statisticsPDCI.elStats}" /></p>
					<p><a href="<c:url value="/content/passport-data-completeness-index" />"><spring:message code="accession.pdci.about-link" /></a></p>
Matija Obreza's avatar
Matija Obreza committed
449
					<security:authorize access="isAuthenticated()">
Matija Obreza's avatar
Matija Obreza committed
450
						<form class="form-horizontal" method="post" action="<c:url value="/download/wiews/${faoInstitute.code}/download" />">
Matija Obreza's avatar
Matija Obreza committed
451 452 453 454 455 456 457
							<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
							<button name="pdci" class="btn btn-default" type="submit">
								<spring:message code="filter.download-pdci" />
							</button>
						</form>
					</security:authorize>
					<%-- <c:forEach items="${statisticsPDCI.histogram}" var="item" varStatus="index">
Taisiya Glushko's avatar
Taisiya Glushko committed
458 459
    						<div><c:out value="${index.count}=${item}" /></div>
  					</c:forEach> --%>
Matija Obreza's avatar
Matija Obreza committed
460 461 462 463
				</div>
			</div>
		</div>
	</c:if>
464 465 466 467 468 469 470 471 472 473 474 475 476 477
	
	<c:if test="${countByInstitute gt 0}">
		<spring:eval expression="T(java.text.DateFormatSymbols).getInstance(pageContext.response.locale).getMonths()" var="monthNames" />
		<div class="collect-info col-lg-6 col-md-12 col-sm-12 col-xs-12">
				<h4 class="row section-heading"><span><spring:message code="accession.page.updates.title" /></span></h4>
				<div class="section-inner-content">
					<div class="terms-table">
						<c:forEach items="${updates}" var="update" varStatus="status">
							<div class="row">
								<div class="col-lg-8 col-md-6 col-sm-6 col-xs-6">
									<c:if test="${update[0] eq null}">
										<spring:message code="accession.page.updated.never" />
									</c:if>
									<c:if test="${update[3] ne null}">
Maxym Borodenko's avatar
Maxym Borodenko committed
478 479 480 481
										<c:set var="dateVal" value="${update[0]}-${update[1]}-${update[2]}"/>
										<a class="" title="<spring:message code="accession.sort-data.lastUpdated" arguments="${update[2]} ${monthNames[update[1]-1]} ${update[0]}" />" href="<c:url value="/wiews/${dateVal}/${faoInstitute.code}/last-updated" />">
												<c:out value="${update[2]} ${monthNames[update[1]-1]} ${update[0]}" />
										</a>
482 483 484 485 486 487 488 489 490 491 492 493 494
									</c:if>
								</div>
								<div class="col-lg-4 col-md-6 col-sm-6 col-xs-6 text-right">
									<fmt:formatNumber value="${update[3]}" />
								</div>
							</div>
						</c:forEach>
					</div>
				</div>
			</div>
		</div>
	</c:if>
	
Taisiya Glushko's avatar
Taisiya Glushko committed
495
	<security:authorize access="hasRole('ADMINISTRATOR') or hasPermission(#faoInstitute, 'ADMINISTRATION')">
496 497
		<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 form-group">
			<a href="<c:url value="/acl/${faoInstitute.getClass().name}/${faoInstitute.id}/permissions"><c:param name="back">/wiews/${faoInstitute.code}</c:param></c:url>" class="btn btn-default">
Taisiya Glushko's avatar
Taisiya Glushko committed
498 499
				<spring:message code="edit-acl" />
			</a>
500
			<a href="<c:url value="/wiews/${faoInstitute.code}/edit" />" class="btn btn-default">
Taisiya Glushko's avatar
Taisiya Glushko committed
501 502
				<spring:message code="edit" />
			</a>
503 504 505
            <a href="<c:url value="/wiews/${faoInstitute.code}/files" />" class="btn btn-default">
                <spring:message code="file.manage-files" />
            </a>
Taisiya Glushko's avatar
Taisiya Glushko committed
506 507
		</div>
	</security:authorize>
Matija Obreza's avatar
Matija Obreza committed
508

Taisiya Glushko's avatar
Taisiya Glushko committed
509 510 511 512
	<c:if test="${blurp ne null}">
		<div class="collect-info col-lg-12 col-md-12 col-sm-12 col-xs-12 about">
			<h4 class="row section-heading"><span><spring:message code="heading.about" /></span></h4>
			<div class="section-inner-content clearfix">
Taisiya Glushko's avatar
Taisiya Glushko committed
513
				<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 two-column-text">
Taisiya Glushko's avatar
Taisiya Glushko committed
514
					<div property="schema:Organization#description"><cms:blurb blurb="${blurp}" /></div>
Matija Obreza's avatar
Matija Obreza committed
515 516
				</div>
			</div>
Matija Obreza's avatar
Matija Obreza committed
517
		</div>
Taisiya Glushko's avatar
Taisiya Glushko committed
518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566
	</c:if>

	<div class="collect-info col-lg-12 col-md-12 col-sm-12 col-xs-12 see-also">
		<h4 class="row section-heading"><span><spring:message code="heading.see-also" /></span></h4>
			<div class="section-inner-content clearfix">
				<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
					<ul class="see-also">
						<c:if test="${countByInstitute gt 0}">
							<li>
								<a href="<c:url value="/wiews/${faoInstitute.code}/data/map" />">
									<spring:message code="see-also.map" />
								</a>
							</li>
							<li>
								<a href="<c:url value="/wiews/${faoInstitute.code}/overview" />">
									<spring:message code="see-also.overview" />
								</a>
							</li>
						</c:if>
							<li>
								<a href="<c:url value="/geo/${faoInstitute.country.code3}" />">
									<spring:message code="see-also.country" arguments="${faoInstitute.country.getName(pageContext.response.locale)}" />
								</a>
							</li>
						</ul>
					</div>
				</div>
			</div>

	<content tag="javascript">

		<script>
			function checkWidth() {

				var mapHeight = $('.map-wrapper').height();

				if ($(window).innerWidth() > 989) {
					$('#map').css('height',mapHeight + 'px');
				}
			}

			$(document).ready(function() {
				checkWidth(true);

				$(window).resize(function() {
					checkWidth(true);
				});
			});
		</script>
567

Taisiya Glushko's avatar
Taisiya Glushko committed
568
		<script type="text/javascript">
Matija Obreza's avatar
Matija Obreza committed
569
			jQuery(document).ready(function() {
570
				var map=GenesysMaps.map("${pageContext.response.locale.language}", $("#map"), {
571
					zoom: 0,
Matija Obreza's avatar
Matija Obreza committed
572 573 574
					minZoom: 0,
					maxZoom: 4, /* WIEWS does not provide enough detail */
					<c:if test="${faoInstitute.latitude ne null}">
575
					center: new GenesysMaps.LatLng(${faoInstitute.latitude}, ${faoInstitute.longitude}), 
Matija Obreza's avatar
Matija Obreza committed
576 577
					markerTitle: "<spring:escapeBody javaScriptEscape="true">${faoInstitute.code}</spring:escapeBody>",
					</c:if>
Matija Obreza's avatar
Matija Obreza committed
578 579 580 581
					scrollWheelZoom: false,
					touchZoom: false,
					dragging: false,
					doubleClickZoom: false,
Matija Obreza's avatar
Matija Obreza committed
582 583
					boxZoom: false,
					zoomControl:false
Matija Obreza's avatar
Matija Obreza committed
584 585
				});
			});
Matija Obreza's avatar
Matija Obreza committed
586
		</script>
Matija Obreza's avatar
Matija Obreza committed
587
   <script type="text/javascript">
588
			<%@ include file="/WEB-INF/jsp/wiews/ga.jsp" %>
Matija Obreza's avatar
Matija Obreza committed
589
			_pageDim = { institute: '<c:out value="${faoInstitute.code}" />"' };
590
		</script> <script>
591
        jQuery(document).ready(function () {
592
            GenesysChart.chart("#chartStatsByCropName", "<c:url value="/wiews/${faoInstitute.code}/stat-cropName" />", null, null, function(cropName) { window.location=window.location.pathname + "/cropName/" + cropName; });
Matija Obreza's avatar
Matija Obreza committed
593 594
            GenesysChart.chart("#chartStatsByGenus", "<c:url value="/wiews/${faoInstitute.code}/stat-genus" />", null, null, function(genus) { window.location=window.location.pathname + "/t/" + genus; });
            GenesysChart.chart("#chartStatsBySpecies", "<c:url value="/wiews/${faoInstitute.code}/stat-species" />", null, function(taxonomy) { return taxonomy.taxonName; }, function(taxonomy) { window.location=window.location.pathname + "/t/" + taxonomy.genus + "/" + taxonomy.species; });
595
            /* ${statisticsPDCI.count} eq ${countByInstitute} */
596 597 598
<c:if test="${statisticsPDCI.count gt 0 and statisticsPDCI.count eq countByInstitute}">
            GenesysChart.histogram("#chartPDCI", <c:out value="${statisticsPDCI.histogramJson}" escapeXml="false" /> );
</c:if>
igoshin's avatar
igoshin committed
599
        });
600
    </script> </content>
Matija Obreza's avatar
Matija Obreza committed
601 602
</body>
</html>