details.jsp 5.66 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
<title><spring:message code="faoInstitutes.page.profile.title" arguments="${faoInstitute.fullName}" argumentSeparator="|" /></title>
Matija Obreza's avatar
Matija Obreza committed
8
9
</head>
<body>
Matija Obreza's avatar
Matija Obreza committed
10
	<h1>
Matija Obreza's avatar
Matija Obreza committed
11
		<img class="country-flag bigger" src="${cdnFlagsUrl}/${faoInstitute.country.code3.toUpperCase()}.png" />
Matija Obreza's avatar
Matija Obreza committed
12
		<c:out value="${faoInstitute.fullName}" />
Matija Obreza's avatar
Matija Obreza committed
13
		<small><c:out value="${faoInstitute.code}" /></small>
Matija Obreza's avatar
Matija Obreza committed
14
	</h1>
Matija Obreza's avatar
Matija Obreza committed
15

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

Matija Obreza's avatar
Matija Obreza committed
20
	<c:if test="${countByInstitute eq 0}">
Matija Obreza's avatar
Matija Obreza committed
21
		<div class="alert alert-info">
Matija Obreza's avatar
Matija Obreza committed
22
23
			<spring:message code="faoInstitute.no-accessions-registered" />
		</div>
Matija Obreza's avatar
Matija Obreza committed
24
25
	</c:if>

Matija Obreza's avatar
Matija Obreza committed
26
	<div class="jumbotron">
27
		<spring:message code="faoInstitutes.stat.accessionCount" arguments="${countByInstitute}" />
Matija Obreza's avatar
Matija Obreza committed
28
29
30
		<c:if test="${countByInstitute gt 0}">
			<a href="<c:url value="/wiews/${faoInstitute.code.toLowerCase()}/data" />"><spring:message code="view.accessions" /></a>
		</c:if>
31
	</div>
Matija Obreza's avatar
Matija Obreza committed
32
33
		
	<div class="">
34
35
36
37
38
39
40
		<security:authorize access="hasRole('ADMINISTRATOR')">
			<a href="<c:url value="/wiews/${faoInstitute.code.toLowerCase()}/edit" />" class="close">
				<spring:message code="edit" />
			</a>
		</security:authorize>

		<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp" %>
Matija Obreza's avatar
Matija Obreza committed
41
42
43
44
		
		<div class="row" style="">
		<div class="col-sm-4">
			<spring:message code="faoInstitute.country" />:
Matija Obreza's avatar
Matija Obreza committed
45
			<%-- <img src="${cdnFlagsUrl}/${faoInstitute.country.code3.toUpperCase()}.png" /> --%>
Matija Obreza's avatar
Matija Obreza committed
46
			<a href="<c:url value="/geo/${faoInstitute.country.code3.toLowerCase()}" />"><c:out value="${faoInstitute.country.getName(pageContext.response.locale)}" /></a>
Matija Obreza's avatar
Matija Obreza committed
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
		</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" />:
			<a href="<c:out value="${faoInstitute.url}" />"><c:out value="${faoInstitute.url}" /></a>
		</div>
		</div>
72
73
74
75
76
77
78
79
80
81
82
		
		<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">
				<a href="<c:url value="/org/${organization.slug}" />"><c:out value="${organization.title}" /></a>
			</c:forEach>
		</div>
		</div>
		</c:if>
Matija Obreza's avatar
Matija Obreza committed
83
84
	</div>

Matija Obreza's avatar
Matija Obreza committed
85
86
87
	<c:if test="${faoInstitute.latitude ne null}">
		<div class="row" style="">
		<div class="col-sm-12">
Matija Obreza's avatar
Matija Obreza committed
88
			<div id="map" class="gis-map"><spring:message code="maps.loading-map" /></div>
Matija Obreza's avatar
Matija Obreza committed
89
90
91
		</div>
		</div>
	</c:if>
92

Matija Obreza's avatar
Matija Obreza committed
93
94
95
96
97
98
99

	<%-- <h3>
		<spring:message code="faoInstitute.statistics" />
	</h3> --%>
	

	<div class="row" style="margin-top: 2em;">
Matija Obreza's avatar
Matija Obreza committed
100
		<%-- <c:if test="${statisticsCrop ne null}">
Matija Obreza's avatar
Matija Obreza committed
101
		<div class="col-sm-4">
102
			<h4><spring:message code="faoInstitute.stat-by-crop" arguments="${statisticsCrop.numberOfElements}" /></h4>
Matija Obreza's avatar
Matija Obreza committed
103
			<ul class="funny-list statistics">
104
105
106
				<c:forEach items="${statisticsCrop.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 href="<c:url value="/wiews/${faoInstitute.code.toLowerCase()}/" />"><c:out value="${stat[0].getName(pageContext.response.locale)}" /></a></li>
				</c:forEach>
Matija Obreza's avatar
Matija Obreza committed
107
108
			</ul>
		</div>
Matija Obreza's avatar
Matija Obreza committed
109
		</c:if> --%>
Matija Obreza's avatar
Matija Obreza committed
110
		
Matija Obreza's avatar
Matija Obreza committed
111
		<div class="col-sm-6">
112
			<h4><spring:message code="faoInstitute.stat-by-genus" arguments="${statisticsGenus.numberOfElements}" /></h4>
Matija Obreza's avatar
Matija Obreza committed
113
			<ul class="funny-list statistics">
114
				<c:forEach items="${statisticsGenus.content}" var="stat" varStatus="status">
Matija Obreza's avatar
Matija Obreza committed
115
					<li class="clearfix ${status.count % 2 == 0 ? 'even' : 'odd'}"><span class="stats-number"><fmt:formatNumber value="${stat[1]}" /></span> <c:out value="${stat[0]}" /></li>
Matija Obreza's avatar
Matija Obreza committed
116
117
118
119
				</c:forEach>
			</ul>
		</div>

Matija Obreza's avatar
Matija Obreza committed
120
		<div class="col-sm-6">
121
			<h4><spring:message code="faoInstitute.stat-by-species" arguments="${statisticsTaxonomy.numberOfElements}" /></h4>
Matija Obreza's avatar
Matija Obreza committed
122
			<ul class="funny-list statistics">
123
				<c:forEach items="${statisticsTaxonomy.content}" var="stat" varStatus="status">
Matija Obreza's avatar
Matija Obreza committed
124
					<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.toLowerCase()}/t/${stat[0].genus}/${stat[0].species}" />"><c:out value="${stat[0].taxonName}" /></a></li>
Matija Obreza's avatar
Matija Obreza committed
125
126
127
				</c:forEach>
			</ul>
		</div>
Matija Obreza's avatar
Matija Obreza committed
128
		
Matija Obreza's avatar
Matija Obreza committed
129
130
131
	</div>


Matija Obreza's avatar
Matija Obreza committed
132
133
134
	<c:if test="${faoInstitute.latitude ne null}">
		<script type="text/javascript">
			jQuery(document).ready(function() {
135
136
				var map=GoogleMaps.map("${pageContext.response.locale.language}", $("#map"), {
					maxZoom: 6, /* WIEWS does not provide enough detail */
Matija Obreza's avatar
Matija Obreza committed
137
138
139
140
					center: new GoogleMaps.LatLng(${faoInstitute.latitude}, ${faoInstitute.longitude}), 
					markerTitle: "<spring:escapeBody javaScriptEscape="true">${faoInstitute.fullName}</spring:escapeBody>" 
				});
			});
Matija Obreza's avatar
Matija Obreza committed
141
			<%-- // FIXME Testing GA for IRRI --%>
Matija Obreza's avatar
GA typo    
Matija Obreza committed
142
			<c:if test="${faoInstitute.code=='PHL001'}">
Matija Obreza's avatar
Matija Obreza committed
143
144
			_pageTrackers=["UA-45878088-1"];
			</c:if>
Matija Obreza's avatar
Matija Obreza committed
145
			_pageDim = { institute: '${faoInstitute.code}' };
Matija Obreza's avatar
Matija Obreza committed
146
147
148
		</script>
	</c:if>

Matija Obreza's avatar
Matija Obreza committed
149
150
</body>
</html>