data.jsp 4.89 KB
Newer Older
Matija Obreza's avatar
Matija Obreza committed
1
2
3
4
5
6
7
8
9
10
11
12
<!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>
Matija Obreza's avatar
Matija Obreza committed
13

Matija Obreza's avatar
Matija Obreza committed
14
15
	<div class="main-col-header clearfix">
	<div class="nav-header pull-left">
16
17
		<div class="results"><spring:message code="accessions.number" arguments="${pagedData.totalElements}" />
		<a href="<c:url value="/explore/map"><c:param name="filter">${jsonFilter}</c:param></c:url>">Map</a></div> 
Matija Obreza's avatar
Matija Obreza committed
18
19
20
		<div class="pagination">
			<spring:message code="paged.pageOfPages" arguments="${pagedData.number+1},${pagedData.totalPages}" />
			<a href="<spring:url value=""><spring:param name="page" value="${pagedData.number eq 0 ? 1 : pagedData.number}" /><spring:param name="filter" value="${jsonFilter}" /></spring:url>"><spring:message code="pagination.previous-page" /></a>
21
			<a href="<spring:url value=""><spring:param name="page" value="${pagedData.number+2}" /><spring:param name="filter" value="${jsonFilter}" /><spring:param name="pick" value="${jsonPick}" /></spring:url>"><spring:message code="pagination.next-page" /></a>
Matija Obreza's avatar
Matija Obreza committed
22
23
24
25
26
27
		</div>
	</div>
	</div>
	
	<c:if test="${filters eq null and jsonFilter ne null}">
		<div class="applied-filters">
28
			<spring:message code="filters.data-is-filtered" />
29
			<a href="<spring:url value="/explore/filter"><spring:param name="filter" value="${jsonFilter}" /><spring:param name="pick" value="${jsonPick}" /></spring:url>"><spring:message code="filters.modify-filters" /></a>
30
31
		</div>
	</c:if>
Matija Obreza's avatar
Matija Obreza committed
32

Matija Obreza's avatar
Matija Obreza committed
33
	<c:if test="${filters ne null}">
Matija Obreza's avatar
Matija Obreza committed
34
		<div class="applied-filters">	
Matija Obreza's avatar
Matija Obreza committed
35
		<c:forEach items="${filters.keySet()}" var="by">
Matija Obreza's avatar
Matija Obreza committed
36
			<c:set value="${filters[by].getClass().simpleName}" var="clazz" />
Matija Obreza's avatar
Matija Obreza committed
37
			<div>
Matija Obreza's avatar
Matija Obreza committed
38
39
				<spring:message code="${by}" />: <b>
					<c:choose>
Matija Obreza's avatar
Matija Obreza committed
40
41
42
43
						<c:when test="${clazz eq 'Taxonomy'}">
							${filters[by].taxonName}
						</c:when>
						<c:when test="${clazz eq 'Crop'}">
44
							<a href="<c:url value="/c/${filters[by].shortName}" />">${filters[by].getName(pageContext.response.locale)}</a>
Matija Obreza's avatar
Matija Obreza committed
45
46
						</c:when>
						<c:when test="${clazz eq 'Country'}">
Matija Obreza's avatar
Matija Obreza committed
47
							<a href="<c:url value="/geo/${filters[by].code3.toLowerCase()}" />"><c:out value="${filters[by].getName(pageContext.response.locale)}" /></a>
Matija Obreza's avatar
Matija Obreza committed
48
49
50
51
						</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>
Matija Obreza's avatar
Matija Obreza committed
52
53
54
						<c:when test="${clazz eq 'Organization'}">
							<a href="<c:url value="/org/${filters[by].slug}" />"><c:out value="${filters[by].title}" /></a>
						</c:when>
Matija Obreza's avatar
Matija Obreza committed
55
56
57
58
59
						<c:otherwise>
							${filters[by]}
						</c:otherwise>
					</c:choose>
				</b>
60
			</div>
Matija Obreza's avatar
Matija Obreza committed
61
			<c:remove var="clazz" />
Matija Obreza's avatar
Matija Obreza committed
62
		</c:forEach>
63
			<a href="<spring:url value="/explore/filter"><spring:param name="filter" value="${jsonFilter}" /><spring:param name="pick" value="${jsonPick}" /></spring:url>"><spring:message code="filters.modify-filters" /></a>
Matija Obreza's avatar
Matija Obreza committed
64
		</div>
Matija Obreza's avatar
Matija Obreza committed
65
66
	</c:if>

Matija Obreza's avatar
Updates    
Matija Obreza committed
67
	<table class="accessions">
Matija Obreza's avatar
Matija Obreza committed
68
69
70
		<thead>
			<tr>
				<td class="idx-col"></td>
Matija Obreza's avatar
Matija Obreza committed
71
				<td />
Matija Obreza's avatar
Matija Obreza committed
72
73
				<td><spring:message code="accession.accessionName" /></td>
				<td><spring:message code="accession.taxonomy" /></td>
74
				<td class="notimportant"><spring:message code="accession.origin" /></td>
Matija Obreza's avatar
Matija Obreza committed
75
				<td class="notimportant"><spring:message code="accession.sampleStatus" /></td>
76
				<td class="notimportant"><spring:message code="accession.holdingInstitute" /></td>
Matija Obreza's avatar
Matija Obreza committed
77
78
79
				<%-- 				<td><spring:message code="accession.holdingCountry" /></td>
 --%>
			</tr>
Matija Obreza's avatar
Matija Obreza committed
80
81
		</thead>
		<tbody>
Matija Obreza's avatar
Matija Obreza committed
82
			<c:forEach items="${pagedData.content}" var="accession" varStatus="status">
Matija Obreza's avatar
Updates    
Matija Obreza committed
83
				<tr class="acn ${status.count % 2 == 0 ? 'even' : 'odd'}">
Matija Obreza's avatar
Matija Obreza committed
84
					<td class="idx-col">${status.count + pagedData.size * pagedData.number}</td>
Matija Obreza's avatar
Matija Obreza committed
85
					<td class="sel" x-aid="${accession.id}"></td>
Matija Obreza's avatar
Matija Obreza committed
86
					<td><a href="<c:url value="/acn/id/${accession.id}" />"><b><c:out value="${accession.accessionName}" /></b></a></td>
87
88
89
					<%-- <td><a href="<c:url value="/acn/t/${accession.taxonomy.genus}/${accession.taxonomy.species}" />"><c:out value="${accession.taxonomy.taxonName}" /></a></td> --%>
					<td><c:out value="${accession.taxonomy.taxonName}" /></td>
					<%-- <td class="notimportant"><a href="<c:url value="/geo/${accession.origin.toLowerCase()}" />"><c:out value="${accession.countryOfOrigin.name}" /></a></td> --%>
Matija Obreza's avatar
Matija Obreza committed
90
					<td class="notimportant"><c:out value="${accession.countryOfOrigin.getName(pageContext.response.locale)}" /></td>
Matija Obreza's avatar
Matija Obreza committed
91
					<td class="notimportant"><spring:message code="accession.sampleStatus.${accession.sampleStatus}" /></td>
92
					<td class="notimportant"><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
93
94
95
					<%-- 			<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
96
97
98
99
100
101
			</c:forEach>
		</tbody>
	</table>

</body>
</html>