details.jsp 9.82 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>
7
8
9
<title><c:out value="${faoInstitute.fullName}" /><c:if test="${faoInstitute.acronym != ''}"> | ${faoInstitute.acronym}</c:if> | <c:out value="${faoInstitute.code}" /></title>
<meta name="description" content="<spring:message code="faoInstitute.meta-description" arguments="${faoInstitute.fullName}|${faoInstitute.acronym}" argumentSeparator="|" />" />
<meta name="keywords" content="${faoInstitute.acronym}, ${faoInstitute.fullName}, ${faoInstitute.code}" />
Matija Obreza's avatar
Matija Obreza committed
10
</head>
11
<body typeof="schema:Organization">
Matija Obreza's avatar
Matija Obreza committed
12
	<h1>
Matija Obreza's avatar
Matija Obreza committed
13
		<img class="country-flag bigger" src="<c:url value="${cdnFlagsUrl}" />/${faoInstitute.country.code3.toUpperCase()}.png" />
14
		<span property="schema:Organization#name"><c:out value="${faoInstitute.fullName}" /></span>
15
		<c:if test="${faoInstitute.acronym != ''}"> &mdash; ${faoInstitute.acronym}</c:if>
Matija Obreza's avatar
Matija Obreza committed
16
		<small><c:out value="${faoInstitute.code}" /></small>
Matija Obreza's avatar
Matija Obreza committed
17
	</h1>
Matija Obreza's avatar
Matija Obreza committed
18

19
20
21
	<c:if test="${not faoInstitute.current}">
		<div class="alert alert-warning">
			<spring:message code="faoInstitute.institute-not-current" />
22
			<a href="<c:url value="/wiews/${faoInstitute.vCode}" />"><spring:message code="faoInstitute.view-current-institute" arguments="${faoInstitute.vCode}" /></a>
23
24
25
26
		</div>
	</c:if>

	<c:if test="${faoInstitute.current and countByInstitute eq 0}">
Matija Obreza's avatar
Matija Obreza committed
27
		<div class="alert alert-info">
Matija Obreza's avatar
Matija Obreza committed
28
29
			<spring:message code="faoInstitute.no-accessions-registered" />
		</div>
Matija Obreza's avatar
Matija Obreza committed
30
31
	</c:if>

Matija Obreza's avatar
Matija Obreza committed
32
	<div class="jumbotron">
33
		<spring:message code="faoInstitutes.stat.accessionCount" arguments="${countByInstitute}" />
Matija Obreza's avatar
Matija Obreza committed
34
		<c:if test="${countByInstitute gt 0}">
35
36
			<a title="<spring:message code="faoInstitute.data-title" arguments="${faoInstitute.fullName}" />" href="<c:url value="/wiews/${faoInstitute.code}/data" />"><spring:message code="view.accessions" /></a>
			<a title="<spring:message code="faoInstitute.overview-title" arguments="${faoInstitute.fullName}" />" href="<c:url value="/wiews/${faoInstitute.code}/overview" />"><spring:message code="data-overview.short" /></a>
Matija Obreza's avatar
Matija Obreza committed
37
		</c:if>
38
		<br />
39
40
		<spring:message code="faoInstitutes.stat.datasetCount" arguments="${datasetCount}" />
		<c:if test="${datasetCount gt 0}">
41
			<a title="<spring:message code="faoInstitute.datasets-title" arguments="${faoInstitute.fullName}" />" href="<c:url value="/wiews/${faoInstitute.code}/datasets" />"><spring:message code="view.datasets" /></a>
42
		</c:if>
43
	</div>
44
	
Matija Obreza's avatar
Matija Obreza committed
45
	<div class="">
46
		<security:authorize access="hasRole('ADMINISTRATOR') or hasPermission(#faoInstitute, 'ADMINISTRATION')">
Matija Obreza's avatar
Matija Obreza committed
47
			<a href="<c:url value="/acl/${faoInstitute.class.name}/${faoInstitute.id}/permissions"><c:param name="back">/wiews/${faoInstitute.code}</c:param></c:url>" class="close"> <spring:message code="edit-acl" /></a>
48
			<a href="<c:url value="/wiews/${faoInstitute.code}/edit" />" class="close">
49
50
51
52
				<spring:message code="edit" />
			</a>
		</security:authorize>

53
		<span property="schema:Organization#description">
54
		<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp" %>
55
56
		</span>
				
Matija Obreza's avatar
Matija Obreza committed
57
		<div class="row" style="">
58
		<div class="col-sm-4" property="schema:Organization#location">
Matija Obreza's avatar
Matija Obreza committed
59
			<spring:message code="faoInstitute.country" />:
Matija Obreza's avatar
Matija Obreza committed
60
61
62
63
64
65
66
67
68
69
			<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>
				</a>
				<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>
				</span>
			</span>
Matija Obreza's avatar
Matija Obreza committed
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
		</div>
		<%-- <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>
		
		<div class="row" style="">
		<%-- <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="col-sm-12">
			<spring:message code="faoInstitute.url" />:
92
			<c:forEach items="${faoInstitute.safeUrls}" var="url">
Matija Obreza's avatar
Matija Obreza committed
93
				<a target="_blank" rel="nofollow" href="<c:out value="${url}" />"><span dir="ltr"><c:out value="${url}" /></span></a>
94
			</c:forEach>
Matija Obreza's avatar
Matija Obreza committed
95
		</div>
96
97
98
99
100
		
		<div class="col-sm-12">
			<a target="_blank" rel="nofollow" href="<c:url value="http://apps3.fao.org/wiews/institute.htm?i_l=EN&query_INVALIDINST=Y"><c:param name="query_INSTCODE" value="${faoInstitute.code}" /></c:url>"><spring:message code="faoInstitute.wiewsLink" arguments="${faoInstitute.code}" /></a>
		</div>
		
Matija Obreza's avatar
Matija Obreza committed
101
		</div>
102
103
104
105
106
107
		
		<c:if test="${organizations.size() gt 0}">
		<div class="row" style="">
		<div class="col-sm-12">
			<spring:message code="faoInstitute.member-of-organizations-and-networks" />
			<c:forEach items="${organizations}" var="organization">
Matija Obreza's avatar
Matija Obreza committed
108
				<a href="<c:url value="/org/${organization.slug}" />"><span dir="ltr"><c:out value="${organization.title}" /></span></a>
109
110
111
112
			</c:forEach>
		</div>
		</div>
		</c:if>
Matija Obreza's avatar
Matija Obreza committed
113
114
	</div>

Matija Obreza's avatar
Matija Obreza committed
115
116
117
	<c:if test="${faoInstitute.latitude ne null}">
		<div class="row" style="">
		<div class="col-sm-12">
118
			<div id="map" class="gis-map"></div>
119
120
121
			<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></span></span></span>
Matija Obreza's avatar
Matija Obreza committed
122
123
124
		</div>
		</div>
	</c:if>
125

Matija Obreza's avatar
Matija Obreza committed
126
127
128
129

	<%-- <h3>
		<spring:message code="faoInstitute.statistics" />
	</h3> --%>
igoshin's avatar
igoshin committed
130
131


Matija Obreza's avatar
Matija Obreza committed
132
	<div class="row" style="margin-top: 2em;">
Matija Obreza's avatar
Matija Obreza committed
133
		<%-- <c:if test="${statisticsCrop ne null}">
Matija Obreza's avatar
Matija Obreza committed
134
		<div class="col-sm-4">
135
			<h4><spring:message code="faoInstitute.stat-by-crop" arguments="${statisticsCrop.numberOfElements}" /></h4>
Matija Obreza's avatar
Matija Obreza committed
136
			<ul class="funny-list statistics">
137
				<c:forEach items="${statisticsCrop.content}" var="stat" varStatus="status">
138
					<li class="clearfix ${status.count % 2 == 0 ? 'even' : 'odd'}"><span class="stats-number"><fmt:formatNumber value="${stat[1]}" /></span> <a href="<c:url value="/wiews/${faoInstitute.code}/" />"><c:out value="${stat[0].getName(pageContext.response.locale)}" /></a></li>
139
				</c:forEach>
Matija Obreza's avatar
Matija Obreza committed
140
141
			</ul>
		</div>
Matija Obreza's avatar
Matija Obreza committed
142
		</c:if> --%>
Matija Obreza's avatar
Matija Obreza committed
143
		
Matija Obreza's avatar
Matija Obreza committed
144
		<div class="col-sm-6">
145
			<h4><spring:message code="faoInstitute.stat-by-genus" arguments="${statisticsGenus.numberOfElements}" /></h4>
146
			
Matija Obreza's avatar
Matija Obreza committed
147
148
149
			<div class="chart chart-pie">
				<div id="chartStatsByGenus" style="height:300px;"></div>
			</div>
150
			
Matija Obreza's avatar
Matija Obreza committed
151
			<ul class="funny-list statistics">
152
				<c:forEach items="${statisticsGenus.content}" var="stat" varStatus="status">
153
					<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]}" />"><c:out value="${stat[0]}" /></a></li>
Matija Obreza's avatar
Matija Obreza committed
154
155
156
157
				</c:forEach>
			</ul>
		</div>

Matija Obreza's avatar
Matija Obreza committed
158
		<div class="col-sm-6">
159
			<h4><spring:message code="faoInstitute.stat-by-species" arguments="${statisticsTaxonomy.numberOfElements}" /></h4>
160

Matija Obreza's avatar
Matija Obreza committed
161
162
163
			<div class="chart chart-pie">
				<div id="chartStatsBySpecies" style="height:300px"></div>
			</div>
164

Matija Obreza's avatar
Matija Obreza committed
165
			<ul class="funny-list statistics">
166
				<c:forEach items="${statisticsTaxonomy.content}" var="stat" varStatus="status">
167
					<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}" />"><c:out value="${stat[0].taxonName}" /></a></li>
Matija Obreza's avatar
Matija Obreza committed
168
169
170
				</c:forEach>
			</ul>
		</div>
171
				
Matija Obreza's avatar
Matija Obreza committed
172
173
174
	</div>


175
176
177
178
179
180
181
	<c:if test="${countByInstitute gt 0}">
		<form class="form-horizontal" method="post" action="/wiews/${faoInstitute.code}/dwca">
		<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
		<div class="row" style="margin-top: 2em;">
			<div class="col-sm-4">
				<button class="btn btn-primary" type="submit"><spring:message code="metadata.download-dwca" /></button>
			</div>
182
		</div>
183
184
		</form>
	</c:if>
185

186
<content tag="javascript">
Matija Obreza's avatar
Matija Obreza committed
187
		<c:if test="${faoInstitute.latitude ne null}">
Matija Obreza's avatar
Matija Obreza committed
188
189
		<script type="text/javascript">
			jQuery(document).ready(function() {
190
				var map=GenesysMaps.map("${pageContext.response.locale.language}", $("#map"), {
191
					minZoom: 4,
192
					maxZoom: 6, /* WIEWS does not provide enough detail */
193
					center: new GenesysMaps.LatLng(${faoInstitute.latitude}, ${faoInstitute.longitude}), 
Matija Obreza's avatar
Matija Obreza committed
194
195
196
197
198
199
					markerTitle: "<spring:escapeBody javaScriptEscape="true">${faoInstitute.fullName}</spring:escapeBody>",
					scrollWheelZoom: false,
					touchZoom: false,
					dragging: false,
					doubleClickZoom: false,
					boxZoom: false
Matija Obreza's avatar
Matija Obreza committed
200
201
				});
			});
Matija Obreza's avatar
Matija Obreza committed
202
203
204
205
		</script>
		</c:if>
		<script type="text/javascript">
			<%@include file="/WEB-INF/jsp/wiews/ga.jsp"%>
Matija Obreza's avatar
Matija Obreza committed
206
			_pageDim = { institute: '${faoInstitute.code}' };
Matija Obreza's avatar
Matija Obreza committed
207
		</script>
igoshin's avatar
igoshin committed
208
    <script>
209
        jQuery(document).ready(function () {
Matija Obreza's avatar
Matija Obreza committed
210
211
            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; });
igoshin's avatar
igoshin committed
212
213
        });
    </script>
214
</content>
Matija Obreza's avatar
Matija Obreza committed
215
216
</body>
</html>