site.html 3.96 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<!DOCTYPE html>

<html
  xmlns:th="http://www.thymeleaf.org"
  th:replace="~{layout/main :: layout(title=~{::title}, content=~{::main})}"
>
<head>
  <title>Site <th:block th:text="${model.site.locationName}" /></title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>

<body>
<main>
  <h1>Site <th:block th:text="${model.site.locationName}" /></h1>

16
17
18
  <th:block th:if="${model.site.uri != null && !model.site.uri.startsWith('urn:')}">
    <div th:replace="fragments/row::text-row(label='Permanent unique identifier', text=${model.site.uri})"></div>
  </th:block>
19

20
21
22
23
24
25
26
  <th:block th:if="${model.source != null}">
    <div th:replace="fragments/row::row(label='Source', content=~{::#source})">
      <a id="source" target="_blank" th:href="${model.source.url}">
        <img style="max-height: 60px;" th:src="${model.source.image}" th:alt="${model.source.name} + ' logo'" />
      </a>
    </div>
  </th:block>
27

28
29
30
31
32
33
34
35
  <th:block th:if="${model.site.url != null && model.source != null}">
    <div
         th:replace="fragments/row::row(label='Data link', content=~{::#url})">
      <a id="url" target="_blank" th:href="${model.site.url}">
        Link to this site on <th:block th:text="${model.source.name}" />
      </a>
    </div>
  </th:block>
36
37
38
39
40
41
42

  <div th:replace="fragments/row::text-row(label='Abbreviation', text=${model.site.abbreviation})"></div>
  <div th:replace="fragments/row::text-row(label='Type', text=${model.site.locationType})"></div>
  <div th:replace="fragments/row::text-row(label='Status', text=${model.siteStatus})"></div>
  <div th:replace="fragments/row::text-row(label='Institution/Landowner', text=${model.site.instituteName})"></div>
  <div th:replace="fragments/row::text-row(label='Institution address', text=${model.site.instituteAddress})"></div>
  <div th:replace="fragments/row::text-row(label='Coordinates precision', text=${model.coordinatesPrecision})"></div>
43
44
45
46
47
48
  <th:block th:if="${model.site.latitude}">
    <div th:replace="fragments/row::text-row(label='Latitude', text=${#coordinates.formatLatitude(model.site.latitude)})"></div>
  </th:block>
  <th:block th:if="${model.site.longitude}">
    <div th:replace="fragments/row::text-row(label='Longitude', text=${#coordinates.formatLongitude(model.site.longitude)})"></div>
  </th:block>
49
  <div th:replace="fragments/row::text-row(label='Geographical location', text=${model.geographicalLocation})"></div>
50
51
52
53
54
55
56
57
  <th:block th:if="${model.site.countryName != null && model.geographicalLocation == null}">
    <div th:replace="fragments/row::text-row(label='Country name', text=${model.site.countryName})"></div>
  </th:block>

  <th:block th:if="${model.site.countryCode != null && model.geographicalLocation == null}">
    <div th:replace="fragments/row::text-row(label='Country code', text=${model.site.countryName})"></div>
  </th:block>

58
59
60
61
62
63
64
65
66
  <div th:replace="fragments/row::text-row(label='Altitude', text=${model.site.altitude})"></div>
  <div th:replace="fragments/row::text-row(label='Slope', text=${model.slope})"></div>
  <div th:replace="fragments/row::text-row(label='Exposure', text=${model.exposure})"></div>
  <div th:replace="fragments/row::text-row(label='Topography', text=${model.topography})"></div>
  <div th:replace="fragments/row::text-row(label='Environment type', text=${model.environmentType})"></div>
  <div th:replace="fragments/row::text-row(label='Distance to city', text=${model.distanceToCity})"></div>
  <div th:replace="fragments/row::text-row(label='Direction from city', text=${model.directionFromCity})"></div>
  <div th:replace="fragments/row::text-row(label='Comment', text=${model.comment})"></div>

67
  <th:block th:unless="${#lists.isEmpty(model.additionalInfoProperties)}">
68
69
70
71
    <h2>Additional info</h2>
    <th:block th:each="prop : ${model.additionalInfoProperties}">
      <div th:replace="fragments/row::text-row(label=${prop.key}, text=${prop.value})"></div>
    </th:block>
72
73
  </th:block>

74
  <div th:replace="fragments/xrefs::xrefs(crossReferences=${model.crossReferences})"></div>
75
76
77
</main>
</body>
</html>