accessions.jsp 3.96 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"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>

<html>
<head>
<title><spring:message code="search.page.title" /></title>
</head>
<body>
	<h1><spring:message code="search.page.title" /></h1>
	
	<div class="main-col-header clearfix">
		<div class="nav-header">
Matija Obreza's avatar
Matija Obreza committed
15 16 17
			<div class="results"><spring:message code="paged.totalElements" arguments="${pagedData == null ? 0 : pagedData.totalElements}" /></div>
			<form method="get" action="search">
			<input type="hidden" name="q" value="<c:out value="${q}" />" />
18 19
			<div class="pagination">
				<spring:message code="paged.pageOfPages" arguments="${pagedData.number+1},${pagedData.totalPages}" />
Matija Obreza's avatar
Matija Obreza committed
20 21 22
				<a class="${pagedData.number eq 0 ? 'disabled' :''}" href="?q=<c:out value="${q}" />&amp;page=${pagedData.number eq 0 ? 1 : pagedData.number}"><spring:message code="pagination.previous-page" /></a>
				<input class="form-control" style="display: inline; max-width: 5em; text-align: center" type="text" name="page" placeholder="${pagedData.number + 1}" />
				<a href="?q=<c:out value="${q}" />&amp;page=${pagedData.number + 2}"><spring:message code="pagination.next-page" /></a>
23
			</div>
Matija Obreza's avatar
Matija Obreza committed
24
			</form>
25 26 27
		</div>
	</div>
	
Matija Obreza's avatar
Matija Obreza committed
28 29 30 31 32 33 34 35 36 37 38 39

	<c:if test="${error ne null}">
		<div class="alert alert-warning">
			<spring:message code="search.search-query-failed" arguments="${error.message}" />
		</div>
	</c:if>
	<c:if test="${pagedData eq null}">
		<div class="alert alert-warning">
			<spring:message code="search.search-query-missing" />
		</div>
	</c:if>
		
40 41 42
	<div class="applied-filters">
		<form class="" method="get" action="<c:url value="/acn/search" />">
			<div class="row">
Matija Obreza's avatar
Matija Obreza committed
43
				<div class="col-md-4"><input type="text" placeholder="<spring:message code="search.input.placeholder" />" name="q" class="form-control" value="<c:out value="${q}" />" /></div>
44 45 46 47 48 49 50 51 52 53
				<div class="col-md-2"><input type="submit" value="<spring:message code="search.button.label" />" class="btn" /></div>
			</div>
		</form>
	</div>

	<c:if test="${pagedData ne null and pagedData.totalElements gt 0}">
	<table class="accessions">
			<thead>
				<tr>
					<td class="idx-col"></td>
Matija Obreza's avatar
Matija Obreza committed
54
					<td />
55
					<td><spring:message code="accession.accessionName" /></td>
Matija Obreza's avatar
Matija Obreza committed
56
					<%--<td><spring:message code="accession.otherNames" /></td>--%>
57 58 59 60 61 62 63
					<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>
				</tr>
			</thead>
			<tbody>
Matija Obreza's avatar
Matija Obreza committed
64
				<c:forEach items="${pagedData.content}" var="accession" varStatus="status">
Matija Obreza's avatar
Matija Obreza committed
65
					<tr class="acn ${accession.historic ? 'historic-record' : ''}">
66
						<td class="idx-col">${status.count + pagedData.size * pagedData.number}</td>
Matija Obreza's avatar
Matija Obreza committed
67
						<td class="sel" x-aid="${accession.id}"></td>
68
						<td><a href="<c:url value="/acn/id/${accession.id}" />"><b>
Matija Obreza's avatar
Matija Obreza committed
69
							<c:out value="${accession.acceNumb}" />
70
						</b></a></td>
Matija Obreza's avatar
Matija Obreza committed
71 72 73 74 75
						<%-- <td><c:forEach items="${accession.aliases}" var="alias"><c:out value="${alias.name}" /> </c:forEach> --%>
						</td>
						<%-- <td><a href="<c:url value="/acn/t/${accession.taxonomy.genus}/${accession.taxonomy.species}" />"><c:out value="${accession.taxonomy.sciName}" /></a></td> --%>
						<td><c:out value="${accession.taxonomy.sciName}" /></td>
						<%-- <td class="notimportant"><a href="<c:url value="/geo/${accession.orgCty.iso3}" />"><c:out value="${accession.orgCty.name}" /></a></td> --%>
76
						<td class="notimportant"><c:out value="${jspHelper.getCountry(accession.orgCty.iso3).getName(pageContext.response.locale)}" /></td>
Matija Obreza's avatar
Matija Obreza committed
77
						<td class="notimportant"><spring:message code="accession.sampleStatus.${accession.sampStat}" /></td>
78
						<td class="notimportant"><a href="<c:url value="/wiews/${accession.institute.code}" />"><c:out value="${accession.institute.code}" /></a></td>
79 80 81 82 83 84 85
					</tr>
				</c:forEach>
			</tbody>
		</table>
	</c:if>
</body>
</html>