details.jsp 4.69 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="country.page.profile.title" arguments="${country.getName(pageContext.response.locale)}" argumentSeparator="|" /></title>
8 9

<local:content-headers description="${jspHelper.htmlToText(blurp.summary, 150)}" title="${country.getName(pageContext.response.locale)}" />
Matija Obreza's avatar
Matija Obreza committed
10 11
</head>
<body>
Matija Obreza's avatar
Matija Obreza committed
12
	<h1>
Matija Obreza's avatar
Matija Obreza committed
13
		<c:out value="${country.getName(pageContext.response.locale)}" />
Matija Obreza's avatar
Matija Obreza committed
14
		<img class="country-flag bigger" src="<c:url value="${cdnFlagsUrl}" />/${country.code3.toUpperCase()}.svg" />
Matija Obreza's avatar
Matija Obreza committed
15
	</h1>
Matija Obreza's avatar
Matija Obreza committed
16 17

	<c:if test="${not country.current}">
Matija Obreza's avatar
Matija Obreza committed
18
		<div class="alert alert-info">
19
			<spring:message code="country.page.not-current" />
20 21
			<c:if test="${country.replacedBy != null}">
				<spring:message code="country.replaced-by" arguments="${country.replacedBy.code3}" />
22
				<a href="${country.replacedBy.code3}"><c:out value="${country.replacedBy.getName(pageContext.response.locale)}" /></a>
23
			</c:if>	
24 25
		</div>
	</c:if>
26
	
Matija Obreza's avatar
Matija Obreza committed
27
	<div class="jumbotron">
Matija Obreza's avatar
Matija Obreza committed
28 29
		<spring:message code="country.stat.countByOrigin" arguments="${countByOrigin}" />
		<c:if test="${countByOrigin gt 0}">
30
			<a href="<c:url value="/geo/${country.code3}/data" />"><spring:message code="view.accessions" /></a>
31
			<a href="<c:url value="/geo/${country.code3}/overview" />"><spring:message code="data-overview.short" /></a>
Matija Obreza's avatar
Matija Obreza committed
32 33
		</c:if>
	</div>
34 35

	<security:authorize access="hasRole('ADMINISTRATOR')">
36
		<a href="<c:url value="/geo/${country.code3}/edit" />" class="close"> <spring:message code="edit" />
37 38 39 40
		</a>
	</security:authorize>

	<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp"%>
Matija Obreza's avatar
Matija Obreza committed
41

Matija Obreza's avatar
Matija Obreza committed
42 43 44 45 46 47
	<c:if test="${itpgrfa != null and itpgrfa.contractingParty=='Yes'}">
		<div class="alert alert-info">
			<spring:message code="country.is-itpgrfa-contractingParty" arguments="${country.getName(pageContext.response.locale)}" argumentSeparator="|" />
		</div>
	</c:if>

Matija Obreza's avatar
Matija Obreza committed
48
	<div>
49 50 51 52
		ISO-3166 3-alpha:
		<c:out value="${country.code3}" />
		<br /> ISO-3166 2-alpha:
		<c:out value="${country.code2}" />
Matija Obreza's avatar
Matija Obreza committed
53
	</div>
Matija Obreza's avatar
Matija Obreza committed
54 55 56 57 58 59
	<c:if test="${country.wikiLink ne null}">
		<div>
			<spring:message code="country.more-information" />
			<a target="_blank" rel="nofollow" href="<c:out value="${country.wikiLink}" />"><c:out value="${country.wikiLink}" /></a>
		</div>
	</c:if>
Matija Obreza's avatar
Matija Obreza committed
60
	
61 62 63 64 65 66 67

	<%-- Show map? --%>
	<c:forEach items="${genesysInstitutes}" var="faoInstitute" varStatus="status">
		<c:if test="${faoInstitute.latitude ne null and faoInstitute.longitude ne null}">
			<c:set value="true" var="showMap" />
		</c:if>
	</c:forEach>
68
	<c:if test="${showMap!=null && showMap}">
69 70 71 72 73 74 75 76
		<div class="row" style="">
		<div class="col-sm-12">
			<div id="map" class="gis-map"></div>
		</div>
		</div>
	</c:if>
	
	
77
	<%-- 	<h3>
78 79
		<spring:message code="country.statistics" />
	</h3>
Matija Obreza's avatar
Matija Obreza committed
80
 --%>
81 82 83
	<h3>
		<spring:message code="country.stat.countByLocation" arguments="${countByLocation}" />
	</h3>
Matija Obreza's avatar
Matija Obreza committed
84
	<ul class="funny-list">
85
		<c:forEach items="${genesysInstitutes}" var="faoInstitute" varStatus="status">
86
			<li class="clearfix ${status.count % 2 == 0 ? 'even' : 'odd'}"><a class="show pull-left" href="<c:url value="/wiews/${faoInstitute.code}" />"><b><c:out value="${faoInstitute.code}" /></b> <c:out value="${faoInstitute.fullName}" /></a>
87 88 89
				<div class="pull-right">
					<spring:message code="faoInstitute.accessionCount" arguments="${faoInstitute.accessionCount}" />
				</div></li>
90 91
		</c:forEach>
	</ul>
92

93
	<h4>
Matija Obreza's avatar
Matija Obreza committed
94
		<spring:message code="country.page.faoInstitutes" arguments="${faoInstitutes.size()}" />
95
	</h4>
Matija Obreza's avatar
Matija Obreza committed
96

Matija Obreza's avatar
Matija Obreza committed
97
	<ul class="funny-list">
Matija Obreza's avatar
Matija Obreza committed
98
		<c:forEach items="${faoInstitutes}" var="faoInstitute" varStatus="status">
99
			<li class="${status.count % 2 == 0 ? 'even' : 'odd'}"><a class="show" href="<c:url value="/wiews/${faoInstitute.code}" />"><b><c:out value="${faoInstitute.code}" /></b> <c:out value="${faoInstitute.fullName}" /></a></li>
Matija Obreza's avatar
Matija Obreza committed
100 101
		</c:forEach>
	</ul>
102

103

104
<c:if test="${showMap!=null and showMap}">
105 106 107 108 109 110 111 112 113 114 115 116
<content tag="javascript">
	<script type="text/javascript">
		jQuery(document).ready(function() {
			var map=GenesysMaps.map("${pageContext.response.locale.language}", $("#map"), {
				maxZoom: 6, /* WIEWS does not provide enough detail */
				zoom: 6
			}, function (opts, map) {
				var bounds=new GenesysMaps.BoundingBox();
				var marker;
				<c:forEach items="${genesysInstitutes}" var="faoInstitute" varStatus="status">
				<c:if test="${faoInstitute.latitude ne null and faoInstitute.longitude ne null}">
				marker = L.marker([${faoInstitute.latitude}, ${faoInstitute.longitude}]).addTo(map);
117
				marker.bindPopup("<a href='<c:url value="/wiews/${faoInstitute.code}" />'>${faoInstitute.fullName}</a>");
118 119 120 121 122 123 124 125 126 127
				bounds.add([${faoInstitute.latitude}, ${faoInstitute.longitude}]);
				</c:if>
				</c:forEach>
				map.fitBounds(bounds.getBounds());
			});
		});
	</script>
</content>
</c:if>

Matija Obreza's avatar
Matija Obreza committed
128 129
</body>
</html>