germplasm.html 22.5 KB
Newer Older
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
1
2
3
4
<!DOCTYPE html>

<html
  xmlns:th="http://www.thymeleaf.org"
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
5
  th:replace="~{layout/main :: layout(title=~{::title}, content=~{::main}, script=~{::script})}"
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
>
<head>
  <title>Germplasm: <th:block th:text="${model.germplasm.germplasmName}" /></title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>

<body>
<main>
  <div class="d-flex">
    <h1 class="flex-grow-1">Germplasm: <th:block th:text="${model.germplasm.germplasmName}" /></h1>
    <div th:if="${model.germplasm.holdingGenbank != null && model.germplasm.holdingGenbank.logo != null}">
      <img th:src="${model.germplasm.holdingGenbank.logo}" th:alt="${model.germplasm.holdingGenbank.instituteName}" />
    </div>
  </div>

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
21
22
  <div th:replace="fragments/map::map"></div>

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
23
  <div class="row align-items-center justify-content-center mt-4">
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
24
25
26
27
28
29
30
31
32
33
34
35
36
    <div class="col-auto field" th:if="${model.germplasm.photo != null && model.germplasm.photo.thumbnailFile != null}">
      <template id="photo-popover">
        <div class="card">
          <img th:src="${model.germplasm.photo.file}" class="card-img-top" alt="">
          <div class="card-body">
            <div th:replace="fragments/row::text-row(label='Accession name', text=${model.germplasm.germplasmName})"></div>
            <div th:replace="fragments/row::text-row(label='Photo name', text=${model.germplasm.photo.photoName})"></div>
            <div th:replace="fragments/row::text-row(label='Description', text=${model.germplasm.photo.description})"></div>
            <div th:replace="fragments/row::text-row(label='Copyright', text=${model.germplasm.photo.copyright})"></div>
          </div>
        </div>
      </template>

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
37
38
39
40
41
42
43
44
      <a role="button"
         class="d-flex flex-column align-items-center"
         data-bs-toggle="popover"
         tabindex="0"
         th:data-bs-title="${model.germplasm.photo.photoName}"
         data-bs-element="#photo-popover"
         data-bs-container="body"
         data-bs-trigger="focus">
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
45
46
47
48
49
        <img th:src="${model.germplasm.photo.thumbnailFile}" class="img-fluid" />

        <figcaption class="figure-caption">
          © <span th:text="${model.germplasm.photo.copyright}"></span>
        </figcaption>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
50
      </a>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
51
52
53
    </div>

    <div class="col-12 col-lg">
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
54
55
      <div class="f-card">
        <h2>Identification</h2>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
56

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
57
58
59
        <div class="f-card-body">
          <div th:replace="fragments/row::text-row(label='Germplasm name', text=${model.germplasm.germplasmName})"></div>
          <div th:replace="fragments/row::text-row(label='Accession number', text=${model.germplasm.accessionNumber})"></div>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
60

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
61
          <div th:replace="fragments/source::source(source=${model.source}, url=${model.germplasm.url}, entityType='germplasm')"></div>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
62

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
63
64
65
66
67
          <th:block th:unless="${#lists.isEmpty(model.germplasm.synonyms)}">
            <div th:replace="fragments/row::row(label='Accession synonyms', content=~{::#accession-synonyms})">
              <div id="accession-synonyms" class="content-overflow" th:text="${#strings.listJoin(model.germplasm.synonyms, ', ')}"></div>
            </div>
          </th:block>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
68

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
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
          <th:block th:unless="${#strings.isEmpty(model.taxon)}">
            <div th:replace="fragments/row::row(label='Taxon', content=~{::#taxon})">
              <div id="taxon">
                <template id="taxon-popover">
                  <th:block th:unless="${#strings.isEmpty(model.germplasm.genus)}">
                    <div th:replace="fragments/row::row(label='Genus', content=~{::#taxon-genus})">
                      <em id="taxon-genus" th:text="${model.germplasm.genus}"></em>
                    </div>
                  </th:block>
                  <th:block th:unless="${#strings.isEmpty(model.germplasm.species)}">
                    <div th:replace="fragments/row::row(label='Species', content=~{::#taxon-species})">
                      <span id="taxon-species">
                        <em th:text="${model.germplasm.species}"></em>
                        <span th:unless="${#strings.isEmpty(model.germplasm.speciesAuthority)}"
                              th:text="${'(' + model.germplasm.speciesAuthority + ')'}"></span>
                      </span>
                    </div>
                  </th:block>
                  <th:block th:unless="${#strings.isEmpty(model.germplasm.subtaxa)}">
                    <div th:replace="fragments/row::row(label='Subtaxa', content=~{::#taxon-subtaxa})">
                      <span id="taxon-subtaxa">
                        <em th:text="${model.germplasm.subtaxa}"></em>
                        <span th:unless="${#strings.isEmpty(model.germplasm.subtaxaAuthority)}"
                              th:text="${'(' + model.germplasm.subtaxaAuthority + ')'}"></span>
                      </span>
                    </div>
                  </th:block>

                  <div th:replace="fragments/row::text-row(label='Authority', text=${model.taxonAuthor})"></div>

                  <th:block th:unless="${#lists.isEmpty(model.germplasm.taxonIds)}">
                    <div th:replace="fragments/row::row(label='Taxon IDs', content=~{::#taxon-ids})">
                      <div id="taxon-ids">
                        <div th:each="taxonId : ${model.germplasm.taxonIds}" class="row">
                          <div class="col-6 text-nowrap" th:text="${taxonId.sourceName}"></div>
                          <div class="col-6">
                            <span class="taxon-id"
                                  th:replace="fragments/link::link(label=${taxonId.taxonId}, url=${#faidare.taxonIdUrl(taxonId)})"></span>
                          </div>
                        </div>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
109
110
                      </div>
                    </div>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
111
                  </th:block>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
112

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
                  <div th:replace="fragments/row::text-row(label='Comment', text=${model.germplasm.taxonComment})"></div>
                  <th:block th:unless="${#lists.isEmpty(model.germplasm.taxonCommonNames)}">
                    <div th:replace="fragments/row::row(label='Taxon common names', content=~{::#taxon-common-names})">
                      <div id="taxon-common-names" class="content-overflow" th:text="${#strings.listJoin(model.germplasm.taxonCommonNames, ', ')}"></div>
                    </div>
                  </th:block>
                  <th:block th:unless="${#lists.isEmpty(model.germplasm.taxonSynonyms)}">
                    <div th:replace="fragments/row::row(label='Taxon synonyms', content=~{::#taxon-synonyms})">
                      <div id="taxon-synonyms" class="content-overflow" th:text="${#strings.listJoin(model.germplasm.taxonSynonyms, ', ')}"></div>
                    </div>
                  </th:block>
                </template>
                <a role="button"
                   tabindex="0"
                   data-bs-toggle="popover"
                   th:data-bs-title="${model.taxon}"
                   data-bs-element="#taxon-popover"
                   data-bs-container="body"
                   data-bs-trigger="focus">
                  <em th:text="${model.taxon}"></em>
                  <th:block th:unless="${#strings.isEmpty(model.taxonAuthor)}">(<span th:text="${model.taxonAuthor}"></span>)</th:block>
                </a>
              </div>
            </div>
          </th:block>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
138

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
139
140
141
142
143
          <div th:replace="fragments/row::text-row(label='Biological status', text=${model.germplasm.biologicalStatusOfAccessionCode})"></div>
          <div th:replace="fragments/row::text-row(label='Genetic nature', text=${model.germplasm.geneticNature})"></div>
          <div th:replace="fragments/row::text-row(label='Seed source', text=${model.germplasm.seedSource})"></div>
          <div th:replace="fragments/row::text-row(label='Pedigree', text=${model.germplasm.pedigree})"></div>
          <div th:replace="fragments/row::text-row(label='Comments', text=${model.germplasm.comment})"></div>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
144

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
145
146
147
148
149
          <th:block th:if="${model.germplasm.originSite != null && !#strings.isEmpty(model.germplasm.originSite.siteName)}">
            <div th:replace="fragments/row::row(label='Origin site', content=~{::#origin-site})">
              <a id="origin-site" th:href="@{/sites/{siteId}(siteId=${#faidare.toSiteParam(model.germplasm.originSite.siteId)})}" th:text="${model.germplasm.originSite.siteName}"></a>
            </div>
          </th:block>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
150
        </div>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
151
      </div>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
152
153
154
    </div>
  </div>

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
155
  <div class="f-card" th:if="${model.germplasm.holdingInstitute}">
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
156
    <h2>Depositary</h2>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
157
158
159
160
161
162
163
164
165
166
167
168
169
170
    <div class="f-card-body">
      <template id="holding-institute-popover">
        <div th:replace="fragments/institute::institute(institute=${model.germplasm.holdingInstitute})"></div>
      </template>
      <div th:replace="fragments/row::row(label='Institution', content=~{::#institution})">
        <a id="institution"
           role="button"
           tabindex="0"
           data-bs-toggle="popover"
           th:data-bs-title="${model.germplasm.holdingInstitute.instituteName}"
           data-bs-element="#holding-institute-popover"
           data-bs-container="body"
           data-bs-trigger="focus"
           th:text="${model.germplasm.holdingInstitute.instituteName}"></a>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
171
172
      </div>

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
173
174
175
176
177
178
179
180
181
182
183
184
      <th:block th:if="${model.germplasm.holdingGenbank != null && !#strings.isEmpty(model.germplasm.holdingGenbank.instituteName) && !#strings.isEmpty(model.germplasm.holdingGenbank.webSite)}">
        <div th:replace="fragments/row::row(label='Stock center name', content=~{::#stock-center-name})">
          <a id="stock-center-name"
             target="_blank"
             th:href="${model.germplasm.holdingGenbank.webSite}"
             th:text="${model.germplasm.holdingGenbank.instituteName}"></a>
        </div>
      </th:block>

      <div th:replace="fragments/row::text-row(label='Presence status', text=${model.germplasm.presenceStatus})"></div>
    </div>
  </div>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
185

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
186
  <div class="f-card" th:if="${model.collecting}">
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
187
    <h2>Collector</h2>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
188
189
190
191
192
193
194
195
196
    <div class="f-card-body">
      <th:block th:if="${model.germplasm.collectingSite != null && !#strings.isEmpty(model.germplasm.collectingSite.siteName)}">
        <div th:replace="fragments/row::row(label='Collecting site', content=~{::#collecting-site})">
          <a id="collecting-site"
             th:href="@{/sites/{siteId}(siteId=${#faidare.toSiteParam(model.germplasm.collectingSite.siteId)})}"
             th:text="${model.germplasm.collectingSite.siteName}"
          ></a>
        </div>
      </th:block>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
197

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
198
199
      <div th:replace="fragments/row::text-row(label='Material type', text=${model.germplasm.collector.materialType})"></div>
      <div th:replace="fragments/row::text-row(label='Collectors', text=${model.germplasm.collector.collectors})"></div>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
200

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
201
202
203
      <th:block th:if="${!#strings.isEmpty(model.germplasm.acquisitionDate) && model.germplasm.collector.accessionCreationDate == null}">
        <div th:replace="fragments/row::text-row(label='Acquisition / Creation date', text=${model.germplasm.acquisitionDate})"></div>
      </th:block>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
204

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
      <th:block th:if="${model.germplasm.collector.institute != null && !#strings.isEmpty(model.germplasm.collector.institute.instituteName)}">
        <template id="collector-institute-popover">
          <div th:replace="fragments/institute::institute(institute=${model.germplasm.collector.institute})"></div>
        </template>
        <div th:replace="fragments/row::row(label='Institution', content=~{::#collecting-institution})">
          <a id="collecting-institution"
             role="button"
             tabindex="0"
             data-bs-toggle="popover"
             th:data-bs-title="${model.germplasm.collector.institute.instituteName}"
             data-bs-element="#collector-institute-popover"
             data-bs-container="body"
             data-bs-trigger="focus"
             th:text="${model.germplasm.collector.institute.instituteName}"></a>
        </div>
      </th:block>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
221

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
222
223
224
      <div th:replace="fragments/row::text-row(label='Accession number', text=${model.germplasm.collector.accessionNumber})"></div>
    </div>
  </div>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
225

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
226
  <div class="f-card" th:if="${model.breeding}">
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
227
    <h2>Breeder</h2>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
    <div class="f-card-body">
      <th:block th:if="${model.germplasm.breeder.institute != null && !#strings.isEmpty(model.germplasm.breeder.institute.instituteName)}">
        <template id="breeder-institute-popover">
          <div th:replace="fragments/institute::institute(institute=${model.germplasm.breeder.institute})"></div>
        </template>
        <div th:replace="fragments/row::row(label='Institute', content=~{::#breeding-institution})">
          <a id="breeding-institution"
             role="button"
             tabindex="0"
             data-bs-toggle="popover"
             th:data-bs-title="${model.germplasm.breeder.institute.instituteName}"
             data-bs-element="#breeder-institute-popover"
             data-bs-container="body"
             data-bs-trigger="focus"
             th:text="${model.germplasm.breeder.institute.instituteName}"></a>
        </div>
      </th:block>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
245

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
246
247
248
249
250
251
      <div th:replace="fragments/row::text-row(label='Accession creation year', text=${model.germplasm.breeder.accessionCreationDate})"></div>
      <div th:replace="fragments/row::text-row(label='Accession number', text=${model.germplasm.breeder.accessionNumber})"></div>
      <div th:replace="fragments/row::text-row(label='Catalog registration year', text=${model.germplasm.breeder.registrationYear})"></div>
      <div th:replace="fragments/row::text-row(label='Catalog deregistration year', text=${model.germplasm.breeder.deregistrationYear})"></div>
    </div>
  </div>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
252

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
253
  <div class="f-card" th:unless="${#lists.isEmpty(model.germplasm.donors)}">
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
254
    <h2>Donors</h2>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
255
256
257
    <div class="f-card-body">
      <div class="scroll-table-container">
        <table class="table table-sm table-striped table-sticky table-responsive-sm">
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
          <thead>
            <tr>
              <th scope="col">Institute name</th>
              <th scope="col">Institute code</th>
              <th scope="col">Donation date</th>
              <th scope="col">Accession number</th>
              <th scope="col">Accession PUI</th>
            </tr>
          </thead>
          <tbody>
            <tr th:each="row, donorIterStat : ${model.germplasm.donors}">
              <td>
                <template th:id="${'donor-institute-popover-' + donorIterStat.index}">
                  <div th:replace="fragments/institute::institute(institute=${row.donorInstitute})"></div>
                </template>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
273
274
275
276
277
278
279
280
                <a role="button"
                   tabindex="0"
                   data-bs-toggle="popover"
                   th:data-bs-title="${row.donorInstitute.instituteName}"
                   th:data-bs-element="${'#donor-institute-popover-' + donorIterStat.index}"
                   data-bs-container="body"
                   data-bs-trigger="focus"
                   th:text="${row.donorInstitute.instituteName}"></a>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
281
282
283
284
285
286
287
288
289
290
              </td>
              <td th:text="${row.donorInstituteCode}"></td>
              <td th:text="${row.donationDate}"></td>
              <td th:text="${row.donorAccessionNumber}"></td>
              <td th:text="${row.donorGermplasmPUI}"></td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
291
  </div>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
292

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
293
294
295
296
297
  <div class="f-card" th:unless="${#lists.isEmpty(model.germplasm.distributors)}">
    <h2>Distributors</h2>
    <div class="f-card-body">
      <div class="scroll-table-container">
        <table class="table table-sm table-striped table-sticky table-responsive-sm">
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
298
299
300
301
302
303
304
305
306
307
308
309
310
          <thead>
            <tr>
              <th scope="col">Institute</th>
              <th scope="col">Accession number</th>
              <th scope="col">Distribution status</th>
            </tr>
          </thead>
          <tbody>
            <tr th:each="row, distributorIterStat : ${model.germplasm.distributors}">
              <td>
                <template th:id="${'distributor-institute-popover-' + distributorIterStat.index}">
                  <div th:replace="fragments/institute::institute(institute=${row.institute})"></div>
                </template>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
311
312
313
314
315
316
317
                <a role="button"
                   tabindex="0"
                   th:data-bs-title="${row.institute.instituteName}"
                   th:data-bs-element="${'#distributor-institute-popover-' + distributorIterStat.index}"
                   data-bs-container="body"
                   data-bs-trigger="focus"
                   th:text="${row.institute.instituteName}"></a>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
318
319
320
321
322
323
324
325
              </td>
              <td th:text="${row.accessionNumber}"></td>
              <td th:text="${row.distributionStatus}"></td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
326
  </div>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
327

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
328
  <div class="f-card" th:unless="${#lists.isEmpty(model.attributes)}">
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
329
    <h2>Evaluation Data</h2>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
330
331
332
333
334
335
    <div class="f-card-body">
      <th:block th:each="descriptor : ${model.attributes}">
        <div th:replace="fragments/row::text-row(label=${descriptor.attributeName}, text=${descriptor.value})"></div>
      </th:block>
    </div>
  </div>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
336

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
337
  <div class="f-card" th:if="${model.genealogyPresent}">
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
338
    <h2>Genealogy</h2>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
339
340
341
342
343
344
345
346
347
348
349
350
351
    <div class="f-card-body">
      <th:block th:if="${model.pedigree != null}">
        <div th:replace="fragments/row::text-row(label='Crossing plan', text=${model.pedigree.crossingPlan})"></div>
        <div th:replace="fragments/row::text-row(label='Crossing year', text=${model.pedigree.crossingYear})"></div>
        <div th:replace="fragments/row::text-row(label='Family code', text=${model.pedigree.familyCode})"></div>
        <th:block th:unless="${#strings.isEmpty(model.pedigree.parent1Name)}">
          <div th:replace="fragments/row::row(label='Parent accessions', content=~{::#parent-accessions})">
            <div id="parent-accessions">
              <th:block th:if="${model.pedigree.parent1DbId}">
                <div th:replace="fragments/row::row(label=${model.pedigree.parent1Type}, content=~{::#parent1-link})">
                  <a id="parent1-link" th:href="@{/germplasms/{germplasmId}(germplasmId=${model.pedigree.parent1DbId})}" th:text="${model.pedigree.parent1Name}"></a>
                </div>
              </th:block>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
352

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
353
354
355
356
357
358
359
360
              <th:block th:if="${model.pedigree.parent2DbId}">
                <div th:replace="fragments/row::row(label=${model.pedigree.parent2Type}, content=~{::#parent2-link})">
                  <a id="parent2-link" th:href="@{/germplasms/{germplasmId}(germplasmId=${model.pedigree.parent2DbId})}" th:text="${model.pedigree.parent2Name}"></a>
                </div>
              </th:block>
            </div>
          </div>
        </th:block>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
361

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
362
363
364
365
366
367
368
        <th:block th:unless="${#lists.isEmpty(model.pedigree.siblings)}">
          <div th:replace="fragments/row::row(label='Sibling accessions', content=~{::#sibling-accessions})">
            <div id="sibling-accessions" class="content-overflow">
              <a th:each="sibling : ${model.pedigree.siblings}"
                 th:href="@{/germplasms/{germplasmId}(germplasmId=${sibling.germplasmDbId})}"
                 th:text="${sibling.defaultDisplayName}"></a>
            </div>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
369
          </div>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
370
        </th:block>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
371
372
      </th:block>

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
373
374
375
376
377
378
379
380
381
382
383
384
385
      <th:block th:unless="${#lists.isEmpty(model.germplasm.children)}">
        <div th:replace="fragments/row::row(label='Descendants', content=~{::#descendants})">
          <div id="descendants" class="content-overflow content-overflow-big">
            <th:block th:each="child : ${model.germplasm.children}">
              <div th:replace="fragments/row::row(label=${#strings.isEmpty(child.secondParentName) ? ('children of ' + child.firstParentName) : ('children of ' + child.firstParentName + ' x ' + child.secondParentName) }, content=~{::.descendant-child})">
                <div class="descendant-child">
                  <th:block th:each="sibling, siblingIterStat : ${child.sibblings}">
                    <a th:href="@{/germplasms(pui=${sibling.pui})}"
                       th:text="${sibling.name}"></a><th:block th:unless="${siblingIterStat.last}">, </th:block>
                  </th:block>
                </div>
              </div>
            </th:block>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
386
387
388
          </div>
        </div>
      </th:block>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
    </div>
  </div>

  <div class="f-card" th:unless="${#lists.isEmpty(model.germplasm.population)}">
    <h2>Population</h2>
    <div class="f-card-body">
      <th:block th:each="population : ${model.germplasm.population}">

        <th:block th:if="${population.germplasmRef != null}">
          <th:block th:unless="${#strings.isEmpty(population.germplasmRef.pui)}">
            <div th:replace="fragments/row::row(label=${#faidare.collPopTitle(population)}, content=~{::.population-1})">
              <div class="population-1">
                <a th:if="${population.germplasmRef.pui != model.germplasm.germplasmPUI}"
                   th:href="@{/germplasms(pui=${population.germplasmRef.pui})}"
                   th:text="${population.germplasmRef.name}"></a>
                <span th:if="${population.germplasmRef.pui == model.germplasm.germplasmPUI}"
                      th:text="${population.germplasmRef.name}"></span>
                is composed by <span th:text="${population.germplasmCount}"></span> accession(s)
                <!-- TODO there was a link pointing at a search here -->
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
408
409
410
              </div>
            </div>
          </th:block>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
411
        </th:block>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
412

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
413
414
415
        <th:block th:if="${population.germplasmRef == null}">
          <div th:replace="fragments/row::text-row(label=${#faidare.collPopTitle(population)}, text=${population.germplasmCount + ' accession(s)'})"></div>
          <!-- TODO there was a link pointing at a search here -->
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
416
417
        </th:block>
      </th:block>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
418
419
    </div>
  </div>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
420

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
421
422
423
424
425
  <div class="f-card" th:unless="${#lists.isEmpty(model.germplasm.collection)}">
    <h2>Collection</h2>
    <div class="f-card-body">
      <th:block th:each="collection : ${model.germplasm.collection}">
        <div th:replace="fragments/row::text-row(label=${#faidare.collPopTitle(collection)}, text=${collection.germplasmCount + ' accession(s)'})"></div>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
426
427
        <!-- TODO there was a link pointing at a search here -->
      </th:block>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
428
429
    </div>
  </div>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
430

Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
431
  <div class="f-card" th:unless="${#lists.isEmpty(model.germplasm.panel)}">
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
432
    <h2>Panel</h2>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
433
434
435
436
437
438
439
    <div class="f-card-body">
      <th:block th:each="panel : ${model.germplasm.panel}">
        <div th:replace="fragments/row::text-row(label=${#faidare.collPopTitleWithoutUnderscores(panel)}, text=${panel.germplasmCount + ' accession(s)'})"></div>
        <!-- TODO there was a link pointing at a search here -->
      </th:block>
    </div>
  </div>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
440
441
442

  <div th:replace="fragments/xrefs::xrefs(crossReferences=${model.crossReferences})"></div>
</main>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
443
444
445
446
447

<script th:inline="javascript">
  faidare.initializePopovers();
  faidare.initializeMap({
    contextPath: [[${#request.getContextPath()}]],
Exbrayat Cédric's avatar
Exbrayat Cédric committed
448
    locations: /* TODO [[${model.mapLocations}]]*/ []
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
449
450
  });
</script>
Jean-Baptiste Nizet's avatar
Jean-Baptiste Nizet committed
451
452
</body>
</html>