view.jsp 4.84 KB
Newer Older
1
2
3
4
5
6
<!DOCTYPE html>

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

<html>
<head>
Matija Obreza's avatar
Matija Obreza committed
7
<title><spring:message code="metadata.page.view.title" /></title>
8
9
</head>
<body>
Matija Obreza's avatar
Styling    
Matija Obreza committed
10
	<h1>
Matija Obreza's avatar
Matija Obreza committed
11
		<c:out value="${metadata.title}" />
Matija Obreza's avatar
Styling    
Matija Obreza committed
12
	</h1>
Matija Obreza's avatar
Matija Obreza committed
13
	
Matija Obreza's avatar
Matija Obreza committed
14
15
16
17
18
19
20
	<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>
Matija Obreza's avatar
Matija Obreza committed
21
	</div>
Matija Obreza's avatar
Matija Obreza committed
22
23
	</div>

Matija Obreza's avatar
Styling    
Matija Obreza committed
24
25
26
	<c:if test="${page eq 1}">
		<table>
			<thead>
27
				<tr>
Matija Obreza's avatar
Styling    
Matija Obreza committed
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
					<td><spring:message code="ce.trait" /></td>
					<td><spring:message code="ce.method" /></td>
					<td><spring:message code="unit-of-measure" /></td>
					<td><spring:message code="method.fieldName" /></td>
			</thead>
			<tbody>
				<c:forEach items="${methods}" var="method">
					<tr>
						<td><a href="<c:url value="/descriptors/${method.parameter.id}" />"><c:out value="${method.parameter.title}" /></a></td>
						<td><a href="<c:url value="/descriptors/${method.parameter.id}/${method.id}" />"><c:out value="${method.method}" /></a></td>
						<td><c:out value="${method.unit}" /></td>
						<td><c:out value="${method.fieldName}" /></td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
Matija Obreza's avatar
Matija Obreza committed
44
		
Matija Obreza's avatar
Styling    
Matija Obreza committed
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
		<p>
			<c:out value="${metadata.description}" />
		</p>
		<p>
			<c:out value="${metadata.location}" />
		</p>
		<p>
			<c:out value="${metadata.citation}" />
		</p>
		<p>
			<c:out value="${metadata.SDate}" />
			<c:out value="${metadata.EDate}" />
		</p>
		<div>
			<c:out value="${metadata.description}" escapeXml="false" />
		</div>
61
62


63
		<div><a href="<c:url value="/data/view/${metadata.id}/dwca" />"><spring:message code="metadata.download-dwca" /></a></div>
Matija Obreza's avatar
Matija Obreza committed
64
65
66
67
68
69
70
71
72
73
74
		
		<c:if test="${faoInstitute ne null}">
		<p>
			<a class="" href="<c:url value="/wiews/${faoInstitute.code.toLowerCase()}" />"><b><c:out value="${faoInstitute.code}" /></b> <c:out value="${faoInstitute.fullName}" /></a> 
		</p>
		</c:if>
		
		<div class="audit-info">
			<c:if test="${metadata.lastModifiedBy ne null}"><spring:message code="audit.lastModifiedBy" arguments="${jspHelper.userFullName(metadata.lastModifiedBy)}" /></c:if>
			<fmt:formatDate value="${metadata.lastModifiedDate}" type="both" />
		</div>
Matija Obreza's avatar
Styling    
Matija Obreza committed
75
76
	</c:if>

Matija Obreza's avatar
Matija Obreza committed
77

Matija Obreza's avatar
Matija Obreza committed
78
	<div class="table-responsive">
Matija Obreza's avatar
Matija Obreza committed
79
	<table class="accessions wide-table">
80
81
		<thead>
			<tr>
Matija Obreza's avatar
Matija Obreza committed
82
				<td class="idx-col"></td>
Matija Obreza's avatar
Matija Obreza committed
83
				<c:if test="${selection ne null}">
Matija Obreza's avatar
Styling    
Matija Obreza committed
84
					<td />
Matija Obreza's avatar
Matija Obreza committed
85
				</c:if>
86
				<td><spring:message code="accession.accessionName" /></td>
Matija Obreza's avatar
Styling    
Matija Obreza committed
87
88
89
90
				<%-- 		<td><spring:message code="accession.origin" /></td>
		 --%>
				<td><spring:message code="accession.taxonomy" /></td>
				<%-- 			<td><spring:message code="accession.holdingInstitute" /></td>
91
				<td><spring:message code="accession.holdingCountry" /></td>
Matija Obreza's avatar
Styling    
Matija Obreza committed
92
93
	 --%>
				<c:forEach items="${methods}" var="method">
Matija Obreza's avatar
Matija Obreza committed
94
					<td><c:out value="${method.fieldName}" /> <c:if test="${method.unit ne null'}">[<c:out value="${method.unit}" />]</c:if></td>
Matija Obreza's avatar
Styling    
Matija Obreza committed
95
96
97
98
99
				</c:forEach>



			</tr>
100
101
		</thead>
		<tbody>
Matija Obreza's avatar
Matija Obreza committed
102
			<c:forEach items="${pagedData.content}" var="accession" varStatus="status">
Matija Obreza's avatar
Matija Obreza committed
103
				<tr class="acn ${status.count % 2 == 0 ? 'even' : 'odd'}">
Matija Obreza's avatar
Matija Obreza committed
104
					<td class="idx-col">${status.count + pagedData.size * pagedData.number}</td>
Matija Obreza's avatar
Matija Obreza committed
105
					<c:if test="${selection ne null}">
Matija Obreza's avatar
Styling    
Matija Obreza committed
106
						<td class="sel ${selection.containsId(accession.id) ? 'picked' : ''}" x-aid="${accession.id}"></td>
Matija Obreza's avatar
Matija Obreza committed
107
					</c:if>
108
					<td><a href="<c:url value="/acn/id/${accession.id}" />"><b><c:out value="${accession.accessionName}" /></b></a></td>
Matija Obreza's avatar
Matija Obreza committed
109
					<%-- 		<td><a href="<c:url value="/geo/${accession.origin.toLowerCase()}" />"><c:out value="${accession.countryOfOrigin.getName(pageContext.response.locale)}" /></a></td>
Matija Obreza's avatar
Styling    
Matija Obreza committed
110
111
112
			 --%>
					<td><c:out value="${accession.taxonomy.taxonName}" /></td>
					<%-- 	<td><a href="<c:url value="/wiews/${accession.institute.code.toLowerCase()}" />"><c:out value="${accession.institute.code}" /></a></td>
Matija Obreza's avatar
Matija Obreza committed
113
					<td><a href="<c:url value="/geo/${accession.institute.country.code3.toLowerCase()}" />"><c:out value="${accession.institute.country.getName(pageContext.response.locale)}" /></a></td>
114
				 --%>
Matija Obreza's avatar
Styling    
Matija Obreza committed
115
116
117

					<c:set value="${accessionMethods[accession.id]}" var="methodValues" />
					<c:forEach items="${methods}" var="method">
118
119
120
						<td><c:forEach items="${methodValues[method.id]}" var="methodValue">
							<c:out value="${method.coded ? method.decode(methodValue) : methodValue}" />
							</c:forEach></td>
Matija Obreza's avatar
Styling    
Matija Obreza committed
121
122
					</c:forEach>
				</tr>
123
124
125
			</c:forEach>
		</tbody>
	</table>
Matija Obreza's avatar
Matija Obreza committed
126
	</div>
Matija Obreza's avatar
Matija Obreza committed
127
	
128
<content tag="javascript">	
Matija Obreza's avatar
Matija Obreza committed
129
130
131
	<script type="text/javascript">
	<%@include file="/WEB-INF/jsp/wiews/ga.jsp"%>
	</script>
132
</content>
133
134
</body>
</html>