index.jsp 2.79 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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
<!DOCTYPE html>

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

<html>
<head>
<title><spring:message code="request.page.title" /></title>
</head>
<body>
	<h1>
		<spring:message code="request.page.title" />
	</h1>

	<c:if test="${pagedData == null}">
		<div class="alert alert-info">
			<spring:message code="selection.empty-list-warning" />
		</div>
	</c:if>

	<c:if test="${pagedData != null}">
		<div class="alert alert-info">
			<spring:message code="request.total-vs-available" arguments="${totalCount},${availableCount}" />
		</div>

		<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp"%>

		<div class="nav-header">
			<spring:message code="accessions.number" arguments="${pagedData.totalElements}" />
			<br />
			<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}"><spring:message code="pagination.previous-page" /></a> <a href="?page=${pagedData.number + 2}"><spring:message code="pagination.next-page" /></a>
		</div>

		<table class="accessions">
			<thead>
				<tr>
					<td class="idx-col"></td>
					<td><spring:message code="accession.availability" /></td>
					<td><spring:message code="accession.accessionName" /></td>
					<td class="notimportant"><spring:message code="accession.taxonomy" /></td>
					<%-- <td class="notimportant"><spring:message code="accession.origin" /></td> --%>
					<td><spring:message code="accession.holdingInstitute" /></td>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${pagedData.content}" var="accession" varStatus="status">
					<tr id="a${accession.id}" class="acn targeted ${status.count % 2 == 0 ? 'even' : 'odd'} ${accession.availability ? '' : 'not-available'}">
						<td class="idx-col">${status.count + pagedData.size * pagedData.number}</td>
						<td><spring:message code="accession.availability.${accession.availability}" /></td>
						<td><a href="<c:url value="/acn/id/${accession.id}" />"><b><c:out value="${accession.accessionName}" /></b></a></td>
						<td class="notimportant"><c:out value="${accession.taxonomy.taxonName}" /></td>
						<%-- <td class="notimportant"><c:out value="${accession.countryOfOrigin.getName(pageContext.response.locale)}" /></td> --%>
						<td class="notimportant"><a href="<c:url value="/wiews/${accession.institute.code.toLowerCase()}" />"><c:out value="${accession.institute.code}" /></a></td>
					</tr>
				</c:forEach>
			</tbody>
		</table>

		<c:if test="${availableCount gt 0}">
			<form method="post" action="<c:url value="/request/start" />" class="form-horizontal">
				<div class="form-actions">
					<input class="btn btn-primary" type="submit" value="<spring:message code="request.start-request" />" />
				</div>
			</form>
		</c:if>

	</c:if>
</body>
</html>