index.jsp 3.42 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
<!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>

14 15 16
	<gui:alert type="info" display="${pagedData == null}">
		<spring:message code="selection.empty-list-warning" />
	</gui:alert>
17 18

	<c:if test="${pagedData != null}">
19 20 21 22 23 24 25 26 27 28 29 30 31
	
		<div class="main-col-header clearfix">
		<div class="nav-header pull-left">
			<div class="results"><spring:message code="accessions.number" arguments="${pagedData.totalElements}" /></div>
			<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>
				<a href="<spring:url value=""><spring:param name="page" value="${pagedData.number+2}" /><spring:param name="filter" value="${jsonFilter}" /></spring:url>"><spring:message code="pagination.next-page" /></a>
			</div>
		</div>
		</div>
	
	
32
		<gui:alert type="info">
33
			<spring:message code="request.total-vs-available" arguments="${totalCount},${availableCount}" />
34
		</gui:alert>
35 36 37 38 39 40 41 42

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

		<table class="accessions">
			<thead>
				<tr>
					<td class="idx-col"></td>
					<td><spring:message code="accession.availability" /></td>
Matija Obreza's avatar
Matija Obreza committed
43
					<td><spring:message code="accession.historic" /></td>
44 45 46 47 48 49 50 51
					<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">
Matija Obreza's avatar
Matija Obreza committed
52
					<tr id="a${accession.id}" class="acn targeted ${status.count % 2 == 0 ? 'even' : 'odd'} ${accession.availability!=false and accession.institute.allowMaterialRequests ? '' : 'not-available'} ${accession.historic ? 'historic-record' : ''}">
53 54
						<td class="idx-col">${status.count + pagedData.size * pagedData.number}</td>
						<td><spring:message code="accession.availability.${accession.availability}" /></td>
Matija Obreza's avatar
Matija Obreza committed
55
						<td><spring:message code="accession.historic.${accession.historic}" /></td>
56 57 58
						<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> --%>
59
						<td class="notimportant"><a href="<c:url value="/wiews/${accession.institute.code}" />"><c:out value="${accession.institute.code}" /></a></td>
60 61 62 63 64 65 66 67 68 69
					</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>
Nick Martynenko's avatar
CSRF  
Nick Martynenko committed
70 71
                <!-- CSRF protection -->
                <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
72 73 74 75 76 77
			</form>
		</c:if>

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