@eeacms/volto-datahub 1.0.10 → 1.0.11
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 +8 -5
- package/package.json +1 -1
- package/src/components/ItemView/Datasets.jsx +131 -114
- package/src/components/ItemView/ItemView.jsx +8 -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,19 @@ 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.11](https://github.com/eea/volto-datahub/compare/1.0.10...1.0.11) - 7 February 2023
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- Use list instead of cards [kreafox - [`952cba9`](https://github.com/eea/volto-datahub/commit/952cba9be659f635ae7c5c0e804f2a9ea1d5c4b5)]
|
|
12
|
+
- Small fix: move style wrapper [kreafox - [`7d169c3`](https://github.com/eea/volto-datahub/commit/7d169c3e03328431c4430d0f08d4d1152d475aa9)]
|
|
13
|
+
- Improve dataset view [kreafox - [`f7eafe0`](https://github.com/eea/volto-datahub/commit/f7eafe0ba477f5e8f5b42b621b94ee982ff3bd4e)]
|
|
14
|
+
- Group datasets by publication year [kreafox - [`3470c25`](https://github.com/eea/volto-datahub/commit/3470c25283106bb64c8216ed2304193c85be1e66)]
|
|
7
15
|
### [1.0.10](https://github.com/eea/volto-datahub/compare/1.0.9...1.0.10) - 18 January 2023
|
|
8
16
|
|
|
9
17
|
#### :hammer_and_wrench: Others
|
|
10
18
|
|
|
11
19
|
- 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
20
|
### [1.0.9](https://github.com/eea/volto-datahub/compare/1.0.8...1.0.9) - 17 January 2023
|
|
14
21
|
|
|
15
22
|
#### :hammer_and_wrench: Others
|
|
@@ -66,11 +73,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
66
73
|
#### :hammer_and_wrench: Others
|
|
67
74
|
|
|
68
75
|
- Fix eslintrc: add @eeacms/search [kreafox - [`465816f`](https://github.com/eea/volto-datahub/commit/465816feb8f58095ab4b5b3168cd29ebede3a10c)]
|
|
69
|
-
- Use latest Volto before yarn 3 [Tiberiu Ichim - [`69f5859`](https://github.com/eea/volto-datahub/commit/69f585980fd9a38ff99d0c7875704671857720f7)]
|
|
70
76
|
- Reorder sections on landing page [kreafox - [`46fac8d`](https://github.com/eea/volto-datahub/commit/46fac8d821cf93fe1b2c380380719de130c3f1cb)]
|
|
71
77
|
- Fix project eslintrc [kreafox - [`5baa150`](https://github.com/eea/volto-datahub/commit/5baa1505ec38ed313269f5608c186c6a6a8bbfc4)]
|
|
72
78
|
- Open dataset links in new tab [kreafox - [`bbed914`](https://github.com/eea/volto-datahub/commit/bbed914dc2edf6c749d1d73d93a423bc642e680c)]
|
|
73
|
-
- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`380a2a9`](https://github.com/eea/volto-datahub/commit/380a2a9625c6f799df7a7c343fad3f3b3d959f96)]
|
|
74
79
|
## [1.0.0](https://github.com/eea/volto-datahub/compare/0.1.12...1.0.0) - 28 October 2022
|
|
75
80
|
|
|
76
81
|
#### :nail_care: Enhancements
|
|
@@ -95,7 +100,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
95
100
|
#### :hammer_and_wrench: Others
|
|
96
101
|
|
|
97
102
|
- fixed query for related items [Zoltan Szabo - [`b66faee`](https://github.com/eea/volto-datahub/commit/b66faee1f8a1922cd22b3a36eccc9c7b92e377d4)]
|
|
98
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`158fe1a`](https://github.com/eea/volto-datahub/commit/158fe1a0b1767452e2e51a3e2ef97169589a50e8)]
|
|
99
103
|
### [0.1.10](https://github.com/eea/volto-datahub/compare/0.1.9...0.1.10) - 21 September 2022
|
|
100
104
|
|
|
101
105
|
#### :hammer_and_wrench: Others
|
|
@@ -184,7 +188,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
184
188
|
#### :hammer_and_wrench: Others
|
|
185
189
|
|
|
186
190
|
- Hide questions & fix landing page [kreafox - [`a1ef303`](https://github.com/eea/volto-datahub/commit/a1ef3033df0e84f3a72dd0f984c8717dff2a771c)]
|
|
187
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`910688e`](https://github.com/eea/volto-datahub/commit/910688e3ddf2f8cda4f941595ae9a6ee0ec0ea3b)]
|
|
188
191
|
### [0.1.1](https://github.com/eea/volto-datahub/compare/0.1.0...0.1.1) - 10 June 2022
|
|
189
192
|
|
|
190
193
|
### [0.1.0](https://github.com/eea/volto-datahub/compare/0.0.1...0.1.0) - 9 June 2022
|
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;
|
|
@@ -286,124 +289,138 @@ const Datasets = (props) => {
|
|
|
286
289
|
[children],
|
|
287
290
|
);
|
|
288
291
|
|
|
289
|
-
|
|
290
|
-
// console.log('children', children);
|
|
292
|
+
const datasetsByYear = groupBy(datasets, 'publicationYearForResource');
|
|
291
293
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
294
|
+
const panes = Object.keys(datasetsByYear).map((dataset) => ({
|
|
295
|
+
menuItem: dataset,
|
|
296
|
+
render: () => (
|
|
297
|
+
<Tab.Pane>
|
|
298
|
+
<Accordion>
|
|
299
|
+
{datasetsByYear[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
|
+
}));
|
|
398
415
|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
}
|
|
406
|
-
|
|
416
|
+
return datasets && datasets.length > 0 ? (
|
|
417
|
+
<>
|
|
418
|
+
<div className="item tabs-title">Publication year</div>
|
|
419
|
+
<Tab
|
|
420
|
+
className="datasets-tab"
|
|
421
|
+
menu={{ vertical: true, secondary: true, pointing: true }}
|
|
422
|
+
panes={panes}
|
|
423
|
+
/>
|
|
407
424
|
</>
|
|
408
425
|
) : null;
|
|
409
426
|
};
|
|
@@ -145,13 +145,17 @@ function ItemView(props) {
|
|
|
145
145
|
|
|
146
146
|
<div className="dataset-container">
|
|
147
147
|
<Callout>{description?.raw}</Callout>
|
|
148
|
+
</div>
|
|
148
149
|
|
|
149
|
-
|
|
150
|
+
<div className="dataset-container">
|
|
151
|
+
<h2>Datasets</h2>
|
|
152
|
+
</div>
|
|
150
153
|
|
|
151
|
-
|
|
154
|
+
<Datasets item={item} appConfig={appConfig} />
|
|
152
155
|
|
|
153
|
-
|
|
154
|
-
|
|
156
|
+
<MetadataSection item={item} appConfig={appConfig} docid={docid} />
|
|
157
|
+
|
|
158
|
+
<MoreLikeThis docid={docid} title={title?.raw} appConfig={appConfig} />
|
|
155
159
|
|
|
156
160
|
{/* <div className="info-wrapper">
|
|
157
161
|
<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>
|