overview.jsp 10.1 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"%>

<html>
<head>
<title><spring:message code="data-overview" /></title>
</head>
<body>
	<h1>
		<spring:message code="data-overview" />
	</h1>

	<div class="main-col-header clearfix">
15
16
17
18
19
20
21
		<div class="row">
			<div class="col-xs-9 pull-right text-right">
				<a class="btn btn-default" href="<c:url value="/explore"><c:param name="filter" value="${jsonFilter}" /></c:url>"><span class="glyphicon glyphicon-eye-open"></span><span style="margin-left: 0.5em;"><spring:message code="view.accessions" /></span></a>
				<a class="btn btn-default" href="<c:url value="/explore/map"><c:param name="filter" value="${jsonFilter}" /></c:url>"><span class="glyphicon glyphicon-globe"></span><span style="margin-left: 0.5em;"><spring:message code="maps.view-map" /></span></a>
			</div>
			<div class="col-xs-3 results">
				<a class="btn btn-default" href="javascript: window.history.go(-1);"><spring:message code="navigate.back" /></a>
22
23
24
25
			</div>
		</div>
	</div>
	
26
27
28
29
30
31
	<c:if test="${fn:length(currentFilters) gt 0}">
	<div id="allfilters" class="disabled applied-filters">
		<%-- Only render currently present filters --%>
        <c:forEach items="${currentFilters}" var="filter">

            <c:set var="normalizedKey" value="${filter.key.replace('.', '-').replace(':', '_')}"/>
32
            <c:set var="appliedFilter" value="${appliedFilters.get(filter.key)}" />
33
34
35
36
37
38
39
40
41
42
43
44
45
46

            <div class="clearfix filter-block" id="<c:out value="${normalizedKey}" />_filter" norm-key="<c:out value="${normalizedKey}" />" i-key="<c:out value="${filter.key}" />">
                <div class="col-lg-3 edit-fil">
                    <c:if test="${not filter.core}">
                        <c:out value="${filter.title}" />
                        <%-- <a href="<c:url value="/descriptors/${filter.key}" />"> --%>
                    </c:if>

                    <c:if test="${filter.core}">
						<spring:message code="filter.${filter.key}" />
                    </c:if>
                </div>
                <div class="col-lg-9">
                	<div class="filter-values" id="<c:out value="${normalizedKey}" />_value">
47
48
49
50
                		<c:if test="${appliedFilter.inverse}">
                			<spring:message code="filter.inverse" />
                		</c:if>
	                    <c:forEach items="${filters[appliedFilter.key]}" var="value">
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
	                        <c:set var="string" value="${value}"/>
	                        <c:if test="${fn:contains(value, 'range')}">
	                            <c:set var="string" value="${fn:replace(value,'{range=[','Between ')}"/>
	                            <c:set var="string" value="${fn:replace(string,',',' and ')}"/>
	                            <c:set var="string" value="${fn:replace(string,']}','')}"/>
                                <c:set var="value" value="${fn:replace(value,'{','{\"')}"/>
                                <c:set var="value" value="${fn:replace(value,'=','\":')}"/>
	                        </c:if>
	                        <c:if test="${fn:contains(value, 'min')}">
	                            <c:set var="string" value="${fn:replace(value,'{min=','More than ')}"/>
	                            <c:set var="string" value="${fn:replace(string,'}','')}"/>
                                <c:set var="value" value="${fn:replace(value,'{','{\"')}"/>
                                <c:set var="value" value="${fn:replace(value,'=','\":')}"/>
	                        </c:if>
	                        <c:if test="${fn:contains(value, 'max')}">
	                            <c:set var="string" value="${fn:replace(value,'{max=','Less than ')}"/>
	                            <c:set var="string" value="${fn:replace(string,'}','')}"/>
                                <c:set var="value" value="${fn:replace(value,'{','{\"')}"/>
                                <c:set var="value" value="${fn:replace(value,'=','\":')}"/>
	                        </c:if>
                            <c:if test="${fn:contains(value, 'like')}">
                                <c:set var="string" value="${fn:replace(value,'{like=','Like ')}"/>
                                <c:set var="string" value="${fn:replace(string,'}','')}"/>
                                <c:set var="value" value="${fn:replace(value,'{','{\"')}"/>
                                <c:set var="value" value="${fn:replace(value,'=','\":\"')}"/>
                                <c:set var="value" value="${fn:replace(value,'}','\"}')}"/>
                            </c:if>

	                        <c:if test="${string==null}">
	                        	<c:set var="string" value="null" />
	                        	<c:set var="value" value="null" />
	                        </c:if>
	                        <div class="filtval complex" x-key="<c:out value="${normalizedKey}" /><c:out value="${value}"/>" i-key="<c:out value="${filter.key}" />"><c:out value="${string}" /></div>
	                        <c:remove var="string" />
	                    </c:forEach>
	                </div>
                </div>
            </div>
        </c:forEach>
    </div>
    </c:if>
	
93
	<h3><spring:message code="data-overview.institutes" /></h3>	
94
95
    <div class="row">
    	<div class="col-xs-12 col-sm-6 row-section">
96
97
98
99
100
101
102
			<h4 id="stats-instcode"><spring:message code="filter.institute.code" /></h4>
			<c:set var="type" value="instCode" />
			<c:set var="termResult" value="${statsInstCode}" />
				<%@include file="termresult.jspf"%>
			<c:remove var="termResult" />
			<c:remove var="type" />
		</div>
103
		<div class="col-xs-12 col-sm-6 row-section">
104
105
106
107
108
109
110
111
112
113
			<h4 id="stats-instcty"><spring:message code="filter.institute.country.iso3" /></h4>
			<c:set var="type" value="country" />
			<c:set var="termResult" value="${statsInstCountry}" />
				<%@include file="termresult.jspf"%>
			<c:remove var="termResult" />
			<c:remove var="type" />
		</div>
	</div>

	<h3><spring:message code="data-overview.composition" /></h3>	
114
115
    <div class="row">
    	<div class="col-xs-12 col-sm-6 row-section">
116
117
118
119
120
121
122
			<h4 id="stats-crops"><spring:message code="filter.crops" /></h4>
			<c:set var="type" value="crop" />
			<c:set var="termResult" value="${statsCrops}" />
				<%@include file="termresult.jspf"%>
			<c:remove var="termResult" />
			<c:remove var="type" />
		</div>
123
		<div class="col-xs-12 col-sm-6 row-section">
124
125
126
127
128
129
130
131
			<h4 id="stats-sampstat"><spring:message code="filter.sampStat" /></h4>
			<c:set var="type" value="i18n.accession.sampleStatus" />
			<c:set var="termResult" value="${statsSampStat}" />
				<%@include file="termresult.jspf"%>
			<c:remove var="termResult" />
			<c:remove var="type" />
		</div>
	</div>
132
133
	<div class="row">
    	<div class="col-xs-12 col-sm-6 row-section">
134
135
136
137
138
			<h4 id="stats-genus"><spring:message code="filter.taxonomy.genus" /></h4>
			<c:set var="termResult" value="${statsGenus}" />
				<%@include file="termresult.jspf"%>
			<c:remove var="termResult" />
		</div>
139
		<div class="col-xs-12 col-sm-6 row-section">
140
141
142
143
144
145
146
147
			<h4 id="stats-species"><spring:message code="filter.taxonomy.species" /></h4>
			<c:set var="termResult" value="${statsSpecies}" />
				<%@include file="termresult.jspf"%>
			<c:remove var="termResult" />
		</div>
	</div>
	
	<h3><spring:message code="data-overview.sources" /></h3>	
148
149
    <div class="row">
    	<div class="col-xs-12 col-sm-6 row-section">
150
151
152
153
154
155
156
			<h4 id="stats-orgcty"><spring:message code="filter.orgCty.iso3" /></h4>
			<c:set var="type" value="country" />
			<c:set var="termResult" value="${statsOrgCty}" />
				<%@include file="termresult.jspf"%>
			<c:remove var="termResult" />
			<c:remove var="type" />
		</div>
157
		<div class="col-xs-12 col-sm-6 row-section">
158
			<h4 id="stats-donorcode"><spring:message code="data-overview.donorCode" /></h4>
159
160
161
162
163
164
165
166
167
			<c:set var="type" value="instCode" />
			<c:set var="termResult" value="${statsDonorCode}" />
				<%@include file="termresult.jspf"%>
			<c:remove var="termResult" />
			<c:remove var="type" />
		</div>
	</div>
	
	<h3><spring:message code="data-overview.availability" /></h3>	
168
169
    <div class="row">
    	<div class="col-xs-12 col-sm-6 row-section">
170
			<h4 id="stats-sampstat"><spring:message code="data-overview.mlsStatus" /></h4>
171
172
173
174
175
176
			<c:set var="type" value="bool" />
			<c:set var="termResult" value="${statsMLS}" />
				<%@include file="termresult.jspf"%>
			<c:remove var="termResult" />
			<c:remove var="type" />
		</div>
177
		<div class="col-xs-12 col-sm-6 row-section">
178
179
180
181
182
183
184
			<h4 id="stats-available"><spring:message code="filter.available" /></h4>
			<c:set var="type" value="bool" />
			<c:set var="termResult" value="${statsAvailable}" />
				<%@include file="termresult.jspf"%>
			<c:remove var="termResult" />
			<c:remove var="type" />
		</div>
Matija Obreza's avatar
Matija Obreza committed
185
186
187
188
189
190
191
192
		<div class="col-xs-12 col-sm-6 row-section">
			<h4 id="stats-available"><spring:message code="filter.historic" /></h4>
			<c:set var="type" value="bool" />
			<c:set var="termResult" value="${statsHistoric}" />
				<%@include file="termresult.jspf"%>
			<c:remove var="termResult" />
			<c:remove var="type" />
		</div>
193
194
195
	</div>
	
	<h3><spring:message code="data-overview.management" /></h3>	
196
197
	<div class="row">
		<div class="col-xs-12 col-sm-6 row-section">
198
199
			<h4 id="stats-duplsite"><spring:message code="filter.duplSite" /></h4>
			<c:set var="type" value="instCode" />
200
			<c:set var="count" value="${accessionCount}" />
201
202
203
			<c:set var="termResult" value="${statsDuplSite}" />
				<%@include file="termresult.jspf"%>
			<c:remove var="termResult" />
204
			<c:remove var="count" />
205
206
			<c:remove var="type" />
		</div>
207
208
209
210
211
212
213
214
		<div class="col-xs-12 col-sm-6 row-section">
			<h4 id="stats-duplsite"><spring:message code="filter.sgsv" /></h4>
			<c:set var="type" value="bool" />
			<c:set var="termResult" value="${statsSGSV}" />
				<%@include file="termresult.jspf"%>
			<c:remove var="termResult" />
			<c:remove var="type" />
		</div>
215
	</div>
216
217
218
219
	<div class="row">
		<div class="col-xs-12 col-sm-6 row-section">
			<h4 id="stats-storage"><spring:message code="filter.storage" /></h4>
			<c:set var="type" value="i18n.accession.storage" />
220
			<c:set var="count" value="${accessionCount}" />
221
222
223
			<c:set var="termResult" value="${statsStorage}" />
				<%@include file="termresult.jspf"%>
			<c:remove var="termResult" />
224
			<c:remove var="count" />
225
226
227
			<c:remove var="type" />
		</div>
	</div>
228
229
230
231
232
233
234
235

<content tag="javascript">
	<script type="text/javascript">
	
	</script>
</content>
</body>
</html>