@eeacms/volto-cca-policy 0.1.3 → 0.1.5

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 CHANGED
@@ -4,17 +4,99 @@ 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
- ### [0.1.3](https://github.com/eea/volto-cca-policy/compare/0.1.2...0.1.3) - 22 December 2022
7
+ ### [0.1.5](https://github.com/eea/volto-cca-policy/compare/0.1.4...0.1.5) - 6 February 2023
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - Refs #160116 - AdaptationOptionView - fix titles. [GhitaB - [`3e8529e`](https://github.com/eea/volto-cca-policy/commit/3e8529e3b2441c9363b6ea87d1937244663a0fbf)]
12
+ - Refs #160116 - LinksList - new component to be used for Websites. [GhitaB - [`5fd4035`](https://github.com/eea/volto-cca-policy/commit/5fd403553ed367e2fcf51fdd2c96d59e3513c5ed)]
13
+ - Refs #160116 - LinksList - new component to be used for Websites. [GhitaB - [`52a91ae`](https://github.com/eea/volto-cca-policy/commit/52a91ae18d9d52fa28f7114a67f2c05a19ac934c)]
14
+ - Refs #160116 - PublicationReportView - published/modified, websites - improve. [GhitaB - [`c0f7d92`](https://github.com/eea/volto-cca-policy/commit/c0f7d924ace8cfb6b76ef2eb9aef4892ca36150d)]
15
+ - Refs #160116 - ProjectView - published/modified, websites - improve. [GhitaB - [`c00b5a8`](https://github.com/eea/volto-cca-policy/commit/c00b5a80a99c62bbb14764c4ef353e2ea4edc952)]
16
+ - Refs #160116 - OrganisationView - fix class name. [GhitaB - [`24f7964`](https://github.com/eea/volto-cca-policy/commit/24f7964983f7669f0d89e63837c9836336442d6e)]
17
+ - Refs #160116 - OrganisationView - published/modified, websites - improve. [GhitaB - [`20e3b56`](https://github.com/eea/volto-cca-policy/commit/20e3b56cacb709998f9bfbd629fa0998e66ee2d6)]
18
+ - Refs #160116 - InformationPortalView - fix class name. [GhitaB - [`2fa45e6`](https://github.com/eea/volto-cca-policy/commit/2fa45e6690636f18fe207592704391470617d629)]
19
+ - Refs #160116 - InformationPortalView - published/modified, websites - improve. [GhitaB - [`e1343bc`](https://github.com/eea/volto-cca-policy/commit/e1343bcb70f152736c0c824be0ee119e533b55d7)]
20
+ - Refs #160116 - ToolView - published/modified, websites - improve. [GhitaB - [`e80b540`](https://github.com/eea/volto-cca-policy/commit/e80b540520141f55674a6166207e61dd04363e95)]
21
+ - Refs #160116 - IndicatorView - layout. [GhitaB - [`e846394`](https://github.com/eea/volto-cca-policy/commit/e8463947ffaf7dc8ea8678f4a61b202df53c30ba)]
22
+ - Refs #160116 - GuidanceView - layout. [GhitaB - [`a453d9d`](https://github.com/eea/volto-cca-policy/commit/a453d9d247fa6b5ff31c0171a37095d4628ebcc8)]
23
+ - Refs #160116 - InformationPortalView - code style. [GhitaB - [`f48de3b`](https://github.com/eea/volto-cca-policy/commit/f48de3b61e73f64a90f16b682d049b4498df0457)]
24
+ - Refs #160116 - OrganisationView - code style. [GhitaB - [`973546f`](https://github.com/eea/volto-cca-policy/commit/973546f2b558e6d1d27b578fd87476e89d83c71f)]
25
+ - Refs #160116 - ProjectView - code style. [GhitaB - [`88b019a`](https://github.com/eea/volto-cca-policy/commit/88b019a3a384ee551e040ef082dc7da8b3c063a7)]
26
+ - Refs #160116 - PublicationReportView - code style. [GhitaB - [`d1ec89a`](https://github.com/eea/volto-cca-policy/commit/d1ec89a071a11b78399bddea7c6f3ee6d3d21b81)]
27
+ - Refs #160116 - ToolView - code style. [GhitaB - [`d0ba872`](https://github.com/eea/volto-cca-policy/commit/d0ba872bb72f976eafb8bdbd9b10a19581e520e1)]
28
+ - Refs #160116 - VideoView - code style. [GhitaB - [`43c3772`](https://github.com/eea/volto-cca-policy/commit/43c3772a15459445390cc2f338d3abef8a6a2304)]
29
+ - Refs #160116 - content types [tripon eugen - [`aceb09f`](https://github.com/eea/volto-cca-policy/commit/aceb09febed4efd0bd9c70e42a0ce3dd68c03675)]
30
+ - Refs #160116 - CaseStudy - update layout. [GhitaB - [`5212783`](https://github.com/eea/volto-cca-policy/commit/5212783ef1889d97e8b75e54e0774f89f0a9c997)]
31
+ - Refs #160116 - Improve HTMLField, don't crash when no value. [GhitaB - [`503ab52`](https://github.com/eea/volto-cca-policy/commit/503ab5244edc1c69a23655b9eb46a069906fba60)]
32
+ - Refs #160116 - Add published, modified info. [GhitaB - [`34bb108`](https://github.com/eea/volto-cca-policy/commit/34bb1081a72eef4e08239bec0f988cb5276e463e)]
33
+ - Refs #160116 - Add line. [GhitaB - [`f0634e5`](https://github.com/eea/volto-cca-policy/commit/f0634e5f456fbf7df5d0024d193229c3f5e7c747)]
34
+ - Refs #160116 - ContentMetadata - fix missing key. [GhitaB - [`c0650dd`](https://github.com/eea/volto-cca-policy/commit/c0650dd159062d37dc614229ac961cce78edaed9)]
35
+ - Refs #160116 - ContentMetadata for adaptation option. Governance level. [GhitaB - [`ebba384`](https://github.com/eea/volto-cca-policy/commit/ebba3841195f693019460068b2b902fcd0104693)]
36
+ - Refs #160116 - ContentMetadata - WIP customize for adaptation option. [GhitaB - [`9a6877f`](https://github.com/eea/volto-cca-policy/commit/9a6877fee51f9b105a8ed24bb1ee4430d1693a95)]
37
+ - Refs #160116 - AdaptationOptionView - fix websites, source. [GhitaB - [`c733ac4`](https://github.com/eea/volto-cca-policy/commit/c733ac4cd8c9ae1e62805604c3dcba449c982a05)]
38
+ - Refs #160116 - AdaptationOptionView - improve code, fix sections style. [GhitaB - [`b61ac80`](https://github.com/eea/volto-cca-policy/commit/b61ac80602d60d2eb75f5a1909ae80224d5fb039)]
39
+ - Refs #160116 - AdaptationOptionView - improve sections display. [GhitaB - [`aa32ed3`](https://github.com/eea/volto-cca-policy/commit/aa32ed3604b4806efe8dbd1d01afb1516835ff06)]
40
+ - Refs #160116 - AdaptationOptionView - fix sections links. [GhitaB - [`8c92e79`](https://github.com/eea/volto-cca-policy/commit/8c92e79432bc73a79aaa1fc22086e8c87c019686)]
41
+ - Refs #160116 - AdaptationOptionView - WIP sections links. [GhitaB - [`c50691e`](https://github.com/eea/volto-cca-policy/commit/c50691ee77c26f41e9cfd0dceaacf353b5e76b70)]
42
+ - Refs #160116 - AdaptationOptionView - WIP sections links. [GhitaB - [`7744b13`](https://github.com/eea/volto-cca-policy/commit/7744b13a85ac171f1c56dbdd0e665028ec44bc28)]
43
+ - Refs #160116 - AdaptationOptionView - simplify fields definition, add label, remove title. [GhitaB - [`7a8b441`](https://github.com/eea/volto-cca-policy/commit/7a8b441268542e0fcfb121e01790782139aa6ec3)]
44
+ - Refs #160116 - AdaptationOptionView - fix layout. [GhitaB - [`22c9a26`](https://github.com/eea/volto-cca-policy/commit/22c9a267bec29abec3c7701f52146c30e8efbac6)]
45
+ - Refs #160116 - VideoView - add Related documents section. [GhitaB - [`73f85a0`](https://github.com/eea/volto-cca-policy/commit/73f85a0aaed0acb7dfcebaaebdd24302caf7b644)]
46
+ - Refs #160116 - Add Reference information title. [GhitaB - [`f96c644`](https://github.com/eea/volto-cca-policy/commit/f96c644fd897c2c92b529da0af420d7a43469599)]
47
+ - Refs #160116 - Fix jenkins (again). [GhitaB - [`6a8e7c9`](https://github.com/eea/volto-cca-policy/commit/6a8e7c9b0bdb572a1b435bde66603d2242be7ba8)]
48
+ - Refs #160116 - Fix jenkins (again). [GhitaB - [`5bed2ec`](https://github.com/eea/volto-cca-policy/commit/5bed2ec0a47198ae5f5e5ee1cdd242cb52ef986c)]
49
+ - Refs #160116 - ContentMetadata - improve tooltip text - use content type. [GhitaB - [`3acada6`](https://github.com/eea/volto-cca-policy/commit/3acada6fe465472da0303ac2c5304b149f606ad9)]
50
+ - Refs #160116 - VideoView - fix spacing in case of external video link. [GhitaB - [`9dc89db`](https://github.com/eea/volto-cca-policy/commit/9dc89db43b6275511a166e21998b1ddebe85eebf)]
51
+ - Refs #160116 - VideoView - fix embed video url when /download is missing. [GhitaB - [`a42614f`](https://github.com/eea/volto-cca-policy/commit/a42614f234a88bbac3dde7f8abf3f596fb1078a5)]
52
+ - Refs #160116 - VideoView - add custom styles, fix video player spacing. [GhitaB - [`1dcab66`](https://github.com/eea/volto-cca-policy/commit/1dcab665d1c22aefadf39c61b439ed288930fe5f)]
53
+ - Refs #160116 - VideoView - fix embed video not loading. [GhitaB - [`ab3cd94`](https://github.com/eea/volto-cca-policy/commit/ab3cd9450a34bfc9cd1770b802816b3841f95dbf)]
54
+ - Refs #160116 - ContentMetadata - fix h5 spacing using Fragment instead of div. [GhitaB - [`fb87337`](https://github.com/eea/volto-cca-policy/commit/fb87337e197da3ef472868e5ee41b680a870a86c)]
55
+ - Refs #160116 - VideoView - show other contributor if exists. [GhitaB - [`43a0fa6`](https://github.com/eea/volto-cca-policy/commit/43a0fa61bcfc6770b741ba6b45853e07a4ac89e3)]
56
+ - Refs #160116 - render links as ExternalLink. [GhitaB - [`e275d29`](https://github.com/eea/volto-cca-policy/commit/e275d296bf33f0465d20039da631804dd28a3ddb)]
57
+ - Refs #160116 - VideoView - fix class name. [GhitaB - [`2b902db`](https://github.com/eea/volto-cca-policy/commit/2b902db2453c0c87d3c35b7a6516c0dea60e7950)]
58
+ - Refs #160116 - ContentMetadata - improve publication year 'tooltip'. [GhitaB - [`2d997ef`](https://github.com/eea/volto-cca-policy/commit/2d997efb15bf1f5c708379566cb01ad2437d637d)]
59
+ - Refs #160116 - ContentMetadata - improve publication year 'tooltip'. [GhitaB - [`20f8d37`](https://github.com/eea/volto-cca-policy/commit/20f8d37b35d354a2af3115b778a11d546f0334e4)]
60
+ - Refs #160116 - VideoView - add content type label and icon in links list. [GhitaB - [`0135d6b`](https://github.com/eea/volto-cca-policy/commit/0135d6b50afd213c11b4a272b0739e5595aa6a7b)]
61
+ - Refs #160116 - ContentMetadata - show text about publication year, only on hover. [GhitaB - [`168baab`](https://github.com/eea/volto-cca-policy/commit/168baab69f7402e8842ac45852417b48d36507aa)]
62
+ - Refs #160116 - ContentMetadata - fix wrong extra '0' because of length condition. [GhitaB - [`0c31655`](https://github.com/eea/volto-cca-policy/commit/0c3165509f7fd5f6c5a7c57049b0eba8507c6600)]
63
+ - Refs #160116 - VideoView - add a simple layout (make easier to compare with production). [GhitaB - [`50c4e09`](https://github.com/eea/volto-cca-policy/commit/50c4e09ff3af7ad07fb6ea7413edd3ff59993889)]
64
+ - Refs #160116 - ContentMetadata - fix error when no keywords. [GhitaB - [`ccd8e09`](https://github.com/eea/volto-cca-policy/commit/ccd8e09ab430e3a712b70dfa6206c5de194ec422)]
65
+ - Refs #160116 - VideoView - show contributors only if exist. [GhitaB - [`7681067`](https://github.com/eea/volto-cca-policy/commit/7681067566c62408a87719151122672c8659316a)]
66
+ - Refs #160116 - VideoView - fix video player. [GhitaB - [`94f9bf7`](https://github.com/eea/volto-cca-policy/commit/94f9bf78772ef4cefbb096c0b4137a87b729095e)]
67
+ - Refs #160116 - VideoView - get rid of Description title (it's not in production). [GhitaB - [`cd202f7`](https://github.com/eea/volto-cca-policy/commit/cd202f7a32d628797236c3e7fbb80a908a3a8d5f)]
68
+ - Refs #160116 - VideoView - fix key in websites list. [GhitaB - [`02a3643`](https://github.com/eea/volto-cca-policy/commit/02a3643cf8bbeece2f360aad7b3bdd88f870b874)]
69
+ - Refs #160116 - Fix jenkins error, improve code style. [GhitaB - [`817fc2d`](https://github.com/eea/volto-cca-policy/commit/817fc2d88ef95da66be39c65973d7ba3fee6124e)]
70
+ - Refs #160116 - Fix jenkins error, improve code style. [GhitaB - [`1ab5ac3`](https://github.com/eea/volto-cca-policy/commit/1ab5ac3a947be67dfa767f8bfefce8230540c80f)]
71
+ - Refs #160116 - content types init [tripon eugen - [`4a250c4`](https://github.com/eea/volto-cca-policy/commit/4a250c4bc73df6aac98d80fedddf3cf1214d7a5f)]
72
+ - Refs #160116 - ToolView - content metadata - fix jenkins error, improve titles. [GhitaB - [`b00ede5`](https://github.com/eea/volto-cca-policy/commit/b00ede52180d6a967f2629aa2aa622cd1049e15c)]
73
+ - Refs #160116 - geochar check if available [tripon eugen - [`453ab73`](https://github.com/eea/volto-cca-policy/commit/453ab73f458a7328fb0a2363a6d0effd1aee73ab)]
74
+ - Refs #160116 - ToolView - content metadata - improve code. [GhitaB - [`f556007`](https://github.com/eea/volto-cca-policy/commit/f5560071bea2b3f4ac3ce9b1771880b1f9ef4dfc)]
75
+ - Refs #160116 - ToolView - content metadata - climate impacts, elements, sectors. [GhitaB - [`d4fce54`](https://github.com/eea/volto-cca-policy/commit/d4fce544a59d2e0616f7278e2ec61a45e768a75c)]
76
+ - Refs #160116 - ToolView - content metadata WIP. [GhitaB - [`7692059`](https://github.com/eea/volto-cca-policy/commit/7692059436011d6bae5cc24f3c4bce5c2f63bf22)]
77
+ - Refs #160116 - Geochars - clean code. [GhitaB - [`73e6ac3`](https://github.com/eea/volto-cca-policy/commit/73e6ac3f380916776400c38e25ff329d904f4495)]
78
+ - Refs #160116 - Geochars - don't show region IDs not included in the list. [GhitaB - [`caefbcc`](https://github.com/eea/volto-cca-policy/commit/caefbcccb6bf9db18b7018e9644d4ab6c411c85c)]
79
+ - Refs #160116 - Geochars - hide sections with no info. [GhitaB - [`068cf3d`](https://github.com/eea/volto-cca-policy/commit/068cf3d2e7929b62a1fadf976d246134c7eba4c9)]
80
+ - Refs #160116 - Geochars - fix case when city is empty. [GhitaB - [`1872d34`](https://github.com/eea/volto-cca-policy/commit/1872d347527beb52c0aea12a6344a406f2b02c66)]
81
+ - Refs #160116 - Geochars - improve code. [GhitaB - [`d7fd6ac`](https://github.com/eea/volto-cca-policy/commit/d7fd6ac39ad328e78831527a8da6e174888011ea)]
82
+ - Refs #160116 - WIP content metadata (used in Tool View) - render items. [GhitaB - [`646a658`](https://github.com/eea/volto-cca-policy/commit/646a65865d021f9c4dcf5a89f73b7398bb712fc1)]
83
+ - Refs #160116 - WIP content metadata (used in Tool View) - bioregions. [GhitaB - [`7e8e6ce`](https://github.com/eea/volto-cca-policy/commit/7e8e6ce0122c1c0ffe91658708c8b44c5178c7aa)]
84
+ - Refs #160116 - WIP content metadata (used in Tool View). [GhitaB - [`973f57a`](https://github.com/eea/volto-cca-policy/commit/973f57ae125d57fbd5b8501baa17b3f17059668f)]
85
+ - WIP on tool view [Tiberiu Ichim - [`d30e208`](https://github.com/eea/volto-cca-policy/commit/d30e208f04f669091adc8d1d767e51877df167fe)]
86
+ - WIP on tool view [Tiberiu Ichim - [`f9821d3`](https://github.com/eea/volto-cca-policy/commit/f9821d302dcfeee197b3030275c24db2a76c6a61)]
87
+ ### [0.1.4](https://github.com/eea/volto-cca-policy/compare/0.1.3...0.1.4) - 13 January 2023
8
88
 
9
89
  #### :hammer_and_wrench: Others
10
90
 
11
- - Refs #158294 - Fix languages list. [GhitaB - [`a2386cd`](https://github.com/eea/volto-cca-policy/commit/a2386cd2ca7ba8bdbcc778223516927bf96b0b74)]
91
+ - Refs #158294 - Enable volto-embed (index.js is used, not policy.js). [GhitaB - [`55eecd1`](https://github.com/eea/volto-cca-policy/commit/55eecd1e58f9c9e987cb90eed4b0d02e7f22d3f9)]
92
+ - Refs #158294 - Enable volto-embed. [GhitaB - [`873ed39`](https://github.com/eea/volto-cca-policy/commit/873ed399cd02bd8c11b2006ea13d6dfc854c3395)]
93
+ ### [0.1.3](https://github.com/eea/volto-cca-policy/compare/0.1.2...0.1.3) - 22 December 2022
94
+
12
95
  ### [0.1.2](https://github.com/eea/volto-cca-policy/compare/0.1.1...0.1.2) - 16 December 2022
13
96
 
14
97
  #### :hammer_and_wrench: Others
15
98
 
16
99
  - Refs #158294 - Update supported languages list. [GhitaB - [`0a4f91f`](https://github.com/eea/volto-cca-policy/commit/0a4f91f39b7edc367bd4c127d6a8f273c7788361)]
17
- - Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`8f1f9ce`](https://github.com/eea/volto-cca-policy/commit/8f1f9ce6c22805670cc0800d3c779b6d619d0f31)]
18
100
  ### [0.1.1](https://github.com/eea/volto-cca-policy/compare/0.1.0...0.1.1) - 13 December 2022
19
101
 
20
102
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "@eeacms/volto-cca-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -0,0 +1,193 @@
1
+ import React from 'react';
2
+ import {
3
+ HTMLField,
4
+ ContentMetadata,
5
+ LinksList,
6
+ PublishedModifiedInfo,
7
+ } from '@eeacms/volto-cca-policy/helpers';
8
+ import { Fragment } from 'react';
9
+
10
+ const dataDisplay = [
11
+ {
12
+ type: 'other',
13
+ field: 'category',
14
+ section: 'ao_category',
15
+ title: 'Category',
16
+ },
17
+ {
18
+ type: 'other',
19
+ field: 'ipcc_category',
20
+ section: 'ipcc_category',
21
+ title: 'IPCC categories',
22
+ },
23
+ {
24
+ type: 'HTMLField',
25
+ field: 'stakeholder_participation',
26
+ section: 'stakeholder_participation',
27
+ title: 'Stakeholder participation',
28
+ },
29
+ {
30
+ type: 'HTMLField',
31
+ field: 'success_limitations',
32
+ section: 'success_factors',
33
+ title: 'Success and Limiting Factors',
34
+ },
35
+ {
36
+ type: 'HTMLField',
37
+ field: 'cost_benefit',
38
+ section: 'costs_benefits',
39
+ title: 'Costs and Benefits',
40
+ },
41
+ {
42
+ type: 'HTMLField',
43
+ field: 'legal_aspects',
44
+ section: 'legal',
45
+ title: 'Legal Aspects',
46
+ },
47
+ {
48
+ type: 'HTMLField',
49
+ field: 'implementation_time',
50
+ section: 'implementation',
51
+ title: 'Implementation Time',
52
+ },
53
+ {
54
+ type: 'HTMLField',
55
+ field: 'life_time',
56
+ section: 'life_time',
57
+ title: 'Life Time',
58
+ },
59
+ ];
60
+
61
+ const findSection = (title) => {
62
+ const found = dataDisplay.filter((item) => item.title === title);
63
+ if (found.length > 0) {
64
+ return found[0];
65
+ }
66
+ return null;
67
+ };
68
+
69
+ const sectionID = (title) => {
70
+ const found = findSection(title);
71
+ if (found === null) {
72
+ return title;
73
+ }
74
+ return found.section;
75
+ };
76
+
77
+ const SectionsMenu = (props) => {
78
+ const { sections } = props;
79
+
80
+ return (
81
+ <>
82
+ {sections.length > 0 && (
83
+ <>
84
+ <h5 className="Adaptation-option-selector">Additional Details</h5>
85
+ <ul>
86
+ {sections.map((data, index) => (
87
+ <li key={index}>
88
+ <a href={'#' + sectionID(data.title)}>{data.title}</a>
89
+ </li>
90
+ ))}
91
+ </ul>
92
+ </>
93
+ )}
94
+ <>
95
+ <h5 className="Adaptation-option-selector">Reference information</h5>
96
+ <ul>
97
+ <li>
98
+ <a href="#websites">Websites</a>
99
+ </li>
100
+ <li>
101
+ <a href="#source">Source</a>
102
+ </li>
103
+ </ul>
104
+ </>
105
+ <hr />
106
+ </>
107
+ );
108
+ };
109
+
110
+ function AdaptationOptionView(props) {
111
+ const { content } = props;
112
+
113
+ const usedSections = dataDisplay.filter((data) =>
114
+ content.hasOwnProperty(data.field),
115
+ );
116
+
117
+ return (
118
+ <div className="adaptation-option-view">
119
+ <div className="ui container">
120
+ <div className="ui grid">
121
+ <div className="row">
122
+ <div className="nine wide column left-col">
123
+ <div className="ui label">Adaptation option</div>
124
+ <h1>{content.title}</h1>
125
+ <HTMLField
126
+ value={content.long_description}
127
+ className="long_description"
128
+ />
129
+
130
+ <SectionsMenu sections={usedSections} />
131
+
132
+ <h4>Adaptation Details</h4>
133
+
134
+ <div id={sectionID('Category')} className="section">
135
+ <h5 className="section-title">Category</h5>
136
+ {content.category
137
+ .map((item) => item.token)
138
+ .sort()
139
+ .map((cat, index) => (
140
+ <Fragment key={index}>{cat}</Fragment>
141
+ ))}
142
+ </div>
143
+
144
+ <div id={sectionID('IPCC categories')} className="section">
145
+ <h5 className="section-title">IPCC categories</h5>
146
+ {content.ipcc_category
147
+ .map((item) => item.title)
148
+ .sort()
149
+ .join(', ')}
150
+ {usedSections.length > 0 && (
151
+ <>
152
+ {usedSections.map((data, index) => (
153
+ <Fragment key={index}>
154
+ <div id={sectionID(data.title)} className="section">
155
+ <h5 className="section-title">{data.title}</h5>
156
+ <HTMLField
157
+ value={content[data.field]}
158
+ className="long_description"
159
+ />
160
+ </div>
161
+ </Fragment>
162
+ ))}
163
+ </>
164
+ )}
165
+ </div>
166
+ <hr />
167
+
168
+ <h4>Reference information</h4>
169
+
170
+ {content?.websites?.length > 0 && (
171
+ <LinksList title="Websites:" value={content.websites} />
172
+ )}
173
+
174
+ <div id="source" className="section">
175
+ <h5>References:</h5>
176
+ <HTMLField value={content.source} />
177
+ </div>
178
+
179
+ <PublishedModifiedInfo {...props} />
180
+ </div>
181
+ <div className="three wide column right-col">
182
+ <div style={{}}>
183
+ <ContentMetadata {...props} />
184
+ </div>
185
+ </div>
186
+ </div>
187
+ </div>
188
+ </div>
189
+ </div>
190
+ );
191
+ }
192
+
193
+ export default AdaptationOptionView;
@@ -0,0 +1,49 @@
1
+ import React from 'react';
2
+ import {
3
+ HTMLField,
4
+ ContentMetadata,
5
+ LinksList,
6
+ } from '@eeacms/volto-cca-policy/helpers';
7
+
8
+ function CaseStudyView(props) {
9
+ const { content } = props;
10
+
11
+ return (
12
+ <div className="case-study-view">
13
+ <div className="ui container">
14
+ <div className="ui grid">
15
+ <div className="row">
16
+ <div className="nine wide column left-col">
17
+ <div className="ui label">Case Study</div>
18
+ <h1>{content.title}</h1>
19
+ <HTMLField
20
+ value={content.long_description}
21
+ className="long_description"
22
+ />
23
+ <h4>Challenges</h4>
24
+ <HTMLField value={content.challenges} className="challenges" />
25
+ <h4>Objectives</h4>
26
+ <HTMLField value={content.objectives} className="objectives" />
27
+ <hr />
28
+ <h4>Reference information</h4>
29
+
30
+ {content?.websites?.length > 0 && (
31
+ <LinksList title="Websites" value={content.websites} />
32
+ )}
33
+
34
+ <h5>Source</h5>
35
+ <HTMLField value={content.source} />
36
+ </div>
37
+ <div className="three wide column right-col">
38
+ <div style={{}}>
39
+ <ContentMetadata {...props} />
40
+ </div>
41
+ </div>
42
+ </div>
43
+ </div>
44
+ </div>
45
+ </div>
46
+ );
47
+ }
48
+
49
+ export default CaseStudyView;
@@ -0,0 +1,46 @@
1
+ import React from 'react';
2
+ import {
3
+ HTMLField,
4
+ ContentMetadata,
5
+ LinksList,
6
+ } from '@eeacms/volto-cca-policy/helpers';
7
+
8
+ function GuidanceView(props) {
9
+ const { content } = props;
10
+
11
+ return (
12
+ <div className="guidance-view">
13
+ <div className="ui container">
14
+ <div className="ui grid">
15
+ <div className="row">
16
+ <div className="nine wide column left-col">
17
+ <div className="ui label">Guidance Document</div>
18
+ <h1>{content.title}</h1>
19
+ <h4>Description</h4>
20
+ <HTMLField
21
+ value={content.long_description}
22
+ className="long_description"
23
+ />
24
+ <hr />
25
+ <h4>Reference information</h4>
26
+
27
+ {content?.websites?.length > 0 && (
28
+ <LinksList title="Websites" value={content.websites} />
29
+ )}
30
+
31
+ <h5>Source</h5>
32
+ <HTMLField value={content.source} />
33
+ </div>
34
+ <div className="three wide column right-col">
35
+ <div style={{}}>
36
+ <ContentMetadata {...props} />
37
+ </div>
38
+ </div>
39
+ </div>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ );
44
+ }
45
+
46
+ export default GuidanceView;
@@ -0,0 +1,46 @@
1
+ import React from 'react';
2
+ import {
3
+ HTMLField,
4
+ ContentMetadata,
5
+ LinksList,
6
+ } from '@eeacms/volto-cca-policy/helpers';
7
+
8
+ function IndicatorView(props) {
9
+ const { content } = props;
10
+
11
+ return (
12
+ <div className="indicator-view">
13
+ <div className="ui container">
14
+ <div className="ui grid">
15
+ <div className="row">
16
+ <div className="nine wide column left-col">
17
+ <div className="ui label">Indicator</div>
18
+ <h1>{content.title}</h1>
19
+ <h4>Description</h4>
20
+ <HTMLField
21
+ value={content.long_description}
22
+ className="long_description"
23
+ />
24
+ <hr />
25
+ <h4>Reference information</h4>
26
+
27
+ {content?.websites?.length > 0 && (
28
+ <LinksList title="Websites" value={content.websites} />
29
+ )}
30
+
31
+ <h5>Source</h5>
32
+ <HTMLField value={content.source} />
33
+ </div>
34
+ <div className="three wide column right-col">
35
+ <div style={{}}>
36
+ <ContentMetadata {...props} />
37
+ </div>
38
+ </div>
39
+ </div>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ );
44
+ }
45
+
46
+ export default IndicatorView;
@@ -0,0 +1,46 @@
1
+ import React from 'react';
2
+ import {
3
+ HTMLField,
4
+ ContentMetadata,
5
+ LinksList,
6
+ PublishedModifiedInfo,
7
+ } from '@eeacms/volto-cca-policy/helpers';
8
+
9
+ function InformationPortalView(props) {
10
+ const { content } = props;
11
+
12
+ return (
13
+ <div className="information-portal-view">
14
+ <div className="ui container">
15
+ <div className="ui grid">
16
+ <div className="row">
17
+ <div className="nine wide column left-col">
18
+ <div className="ui label">Information Portal</div>
19
+ <h1>{content.title}</h1>
20
+ <h4>Description</h4>
21
+ <HTMLField
22
+ value={content.long_description}
23
+ className="long_description"
24
+ />
25
+
26
+ <h4>Reference information</h4>
27
+
28
+ {content?.websites?.length > 0 && (
29
+ <LinksList title="Websites" value={content.websites} />
30
+ )}
31
+
32
+ <PublishedModifiedInfo {...props} />
33
+ </div>
34
+ <div className="three wide column right-col">
35
+ <div style={{}}>
36
+ <ContentMetadata {...props} />
37
+ </div>
38
+ </div>
39
+ </div>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ );
44
+ }
45
+
46
+ export default InformationPortalView;
@@ -0,0 +1,90 @@
1
+ import React from 'react';
2
+ import {
3
+ HTMLField,
4
+ ContentMetadata,
5
+ LinksList,
6
+ PublishedModifiedInfo,
7
+ } from '@eeacms/volto-cca-policy/helpers';
8
+
9
+ function OrganisationView(props) {
10
+ const { content } = props;
11
+
12
+ let organisationDocuments = [];
13
+ let relatedItems = [];
14
+ if (content?.relatedItems?.length > 0) {
15
+ organisationDocuments = content.relatedItems.filter(
16
+ (item) => item['@type'] === 'File',
17
+ );
18
+
19
+ relatedItems = content.relatedItems.filter((item) =>
20
+ item['@type'].includes('eea.climateadapt'),
21
+ );
22
+ }
23
+
24
+ return (
25
+ <div className="organisation-view">
26
+ <div className="ui container">
27
+ <div className="ui grid">
28
+ <div className="row">
29
+ <div className="nine wide column left-col">
30
+ <div className="ui label">Organisation</div>
31
+ <h1>{content.title}</h1>
32
+ <h4>Description</h4>
33
+ <HTMLField
34
+ value={content.long_description}
35
+ className="long_description"
36
+ />
37
+ <hr />
38
+ <h4>Reference information</h4>
39
+
40
+ {content?.websites?.length > 0 && (
41
+ <LinksList title="Websites" value={content.websites} />
42
+ )}
43
+
44
+ {relatedItems.length > 0 && (
45
+ <>
46
+ <h5>Related content:</h5>
47
+
48
+ {relatedItems.map((item, index) => (
49
+ <>
50
+ <a key={index} href={item['@id']}>
51
+ {item.title}
52
+ </a>
53
+ <br />
54
+ </>
55
+ ))}
56
+ </>
57
+ )}
58
+
59
+ <PublishedModifiedInfo {...props} />
60
+ </div>
61
+ <div className="three wide column right-col">
62
+ {organisationDocuments.length > 0 && (
63
+ <>
64
+ <h5>
65
+ Organisation Documents ({organisationDocuments.length})
66
+ </h5>
67
+
68
+ {organisationDocuments.map((item, index) => (
69
+ <>
70
+ <a key={index} href={item['@id']}>
71
+ {item.title}
72
+ </a>
73
+ <br />
74
+ </>
75
+ ))}
76
+ <br />
77
+ </>
78
+ )}
79
+ <div style={{}}>
80
+ <ContentMetadata {...props} />
81
+ </div>
82
+ </div>
83
+ </div>
84
+ </div>
85
+ </div>
86
+ </div>
87
+ );
88
+ }
89
+
90
+ export default OrganisationView;
@@ -0,0 +1,58 @@
1
+ import React from 'react';
2
+ import {
3
+ HTMLField,
4
+ ContentMetadata,
5
+ LinksList,
6
+ PublishedModifiedInfo,
7
+ } from '@eeacms/volto-cca-policy/helpers';
8
+
9
+ function ProjectView(props) {
10
+ const { content } = props;
11
+ return (
12
+ <div className="project-view">
13
+ <div className="ui container">
14
+ <div className="ui grid">
15
+ <div className="row">
16
+ <div className="nine wide column left-col">
17
+ <div className="ui label">Project</div>
18
+ <h1>
19
+ {content.title} ({content.acronym})
20
+ </h1>
21
+ <h4>Description</h4>
22
+ <HTMLField
23
+ value={content.long_description}
24
+ className="long_description"
25
+ />
26
+ <h4>Project information</h4>
27
+ <h5>Lead</h5>
28
+ <p>{content.lead}</p>
29
+ <h5>Partners</h5>
30
+ <HTMLField value={content.partners} className="partners" />
31
+ {content.funding && (
32
+ <>
33
+ <h5>Source of funding</h5>
34
+ <p>{content.funding}</p>
35
+ </>
36
+ )}
37
+
38
+ <h4>Reference information</h4>
39
+
40
+ {content?.websites?.length > 0 && (
41
+ <LinksList title="Websites" value={content.websites} />
42
+ )}
43
+
44
+ <PublishedModifiedInfo {...props} />
45
+ </div>
46
+ <div className="three wide column right-col">
47
+ <div style={{}}>
48
+ <ContentMetadata {...props} />
49
+ </div>
50
+ </div>
51
+ </div>
52
+ </div>
53
+ </div>
54
+ </div>
55
+ );
56
+ }
57
+
58
+ export default ProjectView;