overview.jsp 8.62 KB
Newer Older
1 2
<!DOCTYPE html>

3
<%@ include file="/WEB-INF/jsp/init.jsp" %>
4 5 6 7 8 9

<html>
<head>
<title><spring:message code="data-overview" /></title>
</head>
<body>
Matija Obreza's avatar
Matija Obreza committed
10 11
	<cms:informative-h1 title="data-overview" fancy="true" info="data-overview.intro" />

12 13

	<div class="main-col-header clearfix">
14 15
		<div class="row">
			<div class="col-xs-9 pull-right text-right">
Matija Obreza's avatar
Matija Obreza committed
16
				<a class="btn btn-default" href="<c:url value="/explore"><c:param name="filter" value="${jsonFilter}" /></c:url>"><span class="glyphicon glyphicon-list"></span><span style="margin-left: 0.5em;"><spring:message code="view.accessions" /></span></a>
17 18 19 20
				<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>
21 22 23 24
			</div>
		</div>
	</div>
	
25 26 27 28 29 30
	<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(':', '_')}"/>
31
            <c:set var="appliedFilter" value="${appliedFilters.get(filter.key)}" />
32 33 34 35 36 37 38 39 40 41 42 43 44 45

            <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">
46 47 48 49
                		<c:if test="${appliedFilter.inverse}">
                			<spring:message code="filter.inverse" />
                		</c:if>
	                    <c:forEach items="${filters[appliedFilter.key]}" var="value">
50 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
	                        <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>
	
92
	<h3><spring:message code="data-overview.institutes" /></h3>	
93 94
    <div class="row">
    	<div class="col-xs-12 col-sm-6 row-section">
95 96
		  <h4 id="stats-instcode"><spring:message code="filter.institute.code" /></h4>
          <local:term-result termResult="${statsInstCode}" type="instCode" />
97
		</div>
98
		<div class="col-xs-12 col-sm-6 row-section">
99 100
          <h4 id="stats-instcty"><spring:message code="filter.institute.country.iso3" /></h4>
          <local:term-result termResult="${statsInstCountry}" type="country" />
101 102 103 104
		</div>
	</div>

	<h3><spring:message code="data-overview.composition" /></h3>	
105 106
    <div class="row">
    	<div class="col-xs-12 col-sm-6 row-section">
107 108
          <h4 id="stats-crops"><spring:message code="filter.crops" /></h4>
          <local:term-result termResult="${statsCrops}" type="crop" />
109
		</div>
110
		<div class="col-xs-12 col-sm-6 row-section">
111 112
		  <h4 id="stats-sampstat"><spring:message code="filter.sampStat" /></h4>
          <local:term-result termResult="${statsSampStat}" type="i18n.accession.sampleStatus" />
113 114
		</div>
	</div>
115 116
	<div class="row">
    	<div class="col-xs-12 col-sm-6 row-section">
117
			<h4 id="stats-genus"><spring:message code="filter.taxonomy.genus" /></h4>
118
            <local:term-result termResult="${statsGenus}" type="genus" />
119
		</div>
120
		<div class="col-xs-12 col-sm-6 row-section">
121
			<h4 id="stats-species"><spring:message code="filter.taxonomy.species" /></h4>
122
			<local:term-result termResult="${statsSpecies}" type="species" />
123 124 125 126
		</div>
	</div>
	
	<h3><spring:message code="data-overview.sources" /></h3>	
127 128
    <div class="row">
    	<div class="col-xs-12 col-sm-6 row-section">
129 130
		  <h4 id="stats-orgcty"><spring:message code="filter.orgCty.iso3" /></h4>
          <local:term-result termResult="${statsOrgCty}" type="country" />
131
		</div>
132
		<div class="col-xs-12 col-sm-6 row-section">
133
			<h4 id="stats-donorcode"><spring:message code="data-overview.donorCode" /></h4>
134
            <local:term-result termResult="${statsDonorCode}" type="instCode" />
135 136 137 138
		</div>
	</div>
	
	<h3><spring:message code="data-overview.availability" /></h3>	
139 140
    <div class="row">
    	<div class="col-xs-12 col-sm-6 row-section">
141 142
          <h4 id="stats-sampstat"><spring:message code="data-overview.mlsStatus" /></h4>
          <local:term-result termResult="${statsMLS}" type="bool" />
143
		</div>
144
		<div class="col-xs-12 col-sm-6 row-section">
145
			<h4 id="stats-available"><spring:message code="filter.available" /></h4>
146
            <local:term-result termResult="${statsAvailable}" type="bool" />
147
		</div>
Matija Obreza's avatar
Matija Obreza committed
148
		<div class="col-xs-12 col-sm-6 row-section">
149 150
		  <h4 id="stats-available"><spring:message code="filter.historic" /></h4>
          <local:term-result termResult="${statsHistoric}" type="bool" />
Matija Obreza's avatar
Matija Obreza committed
151
		</div>
152 153 154
	</div>
	
	<h3><spring:message code="data-overview.management" /></h3>	
155 156
	<div class="row">
		<div class="col-xs-12 col-sm-6 row-section">
157 158
		  <h4 id="stats-duplsite"><spring:message code="filter.duplSite" /></h4>
          <local:term-result termResult="${statsDuplSite}" count="${accessionCount}" type="instCode" />
159
		</div>
160
		<div class="col-xs-12 col-sm-6 row-section">
161 162
		  <h4 id="stats-duplsite"><spring:message code="filter.sgsv" /></h4>
          <local:term-result termResult="${statsSGSV}" type="bool" />
163
		</div>
164
	</div>
165 166
	<div class="row">
		<div class="col-xs-12 col-sm-6 row-section">
167 168
		  <h4 id="stats-storage"><spring:message code="filter.storage" /></h4>
          <local:term-result termResult="${statsStorage}" count="${accessionCount}" type="i18n.accession.storage" />
169 170
		</div>
	</div>
171 172 173 174 175 176 177 178

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