index.jsp 1.77 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
	<h1>
		<spring:message code="trait-list" />
	</h1>

14
15
16
17
18
19
20
21
22
23
	<div class="main-col-header clearfix">
	<div class="nav-header pull-left">
		<div class="results"><spring:message code="paged.totalElements" arguments="${pagedData.totalElements}" /></div>
		<div class="pagination">
			<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>
	</div>
	</div>
	
Matija Obreza's avatar
Styling    
Matija Obreza committed
24
	<c:if test="${crop ne null}">
25
		<div class="applied-filters">
26
			<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
27
28
		</div>
	</c:if>
Matija Obreza's avatar
Matija Obreza committed
29
30
31
32
33
34
35

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