index.jsp 1.49 KB
Newer Older
Matija Obreza's avatar
Matija Obreza committed
1
2
<!DOCTYPE html>

Matija Obreza's avatar
Matija Obreza committed
3
<%@include file="/WEB-INF/jsp/init.jsp"%>
Matija Obreza's avatar
Matija Obreza committed
4
5
6

<html>
<head>
Matija Obreza's avatar
Styling  
Matija Obreza committed
7
<title><spring:message code="traits.page.title" /></title>
Matija Obreza's avatar
Matija Obreza committed
8
9
</head>
<body>
Matija Obreza's avatar
Styling  
Matija Obreza committed
10
11
12
13
14
15
	<h1>
		<spring:message code="trait-list" />
	</h1>

	<c:if test="${crop ne null}">
		<div>
16
			<spring:message code="filter.crop" />: <b><a href="<c:url value="/c/${crop.shortName}" />">${crop.getName(pageContext.response.locale)}</a></b>
Matija Obreza's avatar
Styling  
Matija Obreza committed
17
18
		</div>
	</c:if>
Matija Obreza's avatar
Matija Obreza committed
19
	<div class="nav-header">
Matija Obreza's avatar
Matija Obreza committed
20
		<spring:message code="paged.totalElements" arguments="${pagedData.totalElements}" />
Matija Obreza's avatar
Matija Obreza committed
21
		<br />
Matija Obreza's avatar
Matija Obreza committed
22
		<spring:message code="paged.pageOfPages" arguments="${pagedData.number+1},${pagedData.totalPages}" />
Matija Obreza's avatar
Matija Obreza committed
23
		<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>
Matija Obreza's avatar
Matija Obreza committed
24
25
26
27
28
29
30
31
32
33
34
	</div>

	<table class="accessions">
		<thead>
			<tr>
				<td class="idx-col" />
				<td>Trait</td>
				<td>Crop</td>
			</tr>
		</thead>
		<tbody>
Matija Obreza's avatar
Matija Obreza committed
35
			<c:forEach items="${pagedData.content}" var="trait" varStatus="status">
Matija Obreza's avatar
Matija Obreza committed
36
				<tr class="${status.count % 2 == 0 ? 'even' : 'odd'}">
Matija Obreza's avatar
Matija Obreza committed
37
					<td class="idx-col">${status.count + pagedData.size * pagedData.number}</td>
Matija Obreza's avatar
Matija Obreza committed
38
					<td><a href="<c:url value="/descriptors/${trait.id}" />">${trait.title}</a></td>
39
					<td><a href="<c:url value="/c/${trait.crop.shortName}" />">${trait.crop.getName(pageContext.response.locale)}</a></td>
Matija Obreza's avatar
Matija Obreza committed
40
41
42
43
				</tr>
			</c:forEach>
		</tbody>
	</table>
Matija Obreza's avatar
Matija Obreza committed
44
45
</body>
</html>