details.jsp 16.1 KB
Newer Older
Matija Obreza's avatar
Matija Obreza committed
1
2
3
4
5
6
<!DOCTYPE html>

<%@include file="/WEB-INF/jsp/init.jsp"%>

<html>
<head>
Matija Obreza's avatar
Matija Obreza committed
7
8
<title><c:out value="${faoInstitute.fullName}" /><c:if test="${faoInstitute.acronym != ''}"> | ${faoInstitute.acronym}</c:if> |
	<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
14
15
<meta name="description"
	content="<spring:message code="faoInstitute.meta-description" arguments="${faoInstitute.fullName}|${faoInstitute.acronym}" argumentSeparator="|" />
  	<c:out value="${jspHelper.htmlToText(blurp.summary)}" />"
/>
Matija Obreza's avatar
Matija Obreza committed
16
</head>
Matija Obreza's avatar
Matija Obreza committed
17
18
19
20
21
<body typeof="schema:Organization" class="wiews-institute">
	<h1>
		<img class="country-flag bigger" src="<c:url value="${cdnFlagsUrl}" />/${faoInstitute.country.code3.toUpperCase()}.svg" />
		<c:if test="${faoInstitute.acronym != ''}">${faoInstitute.acronym}</c:if>
		<small>
Matija Obreza's avatar
Matija Obreza committed
22
			<c:out value="${faoInstitute.code}" />
Matija Obreza's avatar
Matija Obreza committed
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
		</small>
	</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>
--%>

	<div class="row" id="genebank-info">
Matija Obreza's avatar
Matija Obreza committed
44
		<div class="${faoInstitute.latitude ne null ? 'col-sm-9' : 'col-sm-12'}">
45
46
47
48
			<div class="genebank-text">
				<h1 property="schema:Organization#name">
					<c:out value="${faoInstitute.fullName}" />
				</h1>
Matija Obreza's avatar
Matija Obreza committed
49

50
51
52
53
54
55
56
57
58
59
				<div class="row">
					<div class="col-xs-3">
						<spring:message code="faoInstitute.country" />
					</div>
					<div class="col-xs-9" property="schema:Organization#location">
						<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
							<a href="<c:url value="/geo" />" itemprop="url">
								<span itemprop="title">
									<spring:message code="menu.countries" />
								</span>
Matija Obreza's avatar
Matija Obreza committed
60
							</a>
61
62
63
64
65

							<span itemprop="child" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
								<a href="<c:url value="/geo/${faoInstitute.country.code3}" />" itemprop="url">
									<span itemprop="title">${faoInstitute.country.getName(pageContext.response.locale)}</span>
								</a>
Matija Obreza's avatar
Matija Obreza committed
66
							</span>
67
68
						</span>
					</div>
Matija Obreza's avatar
Matija Obreza committed
69
70
				</div>

71
				<div class="row" style="">
Matija Obreza's avatar
Matija Obreza committed
72
					<div class="col-xs-3">
73
						<spring:message code="faoInstitute.url" />
Matija Obreza's avatar
Matija Obreza committed
74
					</div>
Matija Obreza's avatar
Matija Obreza committed
75
					<div class="col-xs-9">
76
77
						<c:forEach items="${faoInstitute.safeUrls}" var="url">
							<a target="_blank" rel="nofollow" href="<c:out value="${url}" />">
Matija Obreza's avatar
Matija Obreza committed
78
								<span dir="ltr">
79
									<c:out value="${url}" />
Matija Obreza's avatar
Matija Obreza committed
80
81
82
								</span>
							</a>
						</c:forEach>
83
84
85
86
						<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>
87
						<a target="_blank" rel="nofollow"
88
							href="<c:url value="http://www.fao.org/wiews/instab/${wiewsLang}/"><c:param name="instcode" value="${faoInstitute.code}" /></c:url>"
89
90
91
92
						>
							<spring:message code="faoInstitute.wiewsLink" arguments="${faoInstitute.code}" />
						</a>
					</div>
Matija Obreza's avatar
Matija Obreza committed
93
94
				</div>

95
96
97
98
99
100
101
102
103
104
105
106
107
108
				<c:if test="${organizations.size() gt 0}">
					<div class="row">
						<div class="col-xs-3">
							<spring:message code="faoInstitute.member-of-organizations-and-networks" />
						</div>
						<div class="col-xs-9">
							<c:forEach items="${organizations}" var="organization">
								<a href="<c:url value="/org/${organization.slug}" />">
									<span dir="ltr">
										<c:out value="${organization.title}" />
									</span>
								</a>
							</c:forEach>
						</div>
Matija Obreza's avatar
Matija Obreza committed
109
					</div>
110
111
				</c:if>

Matija Obreza's avatar
Matija Obreza committed
112
				<%-- <c:if test="${faoInstitute.latitude ne null}">
113
114
115
116
117
118
119
120
121
122
123
124
					<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">
											<span property="schema:GeoCoordinates#latitude">${faoInstitute.latitude}</span>
											,
											<span property="schema:GeoCoordinates#longitude">${faoInstitute.longitude}</span>
										</span>
Matija Obreza's avatar
Matija Obreza committed
125
126
127
									</span>
								</span>
							</span>
128
						</div>
Matija Obreza's avatar
Matija Obreza committed
129
					</div>
Matija Obreza's avatar
Matija Obreza committed
130
				</c:if> --%>
Matija Obreza's avatar
Matija Obreza committed
131

132
133
134
135
136
				<div class="row">
					<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>
Matija Obreza's avatar
Matija Obreza committed
137
138
				</div>

139
			</div>
Matija Obreza's avatar
Matija Obreza committed
140
		</div>
Matija Obreza's avatar
Matija Obreza committed
141
142
143
144
145
146

		<c:if test="${faoInstitute.latitude ne null}">
			<div class="col-sm-3">
				<div id="map" class="gis-map"></div>
			</div>
		</c:if>
Matija Obreza's avatar
Matija Obreza committed
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
	</div>


	<c:if test="${not faoInstitute.current}">
		<div class="alert alert-warning">
			<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>
		</div>
	</c:if>

	<c:if test="${faoInstitute.current and countByInstitute eq 0}">
		<div class="alert alert-info">
			<spring:message code="faoInstitute.no-accessions-registered" />
		</div>
	</c:if>


166
	<div class="content-section-2015">
Matija Obreza's avatar
Matija Obreza committed
167
168
169
170
171
172
173
		<h3>
			<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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
				<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}">
189
					<p><spring:message code="statistics.phenotypic.stats-text" arguments="${statisticsPheno.elStats}" /></p>
Matija Obreza's avatar
Matija Obreza committed
190
				</c:if>
Matija Obreza's avatar
Matija Obreza committed
191
192
193
194
195
196
197

				<c:if test="${countByInstitute gt 0}">
					<form class="form-horizontal" method="post" action="/download/wiews/${faoInstitute.code}/download">
						<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
						<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" />">
198
										<span class="glyphicon glyphicon-list"></span>
Matija Obreza's avatar
Matija Obreza committed
199
200
201
									<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" />">
202
									<span class="glyphicon glyphicon-eye-open"></span>
Matija Obreza's avatar
Matija Obreza committed
203
204
205
									<spring:message code="data-overview.short" />
								</a>
								<c:if test="${datasetCount gt 0}">
206
									<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
207
208
209
										<spring:message code="view.datasets" />
									</a>
								</c:if>
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
								<div class="btn-group">
                        <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-default" 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>
                 </div>
Matija Obreza's avatar
Matija Obreza committed
234
							</div>
Matija Obreza's avatar
Matija Obreza committed
235
						</div>
Matija Obreza's avatar
Matija Obreza committed
236
237
238
239
240
241
242
					</form>
				</c:if>

			</div>
		</div>


Matija Obreza's avatar
Matija Obreza committed
243
		<c:if test="${statisticsCrops ne null and statisticsCrops.totalCount gt 0}">
Matija Obreza's avatar
Matija Obreza committed
244
245
246
247
248
249
250
251
252
253
254
255
			<h4>
				<span>
					<spring:message code="faoInstitute.stat-by-crop" />
				</span>
			</h4>
			<div class="row">
				<div class="col-md-offset-2 col-md-10">
					<local:term-result termResult="${statisticsCrops}" type="crop" />
				</div>
			</div>
		</c:if>

Matija Obreza's avatar
Matija Obreza committed
256
		<c:if test="${statisticsGenus ne null and statisticsGenus.numberOfElements gt 0}">
Matija Obreza's avatar
Matija Obreza committed
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
		<h4>
			<span>
				<spring:message code="faoInstitute.stat-by-genus" arguments="${statisticsGenus.numberOfElements}" />
			</span>
		</h4>
		<div class="row">
			<div class="col-md-offset-2 col-md-5 col-sm-6 col-xs-12">
				<ul class="funny-list statistics">
					<c:forEach items="${statisticsGenus.content}" var="stat" varStatus="status">
						<li class="clearfix ${status.count % 2 == 0 ? 'even' : 'odd'}">
							<span class="stats-number">
								<fmt:formatNumber value="${stat[1]}" />
							</span>
							<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]}" />"
							>
								<span dir="ltr" class="sci-name">
									<c:out value="${stat[0]}" />
								</span>
							</a>
						</li>
					</c:forEach>
				</ul>
			</div>
			<div class="col-md-5 col-sm-6 col-xs-12">
				<div class="chart chart-pie">
					<div id="chartStatsByGenus" style="height: 192px;"></div>
				</div>
			</div>
		</div>
Matija Obreza's avatar
Matija Obreza committed
287
288
289
		</c:if>
		
		<c:if test="${statisticsTaxonomy ne null and statisticsTaxonomy.numberOfElements gt 0}">
Matija Obreza's avatar
Matija Obreza committed
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
315
316
317
318
319
		<h4>
			<span>
				<spring:message code="faoInstitute.stat-by-species" arguments="${statisticsTaxonomy.numberOfElements}" />
			</span>
		</h4>
		<div class="row">
			<div class="col-md-offset-2 col-md-5 col-sm-6 col-xs-12">
				<ul class="funny-list statistics">
					<c:forEach items="${statisticsTaxonomy.content}" var="stat" varStatus="status">
						<li class="clearfix ${status.count % 2 == 0 ? 'even' : 'odd'}">
							<span class="stats-number">
								<fmt:formatNumber value="${stat[1]}" />
							</span>
							<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">
									<c:out value="${stat[0].taxonName}" />
								</span>
							</a>
						</li>
					</c:forEach>
				</ul>
			</div>
			<div class="col-md-5 col-sm-6 col-xs-12">
				<div class="chart chart-pie">
					<div id="chartStatsBySpecies" style="height: 192px"></div>
				</div>
			</div>
		</div>
Matija Obreza's avatar
Matija Obreza committed
320
		</c:if>
Matija Obreza's avatar
Matija Obreza committed
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335

		<!-- See also end -->
	</div>


	<security:authorize access="hasRole('ADMINISTRATOR') or hasPermission(#faoInstitute, 'ADMINISTRATION')">
		<a href="<c:url value="/acl/${faoInstitute.getClass().name}/${faoInstitute.id}/permissions"><c:param name="back">/wiews/${faoInstitute.code}</c:param></c:url>" class="close">
			<spring:message code="edit-acl" />
		</a>
		<a href="<c:url value="/wiews/${faoInstitute.code}/edit" />" class="close">
			<spring:message code="edit" />
		</a>
	</security:authorize>

	<c:if test="${blurp ne null}">
336
		<div class="content-section-2015">
Matija Obreza's avatar
Matija Obreza committed
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
			<h3>
				<span>
					<spring:message code="heading.about" />
				</span>
			</h3>
			<div class="row">
				<div class="col-md-offset-2 col-md-10">
					<span property="schema:Organization#description">
						<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp"%>
					</span>
				</div>
			</div>
		</div>
	</c:if>

	<c:if test="${statisticsPDCI.count gt 0 and statisticsPDCI.count eq countByInstitute}">
  
354
		<div class="content-section-2015">
Matija Obreza's avatar
Matija Obreza committed
355
356
357
358
359
360
361
362
363
364
365
366
			<h3>
				<span>
					<spring:message code="accession.pdci" />
				</span>
			</h3>
			<div class="row">
				<div class="col-md-offset-2 col-md-10">
					<p>
						<spring:message code="accession.pdci.stats-text" arguments="${statisticsPDCI.elStats}" />
					</p>
					<div class="chart chart-histogram">
						<div id="chartPDCI" style="height: 200px"></div>
Matija Obreza's avatar
Matija Obreza committed
367
					</div>
Matija Obreza's avatar
Matija Obreza committed
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
					<p>
						<a href="<c:url value="/content/passport-data-completeness-index" />">
							<spring:message code="accession.pdci.about-link" />
						</a>
					</p>
					<security:authorize access="isAuthenticated()">
						<form class="form-horizontal" method="post" action="/download/wiews/${faoInstitute.code}/download">
							<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">
    <div>${index.count}=${item}</div>
  </c:forEach> --%>
				</div>
			</div>
		</div>

	</c:if>


391
		<div class="content-section-2015">
Matija Obreza's avatar
Matija Obreza committed
392
393
394
395
396
397
398
			<h3>
				<span>
					<spring:message code="heading.see-also" />
				</span>
			</h3>
			<div class="row">
				<div class="col-md-offset-2 col-md-10">
Matija Obreza's avatar
Matija Obreza committed
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
					<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>
Matija Obreza's avatar
Matija Obreza committed
418
419
				</div>
			</div>
Matija Obreza's avatar
Matija Obreza committed
420
		</div>
421

Matija Obreza's avatar
Matija Obreza committed
422
	<content tag="javascript"> 
423
    <script type="text/javascript">
Matija Obreza's avatar
Matija Obreza committed
424
			jQuery(document).ready(function() {
425
				var map=GenesysMaps.map("${pageContext.response.locale.language}", $("#map"), {
426
					zoom: 0,
Matija Obreza's avatar
Matija Obreza committed
427
428
429
					minZoom: 0,
					maxZoom: 4, /* WIEWS does not provide enough detail */
					<c:if test="${faoInstitute.latitude ne null}">
430
					center: new GenesysMaps.LatLng(${faoInstitute.latitude}, ${faoInstitute.longitude}), 
Matija Obreza's avatar
Matija Obreza committed
431
432
					markerTitle: "<spring:escapeBody javaScriptEscape="true">${faoInstitute.code}</spring:escapeBody>",
					</c:if>
Matija Obreza's avatar
Matija Obreza committed
433
434
435
436
					scrollWheelZoom: false,
					touchZoom: false,
					dragging: false,
					doubleClickZoom: false,
Matija Obreza's avatar
Matija Obreza committed
437
438
					boxZoom: false,
					zoomControl:false
Matija Obreza's avatar
Matija Obreza committed
439
440
				});
			});
Matija Obreza's avatar
Matija Obreza committed
441
		</script>
Matija Obreza's avatar
Matija Obreza committed
442
   <script type="text/javascript">
Matija Obreza's avatar
Matija Obreza committed
443
			<%@include file="/WEB-INF/jsp/wiews/ga.jsp"%>
Matija Obreza's avatar
Matija Obreza committed
444
			_pageDim = { institute: '${faoInstitute.code}' };
445
		</script> <script>
446
        jQuery(document).ready(function () {
Matija Obreza's avatar
Matija Obreza committed
447
448
            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; });
449
450
451
<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
452
        });
453
    </script> </content>
Matija Obreza's avatar
Matija Obreza committed
454
455
</body>
</html>