data.jsp 3.36 KB
Newer Older
Matija Obreza's avatar
Matija Obreza committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!DOCTYPE html>

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

<html>
<head>
<title><spring:message code="accession.page.data.title" /></title>
</head>
<body>
	<h1>
		<spring:message code="accession.page.data.title" />
	</h1>
	
<%-- 	<div>
		<a href="<c:url value="/geo/${faoInstitute.country.code3.toLowerCase()}" />"><c:out value="${faoInstitute.country.name}" /></a>
	</div> --%>
	
	<c:if test="${filters ne null}">
		<c:forEach items="${filters.keySet()}" var="by">
Matija Obreza's avatar
Matija Obreza committed
20
21
22
23
24
25
26
27
			<c:set value="${filters[by].getClass().simpleName}" var="clazz" />
			<div><spring:message code="${by}" />:
				<b>
					<c:choose>
						<c:when test="${clazz eq 'Taxonomy'}">
							${filters[by].taxonName}
						</c:when>
						<c:when test="${clazz eq 'Crop'}">
Matija Obreza's avatar
Matija Obreza committed
28
							<a href="<c:url value="/c/${filters[by].shortName}" />">${filters[by].name}</a>
Matija Obreza's avatar
Matija Obreza committed
29
30
31
32
33
34
35
36
37
38
39
40
						</c:when>
						<c:when test="${clazz eq 'Country'}">
							<a href="<c:url value="/geo/${filters[by].code3.toLowerCase()}" />"><c:out value="${filters[by].name}" /></a>
						</c:when>
						<c:when test="${clazz eq 'FaoInstitute'}">
							<a href="<c:url value="/wiews/${filters[by].code.toLowerCase()}" />"><c:out value="${filters[by].fullName}" /></a>
						</c:when>
						<c:otherwise>
							${filters[by]}
						</c:otherwise>
					</c:choose>
				</b>
41
			</div>
Matija Obreza's avatar
Matija Obreza committed
42
			<c:remove var="clazz" />
Matija Obreza's avatar
Matija Obreza committed
43
44
45
46
47
		</c:forEach>
	</c:if>
	
	
	<div class="nav-header">
Matija Obreza's avatar
Matija Obreza committed
48
		<spring:message code="accessions.number" arguments="${pagedData.totalElements}" />
Matija Obreza's avatar
Matija Obreza committed
49
		<br />
Matija Obreza's avatar
Matija Obreza committed
50
51
52
		<spring:message code="paged.pageOfPages" arguments="${pagedData.number+1},${pagedData.totalPages}" />
		<a class="${pagedData.number eq 0 ? 'disabled' :''}" href="?page=${pagedData.number eq 0 ? 1 : pagedData.number}">⇇ Previous</a>
		<a href="?page=${pagedData.number + 2}">Next ⇉</a>
Matija Obreza's avatar
Matija Obreza committed
53
54
	</div>

Matija Obreza's avatar
Updates    
Matija Obreza committed
55
	<table class="accessions">
Matija Obreza's avatar
Matija Obreza committed
56
57
58
		<thead>
			<tr>
				<td class="idx-col"></td>
Matija Obreza's avatar
Updates    
Matija Obreza committed
59
60
61
				<c:if test="${selection ne null}">
				<td />
				</c:if>
Matija Obreza's avatar
Matija Obreza committed
62
63
				<td><spring:message code="accession.accessionName" /></td>
				<td><spring:message code="accession.taxonomy" /></td>
Matija Obreza's avatar
Matija Obreza committed
64
				<td><spring:message code="accession.origin" /></td>
Matija Obreza's avatar
Matija Obreza committed
65
				<td><spring:message code="accession.holdingInstitute" /></td>
Matija Obreza's avatar
Matija Obreza committed
66
67
<%-- 				<td><spring:message code="accession.holdingCountry" /></td>
 --%>			</tr>
Matija Obreza's avatar
Matija Obreza committed
68
69
		</thead>
		<tbody>
Matija Obreza's avatar
Matija Obreza committed
70
			<c:forEach items="${pagedData.content}" var="accession" varStatus="status">
Matija Obreza's avatar
Updates    
Matija Obreza committed
71
				<tr class="acn ${status.count % 2 == 0 ? 'even' : 'odd'}">
Matija Obreza's avatar
Matija Obreza committed
72
					<td class="idx-col">${status.count + pagedData.size * pagedData.number}</td>
Matija Obreza's avatar
Updates    
Matija Obreza committed
73
					<c:if test="${selection ne null}">
Matija Obreza's avatar
Matija Obreza committed
74
					<td class="sel ${selection.containsId(accession.id) ? 'picked' : ''}" x-aid="${accession.id}"></td>
Matija Obreza's avatar
Updates    
Matija Obreza committed
75
					</c:if>
Matija Obreza's avatar
Matija Obreza committed
76
					<td><a href="<c:url value="/acn/id/${accession.id}" />"><b><c:out value="${accession.accessionName}" /></b></a></td>
Matija Obreza's avatar
Matija Obreza committed
77
					<td><a href="<c:url value="/acn/t/${accession.taxonomy.genus}/${accession.taxonomy.species}" />"><c:out value="${accession.taxonomy.taxonName}" /></a></td>
Matija Obreza's avatar
Matija Obreza committed
78
					<td><a href="<c:url value="/geo/${accession.origin.toLowerCase()}" />"><c:out value="${accession.countryOfOrigin.name}" /></a></td>
Matija Obreza's avatar
Matija Obreza committed
79
					<td><a href="<c:url value="/wiews/${accession.institute.code.toLowerCase()}" />"><c:out value="${accession.institute.code}" /></a></td>
Matija Obreza's avatar
Matija Obreza committed
80
81
		<%-- 			<td><a href="<c:url value="/geo/${accession.institute.country.code3.toLowerCase()}" />"><c:out value="${accession.institute.country.name}" /></a></td>
		 --%>		</tr>
Matija Obreza's avatar
Matija Obreza committed
82
83
84
85
86
87
88
			</c:forEach>
		</tbody>
	</table>


</body>
</html>