details.jsp 30.2 KB
Newer Older
Matija Obreza's avatar
Matija Obreza committed
1 2
<!DOCTYPE html>

3
<%@ include file="/WEB-INF/jsp/init.jsp" %>
Matija Obreza's avatar
Matija Obreza committed
4 5 6

<html>
<head>
Matija Obreza's avatar
Matija Obreza committed
7 8 9
<title><spring:message code="accession.page.profile.title" arguments="${accession.accessionName}"
    argumentSeparator="|"
  /></title>
10
	<local:content-headers description="${jspHelper.htmlToText(blurp.summary, 150)}" title="${accession.accessionName} | ${accession.instituteCode}" keywords="${accession.accessionName}" />
Matija Obreza's avatar
Matija Obreza committed
11
</head>
Matija Obreza's avatar
Matija Obreza committed
12 13
<body class="accession-page" typeof="germplasm:GermplasmAccession">
  <h1 class="green-bg">
Matija Obreza's avatar
Matija Obreza committed
14 15 16 17 18 19 20 21 22 23 24 25 26
    <span property="dwc:catalogNumber"><c:out value="${accession.accessionName}" /></span> <small
      property="dwc:institutionCode" datatype="germplasmType:wiewsInstituteID"
    ><c:out value="${accession.instituteCode}" /></small>
  </h1>

  <div class="main-col-header acn">
    <div class="sel" x-aid="${accession.id}">
      <a class="add" href=""><spring:message code="selection.add" arguments="${accession.accessionName}" /></a> <a
        class="remove" href=""
      ><spring:message code="selection.remove" arguments="${accession.accessionName}" /></a>
    </div>
  </div>

27 28 29
  <gui:alert type="warning" display="${accession.historic eq true or accession.getClass().simpleName eq 'AccessionHistoric'}">
    <spring:message code="accession.this-is-a-historic-entry" />
  </gui:alert>
Matija Obreza's avatar
Matija Obreza committed
30

31 32 33
  <gui:alert type="info" display="${accession.inTrust eq true}">
    <spring:message code="accession.inTrust.true" />
  </gui:alert>
Matija Obreza's avatar
Matija Obreza committed
34

35 36 37
  <gui:alert type="info" display="${accession.inSvalbard eq true}">
    <spring:message code="accession.inSvalbard.true" />
  </gui:alert>
Matija Obreza's avatar
Matija Obreza committed
38

39 40 41
  <gui:alert type="info" display="${accession.mlsStatus eq true}">
    <spring:message code="accession.mlsStatus.true" />
  </gui:alert>
Matija Obreza's avatar
Matija Obreza committed
42 43

  <%--
44 45 46
	<gui:alert type="warning" display="${accession.availability eq false}">
		<spring:message code="accession.not-available-for-distribution" />
	</gui:alert>
Matija Obreza's avatar
Matija Obreza committed
47
	
48 49 50 51
	<gui:alert type="info" display="${accession.availability eq true}">
		<spring:message code="accession.available-for-distribution" />
	</gui:alert>
  --%>
Matija Obreza's avatar
Matija Obreza committed
52

Matija Obreza's avatar
Matija Obreza committed
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 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
  <div class="pseudo-right-col col-md-3">
    <c:if test="${accessionGeo.latitude ne null and accessionGeo.longitude ne null}">

      <div class="crop-location" itemscope itemtype="http://schema.org/GeoCoordinates">
        <h3>
          <spring:message code="accession.collecting.site" />
        </h3>
        <div id="map" class="map-container"></div>

        <table class="map-data">
          <tr>
            <td><spring:message code="filter.geo.latitude" />:</td>
            <td><c:out value="${accessionGeo.latitude}" /></td>
          </tr>
          <tr>
            <td><spring:message code="filter.geo.longitude" />:</td>
            <td><c:out value="${accessionGeo.longitude}" /></td>
          </tr>
          <tr>
            <td><spring:message code="accession.elevation" />:</td>
            <td><c:out value="${accessionGeo.elevation}" /></td>
          </tr>
        </table>
      </div>
    </c:if>
  </div>

  <div class="crop-details">
    <div class="row">
      <div class="col-xs-4">
        <spring:message code="accession.holdingInstitute" />
      </div>
      <div class="col-xs-8">
        <a property="dwc:institutionCode" href="<c:url value="/wiews/${accession.instituteCode}" />"> <c:out
            value="${accession.institute.fullName}"
          />
        </a>
      </div>
    </div>
    <div class="row">
      <div class="col-xs-4">
        <spring:message code="accession.holdingCountry" />
      </div>
      <div class="col-xs-8">
        <a href="<c:url value="/geo/${accession.institute.country.code3}" />"><c:out
            value="${accession.institute.country.getName(pageContext.response.locale)}"
          /></a>
      </div>
    </div>
    <div class="row">
      <div class="col-xs-4">
        <spring:message code="accession.accessionName" />
      </div>
      <div class="col-xs-8">
        <c:out value="${accession.accessionName}" />
      </div>
    </div>

    <c:if test="${crops ne null}">
      <div class="row">
        <div class="col-xs-4">
          <spring:message code="accession.crop" />
        </div>
        <div class="col-xs-8">
          <c:forEach items="${crops}" var="crop">
            <a href="<c:url value="/c/${crop.shortName}" />"><c:out
                value="${crop.getName(pageContext.response.locale)}"
              /></a>
          </c:forEach>
        </div>
      </div>
    </c:if>

    <c:if test="${accession.countryOfOrigin ne null}">
      <div class="row">
        <div class="col-xs-4">
          <spring:message code="accession.origin" />
        </div>
        <div class="col-xs-8">
Matija Obreza's avatar
Matija Obreza committed
132
          <img class="flag" src="<c:url value="${cdnFlagsUrl}/${accession.origin.toUpperCase()}.svg" />" /> <a
Matija Obreza's avatar
Matija Obreza committed
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
            href="<c:url value="/geo/${accession.origin}" />"
          > <c:out value="${accession.countryOfOrigin.getName(pageContext.response.locale)}" />
          </a>
        </div>
      </div>
    </c:if>

    <div class="row">
      <div class="col-xs-4">
        <spring:message code="taxonomy.genus" />
      </div>
      <div class="col-xs-8" property="dwc:genus">
        <a href="<c:url value="/acn/t/${accession.taxonomy.genus}" />"><span dir="ltr" class="sci-name"><c:out
              value="${accession.taxonomy.genus}"
            /></span></a>
      </div>
    </div>
    <div class="row">
      <div class="col-xs-4">
        <spring:message code="taxonomy.species" />
      </div>
      <div class="col-xs-8">
        <a href="<c:url value="/acn/t/${accession.taxonomy.genus}/${accession.taxonomy.species}" />"><span
          class="sci-name" dir="ltr"
        ><c:out value="${accession.taxonomy.genus} ${accession.taxonomy.species}" /></span></a> <br /> <a
          href="<c:url value="/wiews/${accession.institute.code}/t/${accession.taxonomy.genus}/${accession.taxonomy.species}" />"
        ><spring:message code="accession.taxonomy-at-institute"
            arguments="${accession.taxonomy.genus} ${accession.taxonomy.species}|||${accession.institute.code}"
            argumentSeparator="|||"
          /></a>
      </div>
    </div>
    <div class="row">
      <div class="col-xs-4">
        <spring:message code="taxonomy.taxonName" />
      </div>
      <div class="col-xs-8">
        <span dir="ltr" class="sci-name"><c:out value="${accession.taxonomy.taxonName}" /></span>
      </div>
    </div>

    <div class="row">
      <div class="col-xs-4">
        <spring:message code="accession.sampleStatus" />
      </div>
      <div class="col-xs-8" property="germplasm:biologicalStatus">
        <spring:message code="accession.sampleStatus.${accession.sampleStatus}" />
      </div>
    </div>

    <div class="row">
      <div class="col-xs-4">
        <spring:message code="accession.storage" />
      </div>
      <div class="col-xs-8">
        <c:forEach items="${accession.stoRage}" var="storage">
          <div>
            <spring:message code="accession.storage.${storage}" />
          </div>
        </c:forEach>
      </div>
    </div>

196 197 198 199 200 201 202 203 204
    <div class="row">
      <div class="col-xs-4">
        <spring:message code="accession.acqDate" />
      </div>
      <div class="col-xs-8">
        <c:out value="${accession.acquisitionDate}" />
      </div>
    </div>

Matija Obreza's avatar
Matija Obreza committed
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222
    <div class="row">
      <div class="col-xs-4">
        <spring:message code="accession.availability" />
      </div>
      <div class="col-xs-8">
        <spring:message code="accession.availability.${accession.availability}" />
      </div>
    </div>

    <div class="row">
      <div class="col-xs-4">
        <spring:message code="accession.otherNames" />
      </div>
      <div class="col-xs-8">
        <c:forEach items="${accessionAliases}" var="accessionAlias">
          <div>
            <c:out value="${accessionAlias.name}" />
            <c:if test="${accessionAlias.instCode != ''}">
Matija Obreza's avatar
Matija Obreza committed
223
              <a href="<c:url value="/wiews/${accessionAlias.instCode}" />"><c:out value="${accessionAlias.instCode}" /></a>
Matija Obreza's avatar
Matija Obreza committed
224 225
            </c:if>
            <c:if test="${accessionAlias.usedBy != ''}">
Matija Obreza's avatar
Matija Obreza committed
226
							<c:out value="${accessionAlias.usedBy}" />
227
						</c:if>
Matija Obreza's avatar
Matija Obreza committed
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257
            <c:if test="${accessionAlias.lang != ''}">
              <c:out value="${accessionAlias.lang}" />
            </c:if>
            <spring:message code="accession.aliasType.${accessionAlias.aliasType}" />
          </div>
        </c:forEach>
      </div>
    </div>

    <div class="row">
      <div class="col-xs-4">
        <spring:message code="accession.duplSite" />
      </div>
      <div class="col-xs-8">
        <c:forEach items="${accession.duplSite.split('[;,]')}" var="duplSite">
          <div>
            <spring:message code="${duplSite}" />
          </div>
        </c:forEach>
      </div>
    </div>


    <c:if test="${accessionExchange ne null}">
      <div class="row">
        <div class="col-xs-4">
          <spring:message code="accession.donor.institute" />
        </div>
        <div class="col-xs-8">
          <c:if test="${accessionExchange.donorInstitute eq null}">
Matija Obreza's avatar
Matija Obreza committed
258
						<c:out value="${accessionExchange.donorName}" />
259
						</c:if>
Matija Obreza's avatar
Matija Obreza committed
260
         <c:out value="${accessionExchange.donorInstitute}" />
Matija Obreza's avatar
Matija Obreza committed
261 262 263 264 265 266
        </div>
      </div>
      <div class="row">
        <div class="col-xs-4">
          <spring:message code="accession.donor.accessionNumber" />
        </div>
Matija Obreza's avatar
Matija Obreza committed
267
        <div class="col-xs-8"><c:out value="${accessionExchange.accNumbDonor}" /></div>
Matija Obreza's avatar
Matija Obreza committed
268 269
      </div>
    </c:if>
Matija Obreza's avatar
Matija Obreza committed
270

Matija Obreza's avatar
Matija Obreza committed
271
    <c:if test="${accession.uuid ne null}">
Matija Obreza's avatar
Matija Obreza committed
272 273 274
      <div class="row text-muted">
        <div class="col-xs-4">
          <spring:message code="accession.uuid" />
Matija Obreza's avatar
Matija Obreza committed
275
        </div>
Matija Obreza's avatar
Matija Obreza committed
276 277
        <div class="col-xs-8">
          <span property="dc:identifier">urn:uuid:<c:out value="${accession.uuid}" /></span>
Matija Obreza's avatar
Matija Obreza committed
278
        </div>
Matija Obreza's avatar
Matija Obreza committed
279 280 281 282 283 284
      </div>
      <div class="row">
        <div class="col-xs-4">
          <spring:message code="accession.purl" />
        </div>
        <div class="col-xs-8">
Matija Obreza's avatar
Matija Obreza committed
285
          <span property="dc:identifier"><a href="<c:url value="https://purl.org/germplasm/id/${accession.uuid}" />"><c:url
Matija Obreza's avatar
Matija Obreza committed
286 287 288 289 290
                value="https://purl.org/germplasm/id/${accession.uuid}"
              /></a></span>
        </div>
      </div>
    </c:if>
Matija Obreza's avatar
Matija Obreza committed
291

292 293 294 295 296 297 298

    <c:if test="${accession.acceUrl ne null}">
      <div class="row">
        <div class="col-xs-4">
          <spring:message code="accession.acceUrl" />
        </div>
        <div class="col-xs-8">
Matija Obreza's avatar
Matija Obreza committed
299
          <a target="_blank" href="<c:url value="${accession.acceUrl}"  />"><c:url value="${accession.acceUrl}" /></a>
300 301 302 303
        </div>
      </div>
    </c:if>

Matija Obreza's avatar
Matija Obreza committed
304 305 306 307
		<c:if test="${imageGallery ne null}">
			<h4>
		  	<spring:message code="accession.imageGallery" />
		  </h4>
308
			<div class="row imagegallery thumbs" id="accession-images-thumbs">
Matija Obreza's avatar
Matija Obreza committed
309
				<c:forEach items="${imageGallery.images}" var="image">
310
					<div x-uuid="<c:out value="${image.uuid}" />" x-ext="<c:out value="${image.extension}" />" style="cursor: pointer;" class="col-xs-6 col-sm-3 col-md-2 col-lg-2">
Matija Obreza's avatar
Matija Obreza committed
311
						<img src="<c:url value="/repository/d${image.path}_thumb/${thumbnailFormat}_${image.uuid}.png" />" alt="<c:out value="${image.title}" />" />
Matija Obreza's avatar
Matija Obreza committed
312 313 314 315
					</div>
				</c:forEach>
			</div>
			
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332
			<div class="imagegallery image-frame row" id="accession-image-view">
				<img class="theimage" />
				<div class="metadata">
					<div class="title"><spring:message code="repository.file.title" /> <span class="val"></span></div>
					<div class="subject"><spring:message code="repository.file.subject" /> <span class="val"></span></div>
					<div class="description"><spring:message code="repository.file.description" /> <span class="val"></span></div>
					<div class="creator"><spring:message code="repository.file.creator" /> <span class="val"></span></div>
					<div class="created"><spring:message code="repository.file.created" /> <span class="val"></span></div>
					<div class="rightsHolder"><spring:message code="repository.file.rightsHolder" /> <span class="val"></span></div>
					<div class="accessRights"><spring:message code="repository.file.accessRights" /> <span class="val"></span></div>
					<div class="license"><spring:message code="repository.file.license" /> <span class="val"></span></div>
					<div class="extent"><spring:message code="repository.file.extent" /> <span class="val"></span></div>
					<div class="bibliographicCitation"><spring:message code="repository.file.bibliographicCitation" /> <span class="val"></span></div>
					
					<!-- Extras -->
					<div class="downloadLink"><a href=""><spring:message code="repository.gallery.downloadImage" /></a></div>
				</div>
Matija Obreza's avatar
Matija Obreza committed
333 334 335
			</div>
		</c:if>

Matija Obreza's avatar
Matija Obreza committed
336 337 338 339 340 341 342 343 344
    <c:if test="${accessionCollect ne null}">
      <h4>
        <spring:message code="accession.collecting" />
      </h4>

      <div class="row">
        <div class="col-xs-4">
          <spring:message code="accession.collecting.institute" />
        </div>
Matija Obreza's avatar
Matija Obreza committed
345
        <div class="col-xs-8"><c:out value="${accessionCollect.collCode}" /></div>
Matija Obreza's avatar
Matija Obreza committed
346 347 348 349 350 351
      </div>
      <c:if test="${accessionCollect.collName ne null}">
        <div class="row">
          <div class="col-xs-4">
            <spring:message code="accession.collecting.institute" />
          </div>
Matija Obreza's avatar
Matija Obreza committed
352
          <div class="col-xs-8"><c:out value="${accessionCollect.collName}${accessionCollect.collInstAddress}" /></div>
Matija Obreza's avatar
Matija Obreza committed
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367
        </div>
      </c:if>
      <div class="row">
        <div class="col-xs-4">
          <spring:message code="accession.collecting.mission" />
        </div>
        <div class="col-xs-8">
          <c:out value="${accessionCollect.collMissId}" />
        </div>
        <%--				<div class="col-xs-8"><a href="<c:url value="/collectingmission"><c:param name="collMissId" value="${accessionCollect.collMissId}" /></c:url>"><c:out value="${accessionCollect.collMissId}" /></a></div> --%>
      </div>
      <div class="row">
        <div class="col-xs-4">
          <spring:message code="accession.collecting.date" />
        </div>
Matija Obreza's avatar
Matija Obreza committed
368
        <div class="col-xs-8"><c:out value="${accessionCollect.collDate}" /></div>
Matija Obreza's avatar
Matija Obreza committed
369 370 371 372 373
      </div>
      <div class="row">
        <div class="col-xs-4">
          <spring:message code="accession.collecting.number" />
        </div>
Matija Obreza's avatar
Matija Obreza committed
374
        <div class="col-xs-8"><c:out value="${accessionCollect.collNumb}" /></div>
Matija Obreza's avatar
Matija Obreza committed
375 376 377 378 379
      </div>
      <div class="row">
        <div class="col-xs-4">
          <spring:message code="accession.collecting.site" />
        </div>
Matija Obreza's avatar
Matija Obreza committed
380
        <div class="col-xs-8"><c:out value="${accessionCollect.collSite}" /></div>
Matija Obreza's avatar
Matija Obreza committed
381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400
      </div>
      <div class="row">
        <div class="col-xs-4">
          <spring:message code="accession.collecting.source" />
        </div>
        <div class="col-xs-8">
          <spring:message code="accession.collectingSource.${accessionCollect.collSrc}" />
        </div>
      </div>
    </c:if>

    <c:if test="${accessionBreeding ne null}">
      <h4>
        <spring:message code="accession.breeding" />
      </h4>

      <div class="row">
        <div class="col-xs-4">
          <spring:message code="accession.breederCode" />
        </div>
Matija Obreza's avatar
Matija Obreza committed
401
        <div class="col-xs-8"><c:out value="${accessionBreeding.breederCode}" /></div>
Matija Obreza's avatar
Matija Obreza committed
402 403 404 405 406
      </div>
      <div class="row">
        <div class="col-xs-4">
          <spring:message code="accession.pedigree" />
        </div>
Matija Obreza's avatar
Matija Obreza committed
407
        <div class="col-xs-8"><c:out value="${accessionBreeding.pedigree}" /></div>
Matija Obreza's avatar
Matija Obreza committed
408 409 410 411 412 413 414 415 416 417 418 419 420 421
      </div>
    </c:if>


    <c:if test="${accessionGeo ne null}">
      <h4>
        <spring:message code="accession.geo" />
      </h4>

      <c:if test="${accessionCollect.collSite ne null}">
        <div class="row">
          <div class="col-xs-4">
            <spring:message code="accession.collecting.site" />
          </div>
Matija Obreza's avatar
Matija Obreza committed
422
          <div class="col-xs-8"><c:out value="${accessionCollect.collSite}" /></div>
Matija Obreza's avatar
Matija Obreza committed
423 424 425 426 427 428 429
        </div>
      </c:if>
      <c:if test="${accessionGeo.latitude ne null}">
        <div class="row">
          <div class="col-xs-4">
            <spring:message code="accession.geolocation" />
          </div>
Matija Obreza's avatar
Matija Obreza committed
430
          <div class="col-xs-8"><c:out value="${accessionGeo.latitude}, ${accessionGeo.longitude}" /></div>
Matija Obreza's avatar
Matija Obreza committed
431 432 433 434 435 436 437
        </div>
      </c:if>
      <c:if test="${accessionGeo.elevation ne null}">
        <div class="row">
          <div class="col-xs-4">
            <spring:message code="accession.elevation" />
          </div>
Matija Obreza's avatar
Matija Obreza committed
438
          <div class="col-xs-8"><c:out value="${accessionGeo.elevation}" /><span class="uom">m</span>
Matija Obreza's avatar
Matija Obreza committed
439 440 441 442 443 444 445
          </div>
        </div>
      </c:if>
      <div class="row">
        <div class="col-xs-4">
          <spring:message code="accession.geo.datum" />
        </div>
Matija Obreza's avatar
Matija Obreza committed
446
        <div class="col-xs-8"><c:out value="${accessionGeo.datum}" /></div>
Matija Obreza's avatar
Matija Obreza committed
447 448 449 450 451
      </div>
      <div class="row">
        <div class="col-xs-4">
          <spring:message code="accession.geo.method" />
        </div>
Matija Obreza's avatar
Matija Obreza committed
452
        <div class="col-xs-8"><c:out value="${accessionGeo.method}" /></div>
Matija Obreza's avatar
Matija Obreza committed
453 454 455 456 457 458
      </div>
      <c:if test="${accessionGeo.uncertainty ne null}">
        <div class="row">
          <div class="col-xs-4">
            <spring:message code="accession.geo.uncertainty" />
          </div>
Matija Obreza's avatar
Matija Obreza committed
459
          <div class="col-xs-8"><c:out value="${accessionGeo.uncertainty}" /><span class="uom">m</span>
Matija Obreza's avatar
Matija Obreza committed
460 461 462 463 464
          </div>
        </div>
      </c:if>
    </c:if>

Matija Obreza's avatar
Matija Obreza committed
465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483
    <!-- WorldClim.org -->
    <c:if test="${worldclimJson ne null}">
      <h4>
        <spring:message code="worldclim.monthly.title" />
      </h4>

      <!-- Charts -->
      <div class="row">
        <div class="col-xs-12 col-sm-6">
          <h5>
            <spring:message code="worldclim.monthly.temperatures.title" />
          </h5>
          <div id="temperatureChart" style="height: 150px;"></div>
        </div>
        <div class="col-xs-12 col-sm-6">
          <h5>
            <spring:message code="worldclim.monthly.precipitation.title" />
          </h5>
          <div id="precipitationChart" style="height: 150px;"></div>
Matija Obreza's avatar
Matija Obreza committed
484
        </div>
Matija Obreza's avatar
Matija Obreza committed
485
      </div>
Matija Obreza's avatar
Matija Obreza committed
486

Matija Obreza's avatar
Matija Obreza committed
487 488 489 490 491 492 493 494 495
      <!-- Data -->
      <div class="row">
        <div class="col-sm-offset-4 col-sm-8 col-xs-12">
          <div class="row">
            <c:forEach var="i" begin="0" end="11">
              <div class="col-xs-1 text-right">
                <strong><c:out value="${jspHelper.monthShortNames(pageContext.response.locale)[i]}" /></strong>
              </div>
            </c:forEach>
Matija Obreza's avatar
Matija Obreza committed
496 497
          </div>
        </div>
Matija Obreza's avatar
Matija Obreza committed
498 499 500 501 502 503 504 505 506 507 508 509
      </div>
      <div class="row">
        <div class="col-sm-4 col-xs-12">
          <spring:message code="worldclim.monthly.tempMin" />
        </div>
        <div class="col-sm-8 col-xs-12">
          <div class="row">
            <c:forEach var="i" begin="0" end="11">
              <div class="col-xs-1 text-right">
                <fmt:formatNumber value="${worldclimJson.tempMin[i]}" />
              </div>
            </c:forEach>
Matija Obreza's avatar
Matija Obreza committed
510 511
          </div>
        </div>
Matija Obreza's avatar
Matija Obreza committed
512 513 514 515 516 517 518 519 520 521 522 523
      </div>
      <div class="row">
        <div class="col-sm-4 col-xs-12">
          <spring:message code="worldclim.monthly.tempMean" />
        </div>
        <div class="col-sm-8 col-xs-12">
          <div class="row">
            <c:forEach var="i" begin="0" end="11">
              <div class="col-xs-1 text-right">
                <fmt:formatNumber value="${worldclimJson.tempMean[i]}" />
              </div>
            </c:forEach>
Matija Obreza's avatar
Matija Obreza committed
524 525
          </div>
        </div>
Matija Obreza's avatar
Matija Obreza committed
526 527 528 529 530 531 532 533 534 535 536 537
      </div>
      <div class="row">
        <div class="col-sm-4 col-xs-12">
          <spring:message code="worldclim.monthly.tempMax" />
        </div>
        <div class="col-sm-8 col-xs-12">
          <div class="row">
            <c:forEach var="i" begin="0" end="11">
              <div class="col-xs-1 text-right">
                <fmt:formatNumber value="${worldclimJson.tempMax[i]}" />
              </div>
            </c:forEach>
Matija Obreza's avatar
Matija Obreza committed
538 539
          </div>
        </div>
Matija Obreza's avatar
Matija Obreza committed
540 541 542 543 544 545 546 547 548 549 550 551
      </div>
      <div class="row">
        <div class="col-sm-4 col-xs-12">
          <spring:message code="worldclim.monthly.precipitation" />
        </div>
        <div class="col-sm-8 col-xs-12">
          <div class="row">
            <c:forEach var="i" begin="0" end="11">
              <div class="col-xs-1 text-right">
                <fmt:formatNumber value="${worldclimJson.precipitation[i]}" />
              </div>
            </c:forEach>
Matija Obreza's avatar
Matija Obreza committed
552 553
          </div>
        </div>
Matija Obreza's avatar
Matija Obreza committed
554
      </div>
Matija Obreza's avatar
Matija Obreza committed
555

Matija Obreza's avatar
Matija Obreza committed
556 557 558 559 560
      <%-- Needs work 
		<h4><spring:message code="worldclim.other-climate" /></h4>
		<c:forEach items="${worldclimJson.other.keySet()}" var="worldclimDescriptor">
		<div class="row">
			<div class="col-xs-4"><c:out value="${worldclimDescriptor.title}" /></div>
Matija Obreza's avatar
Matija Obreza committed
561
			<div class="col-xs-8"><fmt:formatNumber value="${worldclimJson.other[worldclimDescriptor]}" /><span class="uom"><c:out value="${worldclimDescriptor.uom}" /></span></div>
Matija Obreza's avatar
Matija Obreza committed
562 563 564 565
		</div>
		</c:forEach>
		--%>
    </c:if>
Matija Obreza's avatar
Matija Obreza committed
566 567 568 569 570 571

    <c:if test="${svalbardData ne null}">
      <h4>
        <spring:message code="accession.svalbard-data" />
      </h4>

572 573 574 575 576 577
      <c:if test="${svalbardData.unitId ne null}">
        <div class="row">
          <div class="col-xs-4">
            <spring:message code="accession.svalbard-data.url" />
          </div>
          <div class="col-xs-8">
Matija Obreza's avatar
Matija Obreza committed
578 579 580
            <a target="_blank" href="<c:url value="http://nordgen.org/sgsv/index.php?app=data_unit&unit=sgsv&unit_id=${svalbardData.unitId}" />"
            	title="<spring:message code="accession.svalbard-data.url-title" />">
            <spring:message code="accession.svalbard-data.url-text" arguments="${accession.accessionName}" /></a>
581 582 583 584
          </div>
        </div>
      </c:if>

Matija Obreza's avatar
Matija Obreza committed
585 586 587 588
      <div class="row">
        <div class="col-xs-4">
          <spring:message code="accession.svalbard-data.taxonomy" />
        </div>
Matija Obreza's avatar
Matija Obreza committed
589
        <div class="col-xs-8"><c:out value="${svalbardData.taxonomy}" /></div>
Matija Obreza's avatar
Matija Obreza committed
590 591 592 593 594 595
      </div>

      <div class="row">
        <div class="col-xs-4">
          <spring:message code="accession.svalbard-data.depositDate" />
        </div>
Matija Obreza's avatar
Matija Obreza committed
596
        <div class="col-xs-8"><c:out value="${svalbardData.depositDate}" /></div>
Matija Obreza's avatar
Matija Obreza committed
597 598 599 600 601
      </div>
      <div class="row">
        <div class="col-xs-4">
          <spring:message code="accession.svalbard-data.boxNumber" />
        </div>
Matija Obreza's avatar
Matija Obreza committed
602
        <div class="col-xs-8"><c:out value="${svalbardData.boxNumber}" /></div>
Matija Obreza's avatar
Matija Obreza committed
603 604 605 606 607
      </div>
      <div class="row">
        <div class="col-xs-4">
          <spring:message code="accession.svalbard-data.quantity" />
        </div>
Matija Obreza's avatar
Matija Obreza committed
608
        <div class="col-xs-8"><c:out value="${svalbardData.quantity}" /></div>
Matija Obreza's avatar
Matija Obreza committed
609 610
      </div>

611 612 613 614 615 616
      <c:if test="${svalbardData.acceUrl ne null}">
        <div class="row">
          <div class="col-xs-4">
            <spring:message code="accession.acceUrl" />
          </div>
          <div class="col-xs-8">
Matija Obreza's avatar
Matija Obreza committed
617
            <a href="<c:url value="${svalbardData.acceUrl}" />"><c:out value="${svalbardData.acceUrl}" /></a>
618 619 620
          </div>
        </div>
      </c:if>
Matija Obreza's avatar
Matija Obreza committed
621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641
    </c:if>


    <c:if test="${fn:length(accessionRemarks) gt 0}">
      <h4>
        <spring:message code="accession.remarks" />
      </h4>
    </c:if>
    <c:forEach items="${accessionRemarks}" var="accessionRemark">
      <div class="row">
        <div class="col-xs-4">
          <c:out value="${accessionRemark.fieldName}" />
        </div>
        <div class="col-xs-8">
          <c:out value="${accessionRemark.remark}" />
        </div>
      </div>
    </c:forEach>
  </div>


Matija Obreza's avatar
Matija Obreza committed
642 643
  <c:if test="${pdci ne null}">
    <div class="crop-details">
644

Matija Obreza's avatar
Matija Obreza committed
645 646 647 648 649 650 651 652 653 654 655 656 657
      <h4>
        <spring:message code="accession.pdci" />
      </h4>
      <div class="jumbotron pdci-score">
        <div>
          <h3>
            <spring:message code="accession.pdci.jumbo" arguments="${pdci.score}" />
          </h3>
          <small> <c:if test="${institutePDCI ne null and institutePDCI.count > 0}">
              <spring:message code="accession.pdci.institute-avg" arguments="${institutePDCI.avg}" />
            </c:if> <a href="<c:url value="/content/passport-data-completeness-index" />"><spring:message
                code="accession.pdci.about-link"
              /></a></small>
658 659
        </div>
      </div>
Matija Obreza's avatar
Matija Obreza committed
660

Matija Obreza's avatar
Matija Obreza committed
661 662 663 664
      <local:pdci value="${pdci}" />

    </div>
  </c:if>
Matija Obreza's avatar
Matija Obreza committed
665

Matija Obreza's avatar
Matija Obreza committed
666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728
  <c:if test="${methods.size() gt 0}">

    <div class="crop-details">
      <h4>
        <spring:message code="accession.methods" />
      </h4>
      <c:forEach items="${methods}" var="method" varStatus="status">
        <div class="row targeted" id="method${method.id}">
          <div class="col-xs-6 col-sm-4">
            <c:out value="${method.parameter.title}" />
          </div>
          <div class="col-xs-6 col-sm-4">
            <c:forEach items="${methodValues[method.id]}" var="val">
              <div>
                <c:out value="${method.decode(val.value)}" />
                <span class="uom"><c:out value="${method.unit}" /></span> <sup><a
                  href="#metadata-${val.experimentId}"
                ><c:out value="${val.experimentId}" /></a></sup>
              </div>
            </c:forEach>
          </div>
          <div class="col-xs-12 col-sm-4">
            <c:out value="${method.method}" />
          </div>
        </div>
      </c:forEach>
    </div>
  </c:if>

  <c:if test="${metadatas.size() gt 0}">
    <h4>
      <spring:message code="accession.metadatas" />
    </h4>
    <ul class="funny-list">
      <c:forEach items="${metadatas}" var="metadata" varStatus="status">
        <li class="clearfix targeted ${status.count % 2 == 0 ? 'even' : 'odd'}" id="metadata-${metadata.id}">
          <div class="show pull-left">
            <sup><c:out value="${metadata.id}" /></sup> <a href="<c:url value="/data/view/${metadata.id}" />"><c:out
                value="${metadata.title}"
              /></a>
          </div>
          <div class="pull-right">
            <c:out value="${metadata.instituteCode}" />
          </div>
          <div class="pull-right">
            <c:out value="${metadata.description}" />
          </div>
        </li>
      </c:forEach>
    </ul>
  </c:if>



  <div class="audit-info">
    <c:if test="${accession.lastModifiedBy ne null}">
      <spring:message code="audit.lastModifiedBy" arguments="${jspHelper.userFullName(accession.lastModifiedBy)}" />
    </c:if>
    <local:prettyTime date="${accession.lastModifiedDate}" locale="${pageContext.response.locale}" />
  </div>

  <content tag="javascript"> <c:if test="${accessionGeo ne null and accessionGeo.latitude ne null}">
    <script type="text/javascript">
729
				jQuery(document).ready(function() {
Matija Obreza's avatar
Matija Obreza committed
730
					var map = L.map('map').setView([${accessionGeo.latitude}, ${accessionGeo.longitude}], 2);
731 732 733
					L.tileLayer('http://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}', {
						attribution: 'Tiles &copy; Esri &mdash; Esri, DeLorme, NAVTEQ',
						maxZoom: 16
734 735 736 737
					}).addTo(map);
					var marker = L.marker([${accessionGeo.latitude}, ${accessionGeo.longitude}]).addTo(map);
				});
		</script>
738 739
  </c:if>
  <c:if test="${worldclimJson ne null}">
Matija Obreza's avatar
Matija Obreza committed
740
      <script type="text/javascript">
Matija Obreza's avatar
Matija Obreza committed
741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789
			var monthNames = ${jspHelper.toJson(jspHelper.monthShortNames(pageContext.response.locale))};
			var worldclim = ${jspHelper.toJson(worldclimJson)};
			function arrayToData(array) {
				var ret=[];
				for (var i=0; i<12; i++) {
					ret[i]=[i, array[i]];
				}
				return ret;
			}
			var temperatureChart = [
				{ label: "Temperatures", data: arrayToData(worldclim.tempMean), lines: { show: true }, color: "rgb(255,50,50)" },
				{ id: "max", data: arrayToData(worldclim.tempMax), lines: { show: true, lineWidth: 0, fill: false }, color: "rgb(255,50,50)" },
				{ id: "min", data: arrayToData(worldclim.tempMin), lines: { show: true, lineWidth: 0, fill: 0.2 }, color: "rgb(255,50,50)", fillBetween: "max" }
			];
			var precipitationChart = [
				{ label: "Precipitation", data: arrayToData(worldclim.precipitation), bars: { show: true, align: "center" }, color: "rgb(50,50,255)" }
			];
			var temperaturePlot = $.plot($("#temperatureChart"), temperatureChart, {
				xaxis: { tickLength: 0, tickFormatter: function(v, o) {
					return monthNames[v];
				} },
				yaxis: {
						tickFormatter: function (v) {
							return v + " °C";
						}
				},
				legend: { show: false }
			});
			var precipitationPlot = $.plot($("#precipitationChart"), precipitationChart, {
				xaxis: { tickLength: 0, tickFormatter: function(v, o) {
					return monthNames[v];
				} },
				yaxis: {
						tickFormatter: function (v) {
							return v + " mm";
						}
				},
				legend: { show: false }
			});
			$( window ).resize(function() {
				precipitationPlot.resize();
				precipitationPlot.setupGrid();
				precipitationPlot.draw();
				
				temperaturePlot.resize();
				temperaturePlot.setupGrid();
				temperaturePlot.draw();
			});
		</script>
790
  </c:if>
Matija Obreza's avatar
Matija Obreza committed
791 792
  <c:if test="${imageGallery ne null}">
  <script type="text/javascript">
793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813
  		function fillMetadata(metadataBox, metadata) {
  	  		var box=$(metadataBox);
  	  		box.children().hide();
  	  		for (var i in metadata) {
//				console.log(i);
				var elem = box.find('.' + i)[0];
//				console.log(elem);
				if (elem !== undefined) {
					$(elem).children().first().html('');
				}
				if (metadata[i] === null || metadata[i].length === 0) {
					continue;
				}
				if (elem !== undefined) {
					$(elem).children().first().text(metadata[i]);
					$(elem).show();
				}
  	  	  	}
			var elem = box.find('.downloadLink').show().find('a').first().attr('href', box.parent().parent().find('.theimage').first().attr('src'));
  	  	}
 		function showImage(imagegalleryFrame, imageUuid, imageExt) {
Matija Obreza's avatar
Matija Obreza committed
814
			var baseHref = '<c:url value="/repository/d${imageGallery.path}" />';
815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835
			var imageViewer = $(imagegalleryFrame).find('.theimage').first();
			var metadataBox = $(imagegalleryFrame).find('.metadata').first();
			imageViewer.attr('src', baseHref + imageUuid + imageExt);
//			console.log('Image source: ' + imageViewer.src)
//			console.log(imageViewer.attr('src'));
			$(imagegalleryFrame).show();
			$(metadataBox).hide();

			// Load metadata
			$.ajax(baseHref + imageUuid + imageExt + "?metadata", {
				method: 'get',
				dataType : 'json',
				success : function(respObject) {
//					console.log(respObject);
					fillMetadata(metadataBox, respObject);
					$(metadataBox).show();
				},
				error: function(jqXHR, textStatus, errorThrown) {
					console.log(textStatus);
					console.log(errorThrown);
				}
Matija Obreza's avatar
Matija Obreza committed
836
			});
837 838 839 840 841 842 843 844 845 846 847
 	 	}
		$(document).ready(function() {
			var galleryView=$('#accession-image-view')[0];
			var galleryThumbnails = $('#accession-images-thumbs div');
			galleryThumbnails.click(function(ev) {
				showImage(galleryView, $(this).attr('x-uuid'),  $(this).attr('x-ext'));
			});
			if (galleryThumbnails.length > 0) {
				// Show first image
				showImage(galleryView, $(galleryThumbnails[0]).attr('x-uuid'), $(galleryThumbnails[0]).attr('x-ext'));
			}
Matija Obreza's avatar
Matija Obreza committed
848 849 850
		});
	</script>
  </c:if>
851
	<script type="text/javascript">
852
		<%@ include file="/WEB-INF/jsp/wiews/ga.jsp" %>
Matija Obreza's avatar
Matija Obreza committed
853
		_pageDim = { institute: '${accession.instituteCode}', genus: '${accession.taxonomy.genus}' };
854 855
	</script> 
</content>
Matija Obreza's avatar
Matija Obreza committed
856 857
</body>
</html>