@eeacms/volto-datahub 1.0.10 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -1
- package/package.json +1 -1
- package/src/components/ItemView/Datasets.jsx +136 -115
- package/src/components/ItemView/ItemView.jsx +4 -4
- package/src/components/ItemView/MetadataSection.jsx +66 -59
- package/src/components/ItemView/MoreLikeThis.jsx +28 -26
- package/src/components/LandingPage/DatahubLandingPage.jsx +22 -20
package/CHANGELOG.md
CHANGED
|
@@ -4,12 +4,27 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
### [1.0.12](https://github.com/eea/volto-datahub/compare/1.0.11...1.0.12) - 9 February 2023
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- Small change: renaming [kreafox - [`cb2ea49`](https://github.com/eea/volto-datahub/commit/cb2ea492bace5b2608bfa17d26b0cbf08be6a962)]
|
|
12
|
+
- Fix undefined in datasets tab [kreafox - [`57ef7e0`](https://github.com/eea/volto-datahub/commit/57ef7e00e554c3a08996ec284ca33350c582c3a5)]
|
|
13
|
+
- Undo some changes [kreafox - [`7d1e80b`](https://github.com/eea/volto-datahub/commit/7d1e80b59385664873d240c2bc56137f3139c88d)]
|
|
14
|
+
- Use "missing" instead of undefined in datasets tab [kreafox - [`e215775`](https://github.com/eea/volto-datahub/commit/e215775fa22c2ac01e39151ba96f7c833e9aefd6)]
|
|
15
|
+
### [1.0.11](https://github.com/eea/volto-datahub/compare/1.0.10...1.0.11) - 7 February 2023
|
|
16
|
+
|
|
17
|
+
#### :hammer_and_wrench: Others
|
|
18
|
+
|
|
19
|
+
- Use list instead of cards [kreafox - [`952cba9`](https://github.com/eea/volto-datahub/commit/952cba9be659f635ae7c5c0e804f2a9ea1d5c4b5)]
|
|
20
|
+
- Small fix: move style wrapper [kreafox - [`7d169c3`](https://github.com/eea/volto-datahub/commit/7d169c3e03328431c4430d0f08d4d1152d475aa9)]
|
|
21
|
+
- Improve dataset view [kreafox - [`f7eafe0`](https://github.com/eea/volto-datahub/commit/f7eafe0ba477f5e8f5b42b621b94ee982ff3bd4e)]
|
|
22
|
+
- Group datasets by publication year [kreafox - [`3470c25`](https://github.com/eea/volto-datahub/commit/3470c25283106bb64c8216ed2304193c85be1e66)]
|
|
7
23
|
### [1.0.10](https://github.com/eea/volto-datahub/compare/1.0.9...1.0.10) - 18 January 2023
|
|
8
24
|
|
|
9
25
|
#### :hammer_and_wrench: Others
|
|
10
26
|
|
|
11
27
|
- Remove unused import [Tiberiu Ichim - [`49bbbc8`](https://github.com/eea/volto-datahub/commit/49bbbc87a5f6235aa2f258a1712db4a8c93dfb80)]
|
|
12
|
-
- Fix date [Tiberiu Ichim - [`a31cce0`](https://github.com/eea/volto-datahub/commit/a31cce052f92174e6692ad3a1665e56194bad38e)]
|
|
13
28
|
### [1.0.9](https://github.com/eea/volto-datahub/compare/1.0.8...1.0.9) - 17 January 2023
|
|
14
29
|
|
|
15
30
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Icon, List, Accordion } from 'semantic-ui-react';
|
|
2
|
+
import { Icon, List, Accordion, Tab } from 'semantic-ui-react';
|
|
3
3
|
import servicesSVG from './icons/services.svg';
|
|
4
4
|
import lockSVG from 'remixicon/icons/System/lock-line.svg';
|
|
5
5
|
|
|
@@ -24,6 +24,15 @@ const is_internal = (dataset) => {
|
|
|
24
24
|
return internal;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
+
const groupBy = (obj, key) => {
|
|
28
|
+
return obj.reduce((rv, item) => {
|
|
29
|
+
const group = rv[item[key]] || [];
|
|
30
|
+
group.push(item);
|
|
31
|
+
rv[item[key]] = group;
|
|
32
|
+
return rv;
|
|
33
|
+
}, {});
|
|
34
|
+
};
|
|
35
|
+
|
|
27
36
|
const SVGIcon = ({ name, size, color, className, title, onClick }) => {
|
|
28
37
|
return (
|
|
29
38
|
<svg
|
|
@@ -41,13 +50,7 @@ const SVGIcon = ({ name, size, color, className, title, onClick }) => {
|
|
|
41
50
|
|
|
42
51
|
const DatasetList = (props) => {
|
|
43
52
|
const { link } = props;
|
|
44
|
-
|
|
45
|
-
const dataset = link.reduce((dataset, item) => {
|
|
46
|
-
const group = dataset[item.protocol] || [];
|
|
47
|
-
group.push(item);
|
|
48
|
-
dataset[item.protocol] = group;
|
|
49
|
-
return dataset;
|
|
50
|
-
}, {});
|
|
53
|
+
const dataset = groupBy(link, 'protocol');
|
|
51
54
|
|
|
52
55
|
return (
|
|
53
56
|
<div>
|
|
@@ -268,7 +271,7 @@ const Datasets = (props) => {
|
|
|
268
271
|
const { item, appConfig } = props;
|
|
269
272
|
const { children } = item?.raw_value?.raw || {};
|
|
270
273
|
|
|
271
|
-
const [activeIndex, setActiveIndex] = React.useState(
|
|
274
|
+
const [activeIndex, setActiveIndex] = React.useState(-1);
|
|
272
275
|
|
|
273
276
|
function handleClick(e, titleProps) {
|
|
274
277
|
const { index } = titleProps;
|
|
@@ -276,7 +279,7 @@ const Datasets = (props) => {
|
|
|
276
279
|
setActiveIndex(newIndex);
|
|
277
280
|
}
|
|
278
281
|
|
|
279
|
-
const
|
|
282
|
+
const sortedDatasets = React.useMemo(
|
|
280
283
|
() =>
|
|
281
284
|
(children || []).sort(
|
|
282
285
|
(a, b) =>
|
|
@@ -286,124 +289,142 @@ const Datasets = (props) => {
|
|
|
286
289
|
[children],
|
|
287
290
|
);
|
|
288
291
|
|
|
289
|
-
|
|
290
|
-
// console.log('children', children);
|
|
292
|
+
const datasets = groupBy(sortedDatasets, 'publicationYearForResource');
|
|
291
293
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
294
|
+
const panes = Object.keys(datasets).map((dataset) => ({
|
|
295
|
+
menuItem: dataset === 'undefined' ? 'Missing' : dataset,
|
|
296
|
+
render: () => (
|
|
297
|
+
<Tab.Pane>
|
|
298
|
+
<Accordion>
|
|
299
|
+
{datasets[dataset].map((dataset, index) => {
|
|
300
|
+
const { resourceTemporalExtentDetails } = dataset;
|
|
301
|
+
return (
|
|
302
|
+
<React.Fragment key={index}>
|
|
303
|
+
<Accordion.Title
|
|
304
|
+
active={activeIndex === index}
|
|
305
|
+
index={index}
|
|
306
|
+
onClick={handleClick}
|
|
307
|
+
>
|
|
308
|
+
<span className="dataset-title">
|
|
309
|
+
{dataset.resourceTitleObject.default}
|
|
310
|
+
<span className="formats">
|
|
311
|
+
{(dataset.format || []).map((item, i) => {
|
|
312
|
+
return (
|
|
313
|
+
<span className="format-label" key={i}>
|
|
314
|
+
{item}
|
|
315
|
+
</span>
|
|
316
|
+
);
|
|
317
|
+
})}
|
|
295
318
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
319
|
+
{Array.isArray(dataset.linkProtocol) ? (
|
|
320
|
+
<>
|
|
321
|
+
{dataset.linkProtocol
|
|
322
|
+
.filter(
|
|
323
|
+
(i) => i.includes('ESRI') || i.includes('OGC'),
|
|
324
|
+
)
|
|
325
|
+
.map((item, i) => {
|
|
326
|
+
return (
|
|
327
|
+
<span className="format-label" key={i}>
|
|
328
|
+
{item}
|
|
329
|
+
</span>
|
|
330
|
+
);
|
|
331
|
+
})}
|
|
332
|
+
</>
|
|
333
|
+
) : (
|
|
334
|
+
<>
|
|
335
|
+
{['ESRI', 'OGC'].includes(dataset.linkProtocol) && (
|
|
336
|
+
<span className="format-label">
|
|
337
|
+
{dataset.linkProtocol}
|
|
338
|
+
</span>
|
|
339
|
+
)}
|
|
340
|
+
</>
|
|
341
|
+
)}
|
|
342
|
+
</span>
|
|
299
343
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
<span className="format-label" key={i}>
|
|
313
|
-
{item}
|
|
314
|
-
</span>
|
|
315
|
-
);
|
|
316
|
-
})}
|
|
344
|
+
{is_internal(dataset) && (
|
|
345
|
+
<SVGIcon name={lockSVG} size="18" />
|
|
346
|
+
)}
|
|
347
|
+
</span>
|
|
348
|
+
<Icon className="ri-arrow-down-s-line" />
|
|
349
|
+
</Accordion.Title>
|
|
350
|
+
<Accordion.Content active={activeIndex === index}>
|
|
351
|
+
<div className="dataset-content">
|
|
352
|
+
{resourceTemporalExtentDetails &&
|
|
353
|
+
resourceTemporalExtentDetails?.length > 0 && (
|
|
354
|
+
<div>
|
|
355
|
+
<strong>Temporal coverage: </strong>
|
|
317
356
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
357
|
+
{resourceTemporalExtentDetails.map((tc, i) => {
|
|
358
|
+
let tc_start = tc?.start?.date;
|
|
359
|
+
if (tc_start) {
|
|
360
|
+
tc_start = new Date(
|
|
361
|
+
Date.parse(tc_start),
|
|
362
|
+
).getFullYear();
|
|
363
|
+
}
|
|
364
|
+
let tc_end = tc?.end?.date;
|
|
365
|
+
if (tc_end) {
|
|
366
|
+
tc_end = new Date(
|
|
367
|
+
Date.parse(tc_end),
|
|
368
|
+
).getFullYear();
|
|
369
|
+
}
|
|
370
|
+
tc_start = tc_start || '';
|
|
371
|
+
tc_end = tc_end || '';
|
|
325
372
|
return (
|
|
326
|
-
<
|
|
327
|
-
|
|
328
|
-
|
|
373
|
+
<React.Fragment key={i}>
|
|
374
|
+
<span>
|
|
375
|
+
{tc_start === tc_end && tc_start}
|
|
376
|
+
{tc_start !== tc_end &&
|
|
377
|
+
tc_start + ' - ' + tc_end}
|
|
378
|
+
</span>
|
|
379
|
+
{i !== resourceTemporalExtentDetails.length - 1
|
|
380
|
+
? ', '
|
|
381
|
+
: ' '}
|
|
382
|
+
</React.Fragment>
|
|
329
383
|
);
|
|
330
384
|
})}
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
<>
|
|
334
|
-
{['ESRI', 'OGC'].includes(dataset.linkProtocol) && (
|
|
335
|
-
<span className="format-label">
|
|
336
|
-
{dataset.linkProtocol}
|
|
337
|
-
</span>
|
|
338
|
-
)}
|
|
339
|
-
</>
|
|
340
|
-
)}
|
|
341
|
-
</span>
|
|
342
|
-
|
|
343
|
-
{is_internal(dataset) && <SVGIcon name={lockSVG} size="18" />}
|
|
344
|
-
</span>
|
|
345
|
-
<Icon className="ri-arrow-down-s-line" />
|
|
346
|
-
</Accordion.Title>
|
|
347
|
-
<Accordion.Content active={activeIndex === index}>
|
|
348
|
-
<div className="dataset-content">
|
|
349
|
-
{resourceTemporalExtentDetails &&
|
|
350
|
-
resourceTemporalExtentDetails?.length > 0 && (
|
|
351
|
-
<div>
|
|
352
|
-
<strong>Temporal coverage: </strong>
|
|
385
|
+
</div>
|
|
386
|
+
)}
|
|
353
387
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
tc_end = tc_end || '';
|
|
367
|
-
return (
|
|
368
|
-
<React.Fragment key={i}>
|
|
369
|
-
<span>
|
|
370
|
-
{tc_start === tc_end && tc_start}
|
|
371
|
-
{tc_start !== tc_end &&
|
|
372
|
-
tc_start + ' - ' + tc_end}
|
|
373
|
-
</span>
|
|
374
|
-
{i !== resourceTemporalExtentDetails.length - 1
|
|
375
|
-
? ', '
|
|
376
|
-
: ' '}
|
|
377
|
-
</React.Fragment>
|
|
378
|
-
);
|
|
379
|
-
})}
|
|
388
|
+
{dataset.resourceType[0] !== 'nonGeographicDataset' && (
|
|
389
|
+
<div className="dataset-pdf">
|
|
390
|
+
<div className="d-link">
|
|
391
|
+
<Icon className="file pdf" />
|
|
392
|
+
<a
|
|
393
|
+
target="_blank"
|
|
394
|
+
rel="noreferrer"
|
|
395
|
+
href={`${appConfig.indexBaseUrl}/catalogue/datahub/api/records/${dataset.metadataIdentifier}/formatters/xsl-view?output=pdf&language=eng&approved=true`}
|
|
396
|
+
>
|
|
397
|
+
Metadata Factsheet
|
|
398
|
+
</a>
|
|
399
|
+
</div>
|
|
380
400
|
</div>
|
|
381
401
|
)}
|
|
402
|
+
</div>
|
|
382
403
|
|
|
383
|
-
{dataset.
|
|
384
|
-
<
|
|
385
|
-
<div className="d-link">
|
|
386
|
-
<Icon className="file pdf" />
|
|
387
|
-
<a
|
|
388
|
-
target="_blank"
|
|
389
|
-
rel="noreferrer"
|
|
390
|
-
href={`${appConfig.indexBaseUrl}/catalogue/datahub/api/records/${dataset.metadataIdentifier}/formatters/xsl-view?output=pdf&language=eng&approved=true`}
|
|
391
|
-
>
|
|
392
|
-
Metadata Factsheet
|
|
393
|
-
</a>
|
|
394
|
-
</div>
|
|
395
|
-
</div>
|
|
404
|
+
{!!dataset.link && dataset.link.length > 0 && (
|
|
405
|
+
<DatasetList link={dataset.link} />
|
|
396
406
|
)}
|
|
397
|
-
</
|
|
407
|
+
</Accordion.Content>
|
|
408
|
+
</React.Fragment>
|
|
409
|
+
);
|
|
410
|
+
})}
|
|
411
|
+
</Accordion>
|
|
412
|
+
</Tab.Pane>
|
|
413
|
+
),
|
|
414
|
+
}));
|
|
415
|
+
|
|
416
|
+
return children && children.length > 0 ? (
|
|
417
|
+
<>
|
|
418
|
+
<div className="dataset-container">
|
|
419
|
+
<h2>Datasets</h2>
|
|
420
|
+
</div>
|
|
398
421
|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
})}
|
|
406
|
-
</Accordion>
|
|
422
|
+
<div className="item tabs-title">Publication year</div>
|
|
423
|
+
<Tab
|
|
424
|
+
className="datasets-tab"
|
|
425
|
+
menu={{ vertical: true, secondary: true, pointing: true }}
|
|
426
|
+
panes={panes}
|
|
427
|
+
/>
|
|
407
428
|
</>
|
|
408
429
|
) : null;
|
|
409
430
|
};
|
|
@@ -145,13 +145,13 @@ function ItemView(props) {
|
|
|
145
145
|
|
|
146
146
|
<div className="dataset-container">
|
|
147
147
|
<Callout>{description?.raw}</Callout>
|
|
148
|
+
</div>
|
|
148
149
|
|
|
149
|
-
|
|
150
|
+
<Datasets item={item} appConfig={appConfig} />
|
|
150
151
|
|
|
151
|
-
|
|
152
|
+
<MetadataSection item={item} appConfig={appConfig} docid={docid} />
|
|
152
153
|
|
|
153
|
-
|
|
154
|
-
</div>
|
|
154
|
+
<MoreLikeThis docid={docid} title={title?.raw} appConfig={appConfig} />
|
|
155
155
|
|
|
156
156
|
{/* <div className="info-wrapper">
|
|
157
157
|
<div className="info-content">
|
|
@@ -15,77 +15,84 @@ const MetadataSection = (props) => {
|
|
|
15
15
|
const organisations = org.filter((org) => org !== EEA);
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
|
-
|
|
19
|
-
<
|
|
18
|
+
<>
|
|
19
|
+
<div className="dataset-container metadata-wrapper">
|
|
20
|
+
<h2>More information</h2>
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
<div className="metadata-list">
|
|
23
|
+
{!!rod && (
|
|
24
|
+
<div className="metadata-section">
|
|
25
|
+
<h5>Reporting obligations (ROD)</h5>
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
{Array.isArray(rod?.raw) ? (
|
|
28
|
+
<>
|
|
29
|
+
{rod?.raw.map((item, i) => {
|
|
30
|
+
return <div key={i}>{item}</div>;
|
|
31
|
+
})}
|
|
32
|
+
</>
|
|
33
|
+
) : (
|
|
34
|
+
<div>{rod?.raw}</div>
|
|
35
|
+
)}
|
|
36
|
+
</div>
|
|
37
|
+
)}
|
|
38
|
+
|
|
39
|
+
{!!organisations && organisations.length > 0 && (
|
|
40
|
+
<div className="metadata-section">
|
|
41
|
+
<h5>Organisation:</h5>
|
|
42
|
+
|
|
43
|
+
{organisations.map((item, i) => {
|
|
28
44
|
return <div key={i}>{item}</div>;
|
|
29
45
|
})}
|
|
30
|
-
|
|
31
|
-
) : (
|
|
32
|
-
<div>{rod?.raw}</div>
|
|
46
|
+
</div>
|
|
33
47
|
)}
|
|
34
|
-
</div>
|
|
35
|
-
)}
|
|
36
48
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
49
|
+
{merged_time_coverage_range &&
|
|
50
|
+
merged_time_coverage_range?.length > 0 && (
|
|
51
|
+
<div className="metadata-section">
|
|
52
|
+
<h5>Temporal coverage:</h5>
|
|
40
53
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
54
|
+
{merged_time_coverage_range.map((tc, i) => {
|
|
55
|
+
const tc_start = tc.start || '';
|
|
56
|
+
const tc_end = tc.end || '';
|
|
57
|
+
return (
|
|
58
|
+
<React.Fragment key={i}>
|
|
59
|
+
<span>
|
|
60
|
+
{tc_start === tc_end && tc_start}
|
|
61
|
+
{tc_start !== tc_end && tc_start + ' - ' + tc_end}
|
|
62
|
+
</span>
|
|
63
|
+
{i !== merged_time_coverage_range.length - 1 ? ', ' : ' '}
|
|
64
|
+
</React.Fragment>
|
|
65
|
+
);
|
|
66
|
+
})}
|
|
67
|
+
</div>
|
|
68
|
+
)}
|
|
44
69
|
</div>
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
{merged_time_coverage_range && merged_time_coverage_range?.length > 0 && (
|
|
48
|
-
<div className="metadata-section">
|
|
49
|
-
<h5>Temporal coverage:</h5>
|
|
70
|
+
</div>
|
|
50
71
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
</React.Fragment>
|
|
62
|
-
);
|
|
63
|
-
})}
|
|
72
|
+
<div className="dataset-container">
|
|
73
|
+
<div className="d-link">
|
|
74
|
+
<Icon className="file pdf" />
|
|
75
|
+
<a
|
|
76
|
+
target="_blank"
|
|
77
|
+
rel="noreferrer"
|
|
78
|
+
href={`${appConfig.indexBaseUrl}/catalogue/datahub/api/records/${docid}/formatters/xsl-view?output=pdf&language=eng&approved=true`}
|
|
79
|
+
>
|
|
80
|
+
Metadata Factsheet
|
|
81
|
+
</a>
|
|
64
82
|
</div>
|
|
65
|
-
)}
|
|
66
|
-
|
|
67
|
-
<div className="d-link">
|
|
68
|
-
<Icon className="file pdf" />
|
|
69
|
-
<a
|
|
70
|
-
target="_blank"
|
|
71
|
-
rel="noreferrer"
|
|
72
|
-
href={`${appConfig.indexBaseUrl}/catalogue/datahub/api/records/${docid}/formatters/xsl-view?output=pdf&language=eng&approved=true`}
|
|
73
|
-
>
|
|
74
|
-
Metadata Factsheet
|
|
75
|
-
</a>
|
|
76
|
-
</div>
|
|
77
83
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
<div className="d-link">
|
|
85
|
+
<i className="ri-external-link-line"></i>
|
|
86
|
+
<a
|
|
87
|
+
target="_blank"
|
|
88
|
+
rel="noreferrer"
|
|
89
|
+
href={`${appConfig.indexBaseUrl}/catalogue/srv/eng/catalog.search#/metadata/${docid}`}
|
|
90
|
+
>
|
|
91
|
+
Metadata catalogue
|
|
92
|
+
</a>
|
|
93
|
+
</div>
|
|
87
94
|
</div>
|
|
88
|
-
|
|
95
|
+
</>
|
|
89
96
|
);
|
|
90
97
|
};
|
|
91
98
|
|
|
@@ -52,32 +52,34 @@ const MoreLikeThis = (props) => {
|
|
|
52
52
|
}, [appConfig, docid, title]);
|
|
53
53
|
|
|
54
54
|
return similarDocs && similarDocs.length > 0 ? (
|
|
55
|
-
<div className="
|
|
56
|
-
<
|
|
57
|
-
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
<Card.
|
|
67
|
-
<
|
|
68
|
-
{
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
55
|
+
<div className="dataset-container">
|
|
56
|
+
<div className="more-like-this">
|
|
57
|
+
<h2>Similar content</h2>
|
|
58
|
+
<div className="section-wrapper">
|
|
59
|
+
<Card.Group itemsPerRow={3}>
|
|
60
|
+
{similarDocs.map((item, i) => {
|
|
61
|
+
return (
|
|
62
|
+
<Card
|
|
63
|
+
href={`/en/datahub/datahubitem-view/${item._source.about}`}
|
|
64
|
+
key={i}
|
|
65
|
+
>
|
|
66
|
+
<Card.Content>
|
|
67
|
+
<Card.Header>
|
|
68
|
+
<span title={item._source.label}>
|
|
69
|
+
{firstWords(item._source.label, 10)}
|
|
70
|
+
</span>
|
|
71
|
+
</Card.Header>
|
|
72
|
+
<Card.Description>
|
|
73
|
+
<span className="card-description">
|
|
74
|
+
{item._source.description}
|
|
75
|
+
</span>
|
|
76
|
+
</Card.Description>
|
|
77
|
+
</Card.Content>
|
|
78
|
+
</Card>
|
|
79
|
+
);
|
|
80
|
+
})}
|
|
81
|
+
</Card.Group>
|
|
82
|
+
</div>
|
|
81
83
|
</div>
|
|
82
84
|
</div>
|
|
83
85
|
) : null;
|
|
@@ -242,27 +242,29 @@ const LandingPage = (props) => {
|
|
|
242
242
|
{children}
|
|
243
243
|
<Divider />
|
|
244
244
|
<div className="landing-page-cards">
|
|
245
|
-
<
|
|
246
|
-
<
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
245
|
+
<List>
|
|
246
|
+
<List.Item>
|
|
247
|
+
<List.Content>
|
|
248
|
+
<div
|
|
249
|
+
key="all_series"
|
|
250
|
+
tabIndex="-1"
|
|
251
|
+
role="button"
|
|
252
|
+
onKeyDown={fixedOnClickHandler}
|
|
253
|
+
onClick={fixedOnClickHandler}
|
|
254
|
+
>
|
|
255
|
+
<div className="content">
|
|
256
|
+
<Term term={all_series.value} field="cluster_name" />
|
|
257
|
+
</div>
|
|
258
|
+
<div className="extra content">
|
|
259
|
+
<span className="count">
|
|
260
|
+
{all_series.count}{' '}
|
|
261
|
+
{all_series.count === 1 ? 'item' : 'items'}
|
|
262
|
+
</span>
|
|
263
|
+
</div>
|
|
257
264
|
</div>
|
|
258
|
-
</
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
{all_series.count} {all_series.count === 1 ? 'item' : 'items'}
|
|
262
|
-
</span>
|
|
263
|
-
</div>
|
|
264
|
-
</div>
|
|
265
|
-
</div>
|
|
265
|
+
</List.Content>
|
|
266
|
+
</List.Item>
|
|
267
|
+
</List>
|
|
266
268
|
</div>
|
|
267
269
|
</div>
|
|
268
270
|
</div>
|