details.jsp 11.7 KB
Newer Older
Matija Obreza's avatar
Matija Obreza committed
1
2
3
4
5
6
<!DOCTYPE html>

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

<html>
<head>
7
8
9
10
11
<title><c:out value="${faoInstitute.fullName}" /><c:if test="${faoInstitute.acronym != ''}"> | ${faoInstitute.acronym}</c:if>
  | <c:out value="${faoInstitute.code}" /></title>
<meta name="description"
  content="<spring:message code="faoInstitute.meta-description" arguments="${faoInstitute.fullName}|${faoInstitute.acronym}" argumentSeparator="|" />"
/>
12
<meta name="keywords" content="${faoInstitute.acronym}, ${faoInstitute.fullName}, ${faoInstitute.code}" />
Matija Obreza's avatar
Matija Obreza committed
13
</head>
14
<body typeof="schema:Organization">
15
16
17
18
19
20
21
  <h1>
    <img class="country-flag bigger"
      src="<c:url value="${cdnFlagsUrl}" />/${faoInstitute.country.code3.toUpperCase()}.png"
    /> <span property="schema:Organization#name"><c:out value="${faoInstitute.fullName}" /></span>
    <c:if test="${faoInstitute.acronym != ''}"> &mdash; ${faoInstitute.acronym}</c:if>
    <small><c:out value="${faoInstitute.code}" /></small>
  </h1>
22

23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
  <c:if test="${not faoInstitute.current}">
    <div class="alert alert-warning">
      <spring:message code="faoInstitute.institute-not-current" />
      <a href="<c:url value="/wiews/${faoInstitute.vCode}" />"><spring:message
          code="faoInstitute.view-current-institute" arguments="${faoInstitute.vCode}"
        /></a>
    </div>
  </c:if>

  <c:if test="${faoInstitute.current and countByInstitute eq 0}">
    <div class="alert alert-info">
      <spring:message code="faoInstitute.no-accessions-registered" />
    </div>
  </c:if>

  <div class="jumbotron">
    <spring:message code="faoInstitutes.stat.accessionCount" arguments="${countByInstitute}" />
    <c:if test="${countByInstitute gt 0}">
      <a title="<spring:message code="faoInstitute.data-title" arguments="${faoInstitute.fullName}" />"
        href="<c:url value="/wiews/${faoInstitute.code}/data" />"
      ><spring:message code="view.accessions" /></a>
      <a title="<spring:message code="faoInstitute.overview-title" arguments="${faoInstitute.fullName}" />"
        href="<c:url value="/wiews/${faoInstitute.code}/overview" />"
      ><spring:message code="data-overview.short" /></a>
    </c:if>
    <br />
    <spring:message code="faoInstitutes.stat.datasetCount" arguments="${datasetCount}" />
    <c:if test="${datasetCount gt 0}">
Matija Obreza's avatar
Matija Obreza committed
51
      <spring:message code="statistics.phenotypic.stats-text" arguments="${statisticsPheno.elStats}" />
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
      <a title="<spring:message code="faoInstitute.datasets-title" arguments="${faoInstitute.fullName}" />"
        href="<c:url value="/wiews/${faoInstitute.code}/datasets" />"
      ><spring:message code="view.datasets" /></a>
    </c:if>
  </div>

  <div class="">
    <security:authorize access="hasRole('ADMINISTRATOR') or hasPermission(#faoInstitute, 'ADMINISTRATION')">
      <a
        href="<c:url value="/acl/${faoInstitute.getClass().name}/${faoInstitute.id}/permissions"><c:param name="back">/wiews/${faoInstitute.code}</c:param></c:url>"
        class="close"
      > <spring:message code="edit-acl" /></a>
      <a href="<c:url value="/wiews/${faoInstitute.code}/edit" />" class="close"> <spring:message code="edit" />
      </a>
    </security:authorize>

    <span property="schema:Organization#description"> <%@include
        file="/WEB-INF/jsp/content/include/blurp-display.jsp"
      %>
    </span>

    <div class="row" style="">
      <div class="col-sm-4" property="schema:Organization#location">
        <spring:message code="faoInstitute.country" />
        : <span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"> <a href="<c:url value="/geo" />"
          itemprop="url"
        > <span itemprop="title"><spring:message code="menu.countries" /></span>
        </a><span itemprop="child" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"> <a
            href="<c:url value="/geo/${faoInstitute.country.code3}" />" itemprop="url"
          > <span itemprop="title">${faoInstitute.country.getName(pageContext.response.locale)}</span>
          </a>
        </span>
        </span>
      </div>
      <%-- <div class="col-sm-4">
Matija Obreza's avatar
Matija Obreza committed
87
88
89
90
91
92
93
			<spring:message code="faoInstitute.code" />:
			<c:out value="${faoInstitute.code}" />
		</div>
		<div class="col-sm-4">
			<spring:message code="faoInstitute.acronym" />:
			<c:out value="${faoInstitute.acronym}" />
		</div> --%>
94
95
96
97
    </div>

    <div class="row" style="">
      <%-- <div class="col-sm-4">
Matija Obreza's avatar
Matija Obreza committed
98
99
100
			<spring:message code="faoInstitute.email" />:
			<c:out value="${faoInstitute.email}" />
		</div> --%>
101
      <%-- 		<p>
Matija Obreza's avatar
Matija Obreza committed
102
103
104
			<c:out value="${faoInstitute.type}" />
		</p>
 --%>
105
106
107
108
109
110
111
112
113
114
115
116
      <div class="col-sm-12">
        <spring:message code="faoInstitute.url" />
        :
        <c:forEach items="${faoInstitute.safeUrls}" var="url">
          <a target="_blank" rel="nofollow" href="<c:out value="${url}" />"><span dir="ltr"><c:out
                value="${url}"
              /></span></a>
        </c:forEach>
      </div>

      <div class="col-sm-12">
        <a target="_blank" rel="nofollow"
Matija Obreza's avatar
Matija Obreza committed
117
          href="<c:url value="http://www.fao.org/wiews-archive/institute.htm?i_l=EN&query_INVALIDINST=Y"><c:param name="query_INSTCODE" value="${faoInstitute.code}" /></c:url>"
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
        ><spring:message code="faoInstitute.wiewsLink" arguments="${faoInstitute.code}" /></a>
      </div>

    </div>

    <c:if test="${organizations.size() gt 0}">
      <div class="row" style="">
        <div class="col-sm-12">
          <spring:message code="faoInstitute.member-of-organizations-and-networks" />
          <c:forEach items="${organizations}" var="organization">
            <a href="<c:url value="/org/${organization.slug}" />"><span dir="ltr"><c:out
                  value="${organization.title}"
                /></span></a>
          </c:forEach>
        </div>
      </div>
    </c:if>
  </div>
136

137
138
139
140
141
142
143
144
145
146
147
148
  <c:if test="${faoInstitute.latitude ne null}">
    <div class="row" style="">
      <div class="col-sm-12">
        <div id="map" class="gis-map"></div>
        <span property="schema:Organization#location"><span typeof="schema:Place"><span
            property="schema:Place#geo"
          ><span typeof="schema:GeoCoordinates"> <span property="schema:GeoCoordinates#latitude">${faoInstitute.latitude}</span>,
                <span property="schema:GeoCoordinates#longitude">${faoInstitute.longitude}</span>
            </span></span></span></span>
      </div>
    </div>
  </c:if>
Matija Obreza's avatar
Matija Obreza committed
149

150
  <div class="row" style="margin-top: 2em;">
151
152
153
154
155
156
157
158
    <c:if test="${statisticsCrops ne null}">
      <div class="col-xs-12">
        <h4>
          <spring:message code="faoInstitute.stat-by-crop" />
        </h4>
        <local:term-result termResult="${statisticsCrops}" type="crop" />
      </div>
    </c:if>
Matija Obreza's avatar
Matija Obreza committed
159

160
161
162
163
    <div class="col-sm-6">
      <h4>
        <spring:message code="faoInstitute.stat-by-genus" arguments="${statisticsGenus.numberOfElements}" />
      </h4>
164

165
166
167
      <div class="chart chart-pie">
        <div id="chartStatsByGenus" style="height: 300px;"></div>
      </div>
168

169
170
171
172
173
174
175
176
177
178
179
      <ul class="funny-list statistics">
        <c:forEach items="${statisticsGenus.content}" var="stat" varStatus="status">
          <li class="clearfix ${status.count % 2 == 0 ? 'even' : 'odd'}"><span class="stats-number"><fmt:formatNumber
                value="${stat[1]}"
              /></span> <a
            title="<spring:message code="faoInstitute.link-species-data" arguments="${faoInstitute.fullName}|${faoInstitute.acronym}|${stat[0]}" argumentSeparator="|" />"
            href="<c:url value="/wiews/${faoInstitute.code}/t/${stat[0]}" />"
          ><span dir="ltr" class="sci-name"><c:out value="${stat[0]}" /></span></a></li>
        </c:forEach>
      </ul>
    </div>
180

181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
    <div class="col-sm-6">
      <h4>
        <spring:message code="faoInstitute.stat-by-species" arguments="${statisticsTaxonomy.numberOfElements}" />
      </h4>

      <div class="chart chart-pie">
        <div id="chartStatsBySpecies" style="height: 300px"></div>
      </div>

      <ul class="funny-list statistics">
        <c:forEach items="${statisticsTaxonomy.content}" var="stat" varStatus="status">
          <li class="clearfix ${status.count % 2 == 0 ? 'even' : 'odd'}"><span class="stats-number"><fmt:formatNumber
                value="${stat[1]}"
              /></span> <a
            title="<spring:message code="faoInstitute.link-species-data" arguments="${faoInstitute.fullName}|${faoInstitute.acronym}|${stat[0].genus} ${stat[0].species}" argumentSeparator="|" />"
            href="<c:url value="/wiews/${faoInstitute.code}/t/${stat[0].genus}/${stat[0].species}" />"
          ><span dir="ltr" class="sci-name"><c:out value="${stat[0].taxonName}" /></span></a></li>
        </c:forEach>
      </ul>
    </div>

  </div>

Matija Obreza's avatar
Matija Obreza committed
204
205
206
207
208
209
210
211
212
213
214
  <c:if test="${statisticsPDCI.count gt 0 and statisticsPDCI.count eq countByInstitute}">
    <h3>
      <spring:message code="accession.pdci" />
    </h3>
    <p>
      <spring:message code="accession.pdci.stats-text" arguments="${statisticsPDCI.elStats}" />
    </p>

    <div class="chart chart-histogram">
      <div id="chartPDCI" style="height: 200px"></div>
    </div>
215

Matija Obreza's avatar
Matija Obreza committed
216
217
218
219
220
221
222
223
224
    <p>
      <a href="<c:url value="/content/passport-data-completeness-index" />"><spring:message
          code="accession.pdci.about-link"
        /></a>
    </p>
    <%-- <c:forEach items="${statisticsPDCI.histogram}" var="item" varStatus="index">
    <div>${index.count}=${item}</div>
  </c:forEach> --%>
  </c:if>
225
226
227
228
229

  <c:if test="${countByInstitute gt 0}">
    <form class="form-horizontal" method="post" action="/download/wiews/${faoInstitute.code}/download">
      <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
      <div class="row" style="margin-top: 2em;">
Matija Obreza's avatar
Matija Obreza committed
230
        <div class="col-sm-12">
231
232
233
234
          <security:authorize access="isAuthenticated()">
            <button name="mcpd" class="btn btn-primary" type="submit">
              <spring:message code="filter.download-mcpd" />
            </button>
Matija Obreza's avatar
Matija Obreza committed
235
236
237
            <button name="pdci" class="btn btn-default" type="submit">
              <spring:message code="filter.download-pdci" />
            </button>
238
239
240
241
242
243
244
245
246
247
248
          </security:authorize>
          <button name="dwca" class="btn btn-default" type="submit">
            <spring:message code="metadata.download-dwca" />
          </button>
        </div>
      </div>
    </form>
  </c:if>

  <content tag="javascript"> <c:if test="${faoInstitute.latitude ne null}">
    <script type="text/javascript">
Matija Obreza's avatar
Matija Obreza committed
249
			jQuery(document).ready(function() {
250
				var map=GenesysMaps.map("${pageContext.response.locale.language}", $("#map"), {
251
					minZoom: 4,
252
					maxZoom: 6, /* WIEWS does not provide enough detail */
253
					center: new GenesysMaps.LatLng(${faoInstitute.latitude}, ${faoInstitute.longitude}), 
Matija Obreza's avatar
Matija Obreza committed
254
255
256
257
258
259
					markerTitle: "<spring:escapeBody javaScriptEscape="true">${faoInstitute.fullName}</spring:escapeBody>",
					scrollWheelZoom: false,
					touchZoom: false,
					dragging: false,
					doubleClickZoom: false,
					boxZoom: false
Matija Obreza's avatar
Matija Obreza committed
260
261
				});
			});
Matija Obreza's avatar
Matija Obreza committed
262
		</script>
263
  </c:if> <script type="text/javascript">
Matija Obreza's avatar
Matija Obreza committed
264
			<%@include file="/WEB-INF/jsp/wiews/ga.jsp"%>
Matija Obreza's avatar
Matija Obreza committed
265
			_pageDim = { institute: '${faoInstitute.code}' };
266
		</script> <script>
267
        jQuery(document).ready(function () {
Matija Obreza's avatar
Matija Obreza committed
268
269
            GenesysChart.chart("#chartStatsByGenus", "<c:url value="/wiews/${faoInstitute.code}/stat-genus" />", null, null, function(genus) { window.location=window.location.pathname + "/t/" + genus; });
            GenesysChart.chart("#chartStatsBySpecies", "<c:url value="/wiews/${faoInstitute.code}/stat-species" />", null, function(taxonomy) { return taxonomy.taxonName; }, function(taxonomy) { window.location=window.location.pathname + "/t/" + taxonomy.genus + "/" + taxonomy.species; });
270
271
272
273
274
<security:authorize access="isAuthenticated()">
<c:if test="${statisticsPDCI.count gt 0 and statisticsPDCI.count eq countByInstitute}">
            GenesysChart.histogram("#chartPDCI", <c:out value="${statisticsPDCI.histogramJson}" escapeXml="false" /> );
</c:if>
</security:authorize>
igoshin's avatar
igoshin committed
275
        });
276
    </script> </content>
Matija Obreza's avatar
Matija Obreza committed
277
278
</body>
</html>