details.jsp 50.8 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

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

18 19 20 21 22 23
    <div class="row 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>
Matija Obreza's avatar
Matija Obreza committed
24

25 26 27
    <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>
Maxim's avatar
Maxim committed
28

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

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

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

41 42 43
    <%-- <p>
  ${auditAccession}
</p> --%>
Matija Obreza's avatar
Matija Obreza committed
44

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

54 55 56 57 58 59
    <!--basic info section-->
    <div class="crop-details">
      <div class="collect-info basic-info">
        <h4 class="section-heading">
          <spring:message code="accession.page.profile.title" arguments="${accession.accessionName}" argumentSeparator="|"/></h4>
        <div class="section-inner-content">
Matija Obreza's avatar
Matija Obreza committed
60

61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
          <c:if test="${accession.doi ne null}">
            <div class="row">
              <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                <p>
                  <spring:message code="accession.doi"/>
                </p>
              </div>
              <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                <p property="dc:identifier">
                  <c:if test="${accession.doi ne null}">
                    <a href="<c:url value=" https://dx.doi.org/${accession.doi}" />"><c:out value="${accession.doi}"/></a>
                  </c:if>
                </p>
                <local:auditlog-changes auditLogs="${auditAccession['doi']}"/>
              </div>
            </div>
          </c:if>
Matija Obreza's avatar
Matija Obreza committed
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
          <div class="row">
            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
              <p>
                <spring:message code="accession.holdingInstitute"/>
              </p>
            </div>
            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
              <p>
                <span property="dwc:institutionCode"><c:out value="${accession.institute.code}"/></span>
                <a href="<c:url value=" /wiews/${accession.instituteCode}" />"><c:out value="${accession.institute.fullName}"/></a>
              </p>
              <local:auditlog-changes auditLogs="${auditAccession['institute']}"/>
            </div>
          </div>
          <div class="row">
            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
              <p>
                <spring:message code="accession.holdingCountry"/>
              </p>
            </div>
            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
              <p>
                <local:country country="${accession.institute.country}"/>
              </p>
            </div>
          </div>
          <div class="row">
            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
              <p>
                <spring:message code="accession.accessionName"/>
              </p>
            </div>
            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
              <p>
                <c:out value="${accession.accessionName}"/>
              </p>
              <local:auditlog-changes auditLogs="${auditAccession['accessionName']}"/>
            </div>
          </div>
Matija Obreza's avatar
Matija Obreza committed
118

119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
          <c:if test="${accession.countryOfOrigin ne null}">
            <div class="row">
              <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                <p>
                  <spring:message code="accession.origin"/>
                </p>
              </div>
              <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                <p>
                  <local:country flag="true" country="${accession.countryOfOrigin}"/>
                </p>
                <local:auditlog-changes auditLogs="${auditAccession['countryOfOrigin']}"/>
              </div>
            </div>
          </c:if>
Matija Obreza's avatar
Matija Obreza committed
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
          <div class="row">
            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
              <p>
                <spring:message code="taxonomy.genus"/>
              </p>
            </div>
            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12" property="dwc:genus">
              <p>
                <a href="<c:url value=" /acn/t/${accession.taxonomy.genus}" />">
                  <span dir="ltr" class="sci-name">
                    <i><c:out value="${accession.taxonomy.genus}"/></i>
                  </span>
                </a>
              </p>
              <local:auditlog-changes auditLogs="${auditAccession['taxonomy']}" property="genus"/>
            </div>
          </div>
          <div class="row">
            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
              <p>
                <spring:message code="taxonomy.species"/>
              </p>
            </div>
            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
              <p>
                <a href="<c:url value=" /acn/t/${accession.taxonomy.genus}/${accession.taxonomy.species}" />">
                  <span class="sci-name" dir="ltr">
                    <i><c:out value="${accession.taxonomy.genus} ${accession.taxonomy.species}"/></i>
                  </span>
                </a>
                &mdash;
                <a href="<c:url value=" /wiews/${accession.institute.code}/t/${accession.taxonomy.genus}/${accession.taxonomy.species}" />"><spring:message code="accession.taxonomy-at-institute" htmlEscape="false" arguments="<i>${accession.taxonomy.genus} ${accession.taxonomy.species}</i>|||${accession.institute.code}" argumentSeparator="|||"/></a>
              </p>
              <local:auditlog-changes auditLogs="${auditAccession['taxonomy']}" property="species"/>
            </div>
          </div>
Matija Obreza's avatar
Matija Obreza committed
171

172 173 174 175 176 177 178 179 180 181 182 183 184
          <div class="row">
            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
              <p>
                <spring:message code="taxonomy.taxonName"/>
              </p>
            </div>
            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
              <p>
                <local:taxonName taxon="${accession.taxonomy}"/>
              </p>
              <local:auditlog-changes auditLogs="${auditAccession['taxonomy']}"/>
            </div>
          </div>
Matija Obreza's avatar
Matija Obreza committed
185

186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201
          <c:if test="${crops ne null}">
            <div class="row">
              <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                <p>
                  <spring:message code="accession.crop"/>
                </p>
              </div>
              <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                <p>
                  <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>
                </p>
              </div>
            </div>
          </c:if>
Matija Obreza's avatar
Matija Obreza committed
202

203 204 205 206 207 208 209 210 211 212 213 214 215
          <c:if test="${accession.cropName ne null}">
            <div class="row">
              <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                <p>
                  <spring:message code="accession.cropName"/>
                </p>
              </div>
              <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                <p><c:out value="${accession.cropName}"/></p>
                <local:auditlog-changes auditLogs="${auditAccession['cropName']}"/>
              </div>
            </div>
          </c:if>
Matija Obreza's avatar
Matija Obreza committed
216

217 218 219 220 221 222 223 224 225 226 227 228 229
          <div class="row">
            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
              <p>
                <spring:message code="accession.sampleStatus"/>
              </p>
            </div>
            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12" property="germplasm:biologicalStatus">
              <p>
                <spring:message code="accession.sampleStatus.${accession.sampleStatus}"/>
              </p>
              <local:auditlog-changes auditLogs="${auditAccession['sampleStatus']}" i18n="accession.sampleStatus"/>
            </div>
          </div>
Matija Obreza's avatar
Matija Obreza committed
230

231 232 233 234 235 236 237
          <div class="row">
            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
              <p>
                <spring:message code="accession.storage"/>
              </p>
            </div>
            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
Matija Obreza's avatar
Matija Obreza committed
238
              <c:forEach items="${accession.accessionId.storage}" var="storage">
239 240 241 242 243 244 245
                <p>
                  <spring:message code="accession.storage.${storage}"/>
                </p>
              </c:forEach>
              <local:auditlog-changes auditLogs="${auditAccession['storage']}"/>
            </div>
          </div>
Matija Obreza's avatar
Matija Obreza committed
246

247 248 249 250 251 252 253 254 255 256 257 258 259
          <div class="row">
            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
              <p>
                <spring:message code="accession.acqDate"/>
              </p>
            </div>
            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
              <p>
                <c:out value="${accession.acquisitionDate}"/>
              </p>
              <local:auditlog-changes auditLogs="${auditAccession['acquisitionDate']}"/>
            </div>
          </div>
Matija Obreza's avatar
Matija Obreza committed
260

261 262 263 264 265 266 267 268
          <div class="row">
            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
              <p>
                <spring:message code="accession.availability"/>
              </p>
            </div>
            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
              <p>
Matija Obreza's avatar
Matija Obreza committed
269
                <spring:message code="accession.availability.${accession.available}"/>
270
              </p>
Matija Obreza's avatar
Matija Obreza committed
271
              <local:auditlog-changes auditLogs="${auditAccession['available']}" i18n="accession.availability"/>
272 273
            </div>
          </div>
Matija Obreza's avatar
Matija Obreza committed
274

275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295
          <div class="row">
            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
              <p>
                <spring:message code="accession.otherNames"/>
              </p>
            </div>
            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
              <c:forEach items="${accessionAliases}" var="accessionAlias">
                <p>
                  <c:out value="${accessionAlias.name}"/>
                  <c:if test="${accessionAlias.usedBy != ''}">
                    <c:out value="${accessionAlias.usedBy}"/>
                  </c:if>
                  <c:if test="${accessionAlias.lang != ''}">
                    <c:out value="${accessionAlias.lang}"/>
                  </c:if>
                  <spring:message code="accession.aliasType.${accessionAlias.aliasType}"/>
                </p>
              </c:forEach>
            </div>
          </div>
Matija Obreza's avatar
Matija Obreza committed
296

Matija Obreza's avatar
Matija Obreza committed
297
          <c:if test="${accession.accessionId.duplSite ne null}">
298 299 300 301 302 303 304
            <div class="row">
              <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                <p>
                  <spring:message code="accession.duplSite"/>
                </p>
              </div>
              <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
Matija Obreza's avatar
Matija Obreza committed
305
                <c:forEach items="${accession.accessionId.duplSite}" var="duplSite">
306 307 308 309 310 311 312 313
                  <p>
                    <spring:message code="${duplSite}"/>
                  </p>
                  <local:auditlog-changes auditLogs="${auditAccession['duplSite']}"/>
                </c:forEach>
              </div>
            </div>
          </c:if>
Matija Obreza's avatar
Matija Obreza committed
314

315 316 317 318 319 320 321 322
            <div class="row">
              <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                <p>
                  <spring:message code="accession.donor.institute"/>
                </p>
              </div>
              <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                <p>
Matija Obreza's avatar
Matija Obreza committed
323 324
                  <c:if test="${accession.donorCode eq null}">
                    <c:out value="${accession.donorName}"/>
325
                  </c:if>
Matija Obreza's avatar
Matija Obreza committed
326
                  <c:out value="${accession.donorCode}"/>
327
                </p>
Matija Obreza's avatar
Matija Obreza committed
328 329
                <local:auditlog-changes auditLogs="${auditAccession['donorCode']}"/>
                <local:auditlog-changes auditLogs="${auditAccession['donorName']}"/>
330 331 332 333 334 335 336 337 338 339
              </div>
            </div>
            <div class="row">
              <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                <p>
                  <spring:message code="accession.donor.accessionNumber"/>
                </p>
              </div>
              <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                <p>
Matija Obreza's avatar
Matija Obreza committed
340
                  <c:out value="${accession.donorNumb}"/>
341
                </p>
Matija Obreza's avatar
Matija Obreza committed
342
                <local:auditlog-changes auditLogs="${auditAccession['donorNumb']}"/>
343 344
              </div>
            </div>
Matija Obreza's avatar
Matija Obreza committed
345

346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374
          <c:if test="${accession.uuid ne null}">
            <div class="row text-muted">
              <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                <p>
                  <spring:message code="accession.uuid"/>
                </p>
              </div>
              <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                <p>
                  <span property="dc:identifier">
                    urn:uuid:
                    <c:out value="${accession.uuid}"/>
                  </span>
                </p>
              </div>
            </div>
            <div class="row">
              <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                <p>
                  <spring:message code="accession.purl"/>
                </p>
              </div>
              <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                <p property="dc:identifier">
                  <a href="<c:url value=" https://purl.org/germplasm/id/${accession.uuid}" />"><c:out value="https://purl.org/germplasm/id/${accession.uuid}"/></a>
                </p>
              </div>
            </div>
          </c:if>
Matija Obreza's avatar
Matija Obreza committed
375

376 377 378 379 380 381 382 383 384 385 386 387 388 389 390
          <c:if test="${accession.acceUrl ne null}">
            <div class="row">
              <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                <p>
                  <spring:message code="accession.acceUrl"/>
                </p>
              </div>
              <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                <p>
                  <a target="_blank" href="<c:out value=" ${accession.acceUrl}"  />"><c:out value="${accession.acceUrl}"/></a>
                </p>
                <local:auditlog-changes auditLogs="${auditAccession['acceUrl']}"/>
              </div>
            </div>
          </c:if>
Matija Obreza's avatar
Matija Obreza committed
391

392
        </div>
393
        <!-- End: inner -->
394
      </div>
395
      <!-- End: basic info section -->
396

397 398 399 400 401 402 403 404 405 406
      <!-- Image gallery section -->
      <security:authorize access="hasRole('ADMINISTRATOR') or hasPermission(#accession.institute, 'ADMINISTRATION')">
        <div class="row">
          <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 form-group">
            <a href="<c:url value=" /wiews/${accession.institute.code}/files/acn/${accession.accessionName}" />" class="btn btn-default">
              <spring:message code="file.manage-files"/>
            </a>
          </div>
        </div>
      </security:authorize>
Matija Obreza's avatar
Matija Obreza committed
407

408 409 410 411 412 413 414 415
      <c:if test="${imageGallery ne null}">
        <div class="collect-info gallery">
          <h4 class="row section-heading">
            <spring:message code="accession.imageGallery"/>
          </h4>
          <div class="section-inner-content clearfix">
            <div class="row imagegallery thumbs" id="accession-images-thumbs">
              <c:forEach items="${imageGallery.images}" var="image">
416
                <div x-uuid="<c:out value="${image.uuid}" />" x-ext="<c:out value="${image.extension}" />" style="cursor: pointer;" class="col-lg-2 col-md-4 col-sm-4 col-xs-6">
417
                  <div class="img-wrapper">
418
                    <img src="<c:url value="${cdnServers.next}/repository/d/_thumbs${image.thumbnailPath}/${thumbnailFormat}.png" />" alt="<c:out value="${image.title}" />"/>
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466
                  </div>
                </div>
              </c:forEach>
            </div>
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs">
              <div class="imagegallery image-frame row" id="accession-image-view">
                <div class="theimage-wrapper"><img class="theimage"/></div>
                <div class="metadata">
                  <div class="title">
                    <spring:message code="repository.file.title"/>
                    <span class="val pull-right"></span>
                  </div>
                  <div class="subject">
                    <spring:message code="repository.file.subject"/>
                    <span class="val pull-right"></span>
                  </div>
                  <div class="description">
                    <spring:message code="repository.file.description"/>
                    <span class="val pull-right"></span>
                  </div>
                  <div class="creator">
                    <spring:message code="repository.file.creator"/>
                    <span class="val pull-right"></span>
                  </div>
                  <div class="created">
                    <spring:message code="repository.file.created"/>
                    <span class="val pull-right"></span>
                  </div>
                  <div class="rightsHolder">
                    <spring:message code="repository.file.rightsHolder"/>
                    <span class="val pull-right"></span>
                  </div>
                  <div class="accessRights">
                    <spring:message code="repository.file.accessRights"/>
                    <span class="val pull-right"></span>
                  </div>
                  <div class="license">
                    <div class="caption"><spring:message code="repository.file.license"/></div>
                    <span class="val pull-right"></span>
                  </div>
                  <div class="extent">
                    <spring:message code="repository.file.extent"/>
                    <span class="val pull-right"></span>
                  </div>
                  <div class="bibliographicCitation">
                    <spring:message code="repository.file.bibliographicCitation"/>
                    <span class="val pull-right"></span>
                  </div>
Matija Obreza's avatar
Matija Obreza committed
467

468 469 470 471 472 473 474 475 476 477
                  <!-- Extras -->
                  <div class="downloadLink">
                    <a href=""><spring:message code="repository.gallery.downloadImage"/></a>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </c:if>
Taisiya Glushko's avatar
Taisiya Glushko committed
478

479
      <!-- End: image gallery section -->
Matija Obreza's avatar
Matija Obreza committed
480

481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598
      <!-- source info section -->
      <c:if test="${accessionCollect ne null}">
        <div class="collect-info source-info">
          <h4 class="row section-heading">
            <spring:message code="accession.collecting"/>
          </h4>
          <div class="section-inner-content clearfix">
            <div class="row">
              <c:if test="${accessionCollect.collCode ne null}">
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <spring:message code="accession.collecting.institute"/>
                  </p>
                </div>
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <c:out value="${accessionCollect.collCode}"/>
                  </p>
                  <local:auditlog-changes auditLogs="${auditAccessionCollect['collCode']}"/>
                </div>
              </c:if>
            </div>
            <c:if test="${accessionCollect.collName ne null or accessionCollect.collInstAddress ne null}">
              <div class="row">
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <spring:message code="accession.collecting.institute"/>
                  </p>
                </div>
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p class="ltr">
                    <c:out value="${accessionCollect.collName} ${accessionCollect.collInstAddress}"/>
                  </p>
                  <local:auditlog-changes auditLogs="${auditAccessionCollect['collName']}"/>
                  <local:auditlog-changes auditLogs="${auditAccessionCollect['collInstAddress']}"/>
                </div>
              </div>
            </c:if>
            <c:if test="${accessionCollect.collMissId ne null}">
              <div class="row">
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <spring:message code="accession.collecting.mission"/>
                  </p>
                </div>
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <c:out value="${accessionCollect.collMissId}"/>
                  </p>
                  <local:auditlog-changes auditLogs="${auditAccessionCollect['collMissId']}"/>
                </div>
                <%--				<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12"><a href="<c:url value="/collectingmission"><c:param name="collMissId" value="${accessionCollect.collMissId}" /></c:url>"><c:out value="${accessionCollect.collMissId}" /></a></div> --%>
              </div>
            </c:if>
            <c:if test="${accessionCollect.collDate ne null}">
              <div class="row">
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <spring:message code="accession.collecting.date"/>
                  </p>
                </div>
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <c:out value="${accessionCollect.collDate}"/>
                  </p>
                  <local:auditlog-changes auditLogs="${auditAccessionCollect['collDate']}"/>
                </div>
              </div>
            </c:if>
            <c:if test="${accessionCollect.collNumb ne null}">
              <div class="row">
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <spring:message code="accession.collecting.number"/>
                  </p>
                </div>
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <c:out value="${accessionCollect.collNumb}"/>
                  </p>
                  <local:auditlog-changes auditLogs="${auditAccessionCollect['collNumb']}"/>
                </div>
              </div>
            </c:if>
            <c:if test="${accessionCollect.collSite ne null and accessionCollect.collSite ne ''}">
              <div class="row">
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <spring:message code="accession.collecting.site"/>
                  </p>
                </div>
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <c:out value="${accessionCollect.collSite}"/>
                  </p>
                  <local:auditlog-changes auditLogs="${auditAccessionCollect['collSite']}"/>
                </div>
              </div>
            </c:if>
            <c:if test="${accessionCollect.collSrc ne null}">
              <div class="row">
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <spring:message code="accession.collecting.source"/>
                  </p>
                </div>
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <spring:message code="accession.collectingSource.${accessionCollect.collSrc}"/>
                  </p>
                  <local:auditlog-changes auditLogs="${auditAccessionCollect['collSrc']}" i18n="accession.collectingSource"/>
                </div>
              </div>
            </c:if>
          </div>
        </div>
      </c:if>
      <!-- End: source info section -->
Matija Obreza's avatar
Matija Obreza committed
599

600
      <!-- breeder info section -->
Matija Obreza's avatar
Matija Obreza committed
601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639
       <div class="collect-info breeder-info">
         <h4 class="row section-heading">
           <spring:message code="accession.breeding"/>
         </h4>
         <div class="section-inner-content clearfix">
           <c:if test="${accession.accessionId.breederCode ne null}">
             <div class="row">
               <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                 <p>
                   <spring:message code="accession.breederCode"/>
                 </p>
               </div>
               <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
	              <c:forEach items="${accession.accessionId.breederCode}" var="bredCode">
	                 <p>
	                   <c:out value="${bredCode}"/>
	                 </p>
	               </c:forEach>
                 <local:auditlog-changes auditLogs="${auditAccession['breederCode']}"/>
               </div>
             </div>
           </c:if>
           <c:if test="${accession.ancest ne null}">
             <div class="row">
               <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                 <p>
                   <spring:message code="accession.pedigree"/>
                 </p>
               </div>
               <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                 <p>
                   <c:out value="${accession}"/>
                 </p>
                 <local:auditlog-changes auditLogs="${auditAccession['ancest']}"/>
               </div>
             </div>
           </c:if>
         </div>
       </div>
640
      <!-- End: breeder info section -->
Matija Obreza's avatar
Matija Obreza committed
641

642 643 644 645 646 647 648
      <!-- geo info section -->
      <c:if test="${accessionGeo ne null}">
        <div class="collect-info geo-info">
          <h4 class="row section-heading">
            <spring:message code="accession.geo"/>
          </h4>
          <div class="section-inner-content clearfix">
Matija Obreza's avatar
Matija Obreza committed
649

650
            <c:if test="${accessionGeo.latitude ne null and accessionGeo.longitude ne null}">
Matija Obreza's avatar
Matija Obreza committed
651

652 653 654 655
              <div class="row map-wrapper" 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">
Taisiya Glushko's avatar
Taisiya Glushko committed
656 657 658 659 660 661 662 663 664 665 666 667 668
								  <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> --%>
669 670
              </div>
            </c:if>
Matija Obreza's avatar
Matija Obreza committed
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 729 730 731 732 733 734 735 736 737 738 739 740 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
            <c:if test="${accessionCollect.collSite ne null and accessionCollect.collSite ne ''}">
              <div class="row">
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <spring:message code="accession.collecting.site"/>
                  </p>
                </div>
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <c:out value="${accessionCollect.collSite}"/>
                  </p>
                  <local:auditlog-changes auditLogs="${auditAccessionCollect['collSite']}"/>
                </div>
              </div>
            </c:if>
            <c:if test="${accessionGeo.latitude ne null}">
              <div class="row">
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <spring:message code="accession.geolocation"/>
                  </p>
                </div>
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <c:out value="${accessionGeo.latitude}, ${accessionGeo.longitude}"/>
                  </p>
                  <local:auditlog-changes auditLogs="${auditAccessionGeo['latitude']}"/>
                  <local:auditlog-changes auditLogs="${auditAccessionGeo['longitude']}"/>
                </div>
              </div>
            </c:if>
            <c:if test="${accessionGeo.elevation ne null}">
              <div class="row">
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <spring:message code="accession.elevation"/>
                  </p>
                </div>
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <c:out value="${accessionGeo.elevation}"/>
                    <span class="uom">m</span>
                  </p>
                  <local:auditlog-changes auditLogs="${auditAccessionGeo['elevation']}"/>
                </div>
              </div>
            </c:if>
            <c:if test="${accessionGeo.datum ne null}">
              <div class="row">
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <spring:message code="accession.geo.datum"/>
                  </p>
                </div>
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <c:out value="${accessionGeo.datum}"/>
                  </p>
                  <local:auditlog-changes auditLogs="${auditAccessionGeo['datum']}"/>
                </div>
              </div>
            </c:if>
            <c:if test="${accessionGeo.method ne null}">
              <div class="row">
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <spring:message code="accession.geo.method"/>
                  </p>
                </div>
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <c:out value="${accessionGeo.method}"/>
                  </p>
                  <local:auditlog-changes auditLogs="${auditAccessionGeo['method']}"/>
                </div>
              </div>
            </c:if>
            <c:if test="${accessionGeo.uncertainty ne null}">
              <div class="row">
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <spring:message code="accession.geo.uncertainty"/>
                  </p>
                </div>
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <c:out value="${accessionGeo.uncertainty}"/>
                    <span class="uom">m</span>
                  </p>
                  <local:auditlog-changes auditLogs="${auditAccessionGeo['uncertainty']}"/>
                </div>
              </div>
            </c:if>
          </div>
        </div>
      </c:if>
      <!-- End: geo info section -->
Matija Obreza's avatar
Matija Obreza committed
769

770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791
      <!-- WorldClim.org -->
      <c:if test="${worldclimJson ne null}">
        <div class="collect-info climate-info">
          <h4 class="row section-heading">
            <spring:message code="worldclim.monthly.title"/>
          </h4>
          <div class="section-inner-content clearfix">
            <!-- 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>
              </div>
            </div>
Matija Obreza's avatar
Matija Obreza committed
792

793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860
            <!-- 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>
                </div>
              </div>
            </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>
                </div>
              </div>
            </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>
                </div>
              </div>
            </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>
                </div>
              </div>
            </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>
                </div>
              </div>
            </div>
Matija Obreza's avatar
Matija Obreza committed
861

862
            <%-- Needs work
Matija Obreza's avatar
Matija Obreza committed
863 864 865
		<h4><spring:message code="worldclim.other-climate" /></h4>
		<c:forEach items="${worldclimJson.other.keySet()}" var="worldclimDescriptor">
		<div class="row">
Matija Obreza's avatar
Matija Obreza committed
866 867
			<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12"><c:out value="${worldclimDescriptor.title}" /></div>
			<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12"><fmt:formatNumber value="${worldclimJson.other[worldclimDescriptor]}" /><span class="uom"><c:out value="${worldclimDescriptor.uom}" /></span></div>
Matija Obreza's avatar
Matija Obreza committed
868 869 870
		</div>
		</c:forEach>
		--%>
871 872 873 874
          </div>
        </div>
      </c:if>
      <!-- End: WorldClim.org -->
Matija Obreza's avatar
Matija Obreza committed
875

876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896
      <c:if test="${svalbardDeposits ne null and svalbardDeposits.size() gt 0}">
        <div class="collect-info">
          <h4 class="row section-heading">
            <spring:message code="accession.svalbard-data"/>
          </h4>
          <c:forEach items="${svalbardDeposits}" var="svalbardData">
            <div class="section-inner-content clearfix">
              <div class="row">
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <spring:message code="accession.svalbard-data.url"/>
                  </p>
                </div>
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <a target="_blank" title="<spring:message code=" accession.svalbard-data.url-title" />" href="<c:url value=" http://www.nordgen.org/sgsv/index.php?app=data_unit&unit=sgsv&unit_id=${svalbardData.id}" />">
                      <spring:message code="accession.svalbard-data.url-text" arguments="${svalbardData.acceNumb}"/>
                    </a>
                  </p>
                </div>
              </div>
Matija Obreza's avatar
Matija Obreza committed
897

898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948
              <div class="row">
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <spring:message code="accession.svalbard-data.depositDate"/>
                  </p>
                </div>
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <c:out value="${svalbardData.depositDate}"/>
                  </p>
                </div>
              </div>
              <div class="row">
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <spring:message code="accession.svalbard-data.regenerationInformation"/>
                  </p>
                </div>
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <c:out value="${svalbardData.regenerationInformation}"/>
                  </p>
                </div>
              </div>
              <div class="row">
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <spring:message code="accession.svalbard-data.boxNumber"/>
                  </p>
                </div>
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <c:out value="${svalbardData.boxNumber}"/>
                  </p>
                </div>
              </div>
              <div class="row">
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                  <p>
                    <spring:message code="accession.svalbard-data.quantity"/>
                    <p></div>
                    <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                      <p>
                        <c:out value="${svalbardData.quantity}"/>
                      </p>
                    </div>
                  </div>
                </div>
              </c:forEach>
            </div>
          </c:if>
Matija Obreza's avatar
Matija Obreza committed
949

950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969
          <c:if test="${fn:length(accessionRemarks) gt 0}">
            <div class="collect-info">
              <h4 class="section-heading">
                <spring:message code="accession.remarks"/>
              </h4>
              <div class="section-inner-content clearfix">
                <c:forEach items="${accessionRemarks}" var="accessionRemark">
                  <div class="row">
                    <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                      <c:out value="${accessionRemark.fieldName}"/>
                    </div>
                    <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                      <c:out value="${accessionRemark.remark}"/>
                    </div>
                  </div>
                </c:forEach>
              </div>
            </div>
          </c:if>
        </div>
Matija Obreza's avatar
Matija Obreza committed
970

971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997
        <c:if test="${pdci ne null}">
          <div class="crop-details">
            <div class="data-index collect-info">
              <h4 class="section-heading">
                <spring:message code="accession.pdci"/>
              </h4>
              <div class="section-inner-content clearfix">
                <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>
                  </div>
                </div>
                <div class="">
                  <local:pdci value="${pdci}"/>
                </div>
              </div>
            </div>
          </div>
        </c:if>
Matija Obreza's avatar
Matija Obreza committed
998

999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030
        <c:if test="${methods.size() gt 0}">
          <div class="collect-info">
            <h4 class="section-heading">
              <spring:message code="accession.methods"/>
            </h4>
            <div class="section-inner-content clearfix">
              <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>
          </div>
        </c:if>
Matija Obreza's avatar
Matija Obreza committed
1031

1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056
        <c:if test="${metadatas.size() gt 0}">
          <div class="collect-info">
            <h4 class="section-heading">
              <spring:message code="accession.metadatas"/>
            </h4>
            <div class="section-inner-content clearfix">
              <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>
            </div>
          </div>
        </c:if>
Matija Obreza's avatar
Matija Obreza committed
1057

1058 1059 1060 1061
        <div class="collect-info">
          <div class="section-inner-content clearfix">
            <p>
              <c:if test="${accession.lastModifiedBy ne null}">
1062
                <spring:message code="audit.lastModifiedBy" arguments="${jspHelper.aclSidById(accession.lastModifiedBy).fullName}"/>
1063 1064 1065 1066 1067
              </c:if>
              <local:prettyTime date="${accession.lastModifiedDate}" locale="${pageContext.response.locale}"/>
            </p>
          </div>
        </div>
Matija Obreza's avatar
Matija Obreza committed
1068

1069 1070 1071 1072 1073
        <content tag="javascript">
          <c:if test="${accessionGeo ne null and accessionGeo.latitude ne null}">
            <script type="text/javascript">
              jQuery(document).ready(function () {
                var map = L.map('map', {scrollWheelZoom: false}).setView([
Matija Obreza's avatar
Cleanup  
Matija Obreza committed
1074
                  ${accessionGeo.latitude}, ${accessionGeo.longitude}
1075 1076 1077 1078 1079 1080
                ], 4);
                L.tileLayer('https://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
                }).addTo(map);
                var marker = L.marker([
Matija Obreza's avatar
Cleanup  
Matija Obreza committed
1081
                  ${accessionGeo.latitude}, ${accessionGeo.longitude}
1082 1083 1084 1085 1086 1087
                ]).addTo(map);
              });
            </script>
          </c:if>
          <c:if test="${worldclimJson ne null}">
            <script type="text/javascript">
Matija Obreza's avatar
Cleanup  
Matija Obreza committed
1088 1089
              var monthNames = ${jspHelper.toJson(jspHelper.monthShortNames(pageContext.response.locale))};
              var worldclim = ${jspHelper.toJson(worldclimJson)};
1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172
              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();
Matija Obreza's avatar
Matija Obreza committed
1173

1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202
                temperaturePlot.resize();
                temperaturePlot.setupGrid();
                temperaturePlot.draw();
              });
            </script>
          </c:if>
          <c:if test="${imageGallery ne null}">
            <script type="text/javascript">
              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) {
1203
                var baseHref = '<c:url value="/repository/d/" />';
1204 1205
                var imageViewer = $(imagegalleryFrame).find('.theimage').first();
                var metadataBox = $(imagegalleryFrame).find('.metadata').first();
1206 1207 1208
                imageViewer.attr('src', '<c:url value="${cdnServers.next}/repository/d/" />' + imageUuid.substring(0, 3) + '/' + imageUuid + imageExt);
          			// console.log('Image source: ' + imageViewer.src);
                // console.log(imageViewer.attr('src'));
1209 1210
                $(imagegalleryFrame).show();
                $(metadataBox).hide();
1211

1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246
                // Load metadata
                $.ajax(baseHref + imageUuid.substring(0, 3) + '/' + 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);
                  }
                });
              }
              $(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'));
                }
              });
            </script>
          </c:if>
          <script type="text/javascript">
            <%@ include file="/WEB-INF/jsp/wiews/ga.jsp" %>
            _pageDim = { institute: '${accession.instituteCode}', genus: '${accession.taxonomy.genus}' };
          </script>
        </content>
      </body>
    </html>