explore.jsp 5.25 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!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 class="main-col-header clearfix">
15
	<div class="nav-header">
16
		<c:if test="${pagedData.totalElements le 100000}">
17
18
19
20
21
22
23
24
25
26
		<form class="pull-right form-horizontal" method="post" action="/explore/dwca">
			<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
			<input type="hidden" name="crop" value="${crop.shortName}" />
			<input type="hidden" name="filter" value="<c:out value="${jsonFilter}" />" />
			<div class="row" style="margin-top: 2em;">
				<div class="col-sm-4">
					<button class="btn btn-default" type="submit"><spring:message code="filter.download-dwca" /></button>
				</div>
			</div>
		</form>
27
		</c:if>
28
29
30

		<div class="results"><spring:message code="accessions.number" arguments="${pagedData.totalElements}" />
		<a href="<c:url value="/explore/map"><c:param name="crop" value="${crop.shortName}" /><c:param name="filter">${jsonFilter}</c:param></c:url>">Map</a>
31
		</div> 
32
33
		<div class="pagination">
			<spring:message code="paged.pageOfPages" arguments="${pagedData.number+1},${pagedData.totalPages}" />
Matija Obreza's avatar
Matija Obreza committed
34
			<a href="<spring:url value=""><spring:param name="page" value="${pagedData.number eq 0 ? 1 : pagedData.number}" /><spring:param name="filter" value="${jsonFilter}" /><spring:param name="pick" value="${jsonPick}" /></spring:url>"><spring:message code="pagination.previous-page" /></a>
35
36
37
38
39
			<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>
		</div>
	</div>
	</div>
	
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
	<div class="applied-filters">	
		<c:if test="${filters ne null}">
			<c:forEach items="${filters.keySet()}" var="by">
				<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'}">
								<a href="<c:url value="/c/${filters[by].shortName}" />">${filters[by].getName(pageContext.response.locale)}</a>
							</c:when>
							<c:when test="${clazz eq 'Country'}">
								<a href="<c:url value="/geo/${filters[by].code3.toLowerCase()}" />"><c:out value="${filters[by].getName(pageContext.response.locale)}" /></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:when test="${clazz eq 'Organization'}">
								<a href="<c:url value="/org/${filters[by].slug}" />"><c:out value="${filters[by].title}" /></a>
							</c:when>
							<c:otherwise>
								${filters[by]}
							</c:otherwise>
						</c:choose>
					</b>
				</div>
				<c:remove var="clazz" />
			</c:forEach>
		</c:if>
Matija Obreza's avatar
Matija Obreza committed
71
72
		<a href="<spring:url value="/explore/filter"><spring:param name="crop" value="${crop.shortName}" /><spring:param name="filter" value="${jsonFilter}" /><spring:param name="pick" value="${jsonPick}" /></spring:url>"><spring:message code="filters.modify-filters" /></a>
	</div>
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108

	<table class="accessions">
		<thead>
			<tr>
				<td class="idx-col"></td>
				<td />
				<td><spring:message code="accession.accessionName" /></td>
				<td><spring:message code="accession.taxonomy" /></td>
				<td class="notimportant"><spring:message code="accession.origin" /></td>
				<td class="notimportant"><spring:message code="accession.sampleStatus" /></td>
				<td class="notimportant"><spring:message code="accession.holdingInstitute" /></td>
				<%-- 				<td><spring:message code="accession.holdingCountry" /></td>
 --%>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${pagedData.content}" var="accession" varStatus="status">
				<tr class="acn ${status.count % 2 == 0 ? 'even' : 'odd'}">
					<td class="idx-col">${status.count + pagedData.size * pagedData.number}</td>
					<td class="sel" x-aid="${accession.id}"></td>
					<td><a href="<c:url value="/acn/id/${accession.id}" />"><b><c:out value="${accession.accessionName}" /></b></a></td>
					<%-- <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> --%>
					<td class="notimportant"><c:out value="${accession.countryOfOrigin.getName(pageContext.response.locale)}" /></td>
					<td class="notimportant"><spring:message code="accession.sampleStatus.${accession.sampleStatus}" /></td>
					<td class="notimportant"><a href="<c:url value="/wiews/${accession.institute.code.toLowerCase()}" />"><c:out value="${accession.institute.code}" /></a></td>
					<%-- 			<td><a href="<c:url value="/geo/${accession.institute.country.code3.toLowerCase()}" />"><c:out value="${accession.institute.country.name}" /></a></td>
		 --%>
				</tr>
			</c:forEach>
		</tbody>
	</table>

</body>
</html>