@eeacms/volto-cca-policy 0.1.92 → 0.1.93

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/.eslintrc.js ADDED
@@ -0,0 +1,61 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+ const projectRootPath = fs.realpathSync(__dirname + '/../../../');
4
+
5
+ let voltoPath = path.join(projectRootPath, 'node_modules/@plone/volto');
6
+ let configFile;
7
+ if (fs.existsSync(`${projectRootPath}/tsconfig.json`))
8
+ configFile = `${projectRootPath}/tsconfig.json`;
9
+ else if (fs.existsSync(`${projectRootPath}/jsconfig.json`))
10
+ configFile = `${projectRootPath}/jsconfig.json`;
11
+
12
+ if (configFile) {
13
+ const jsConfig = require(configFile).compilerOptions;
14
+ const pathsConfig = jsConfig.paths;
15
+ if (pathsConfig['@plone/volto'])
16
+ voltoPath = `./${jsConfig.baseUrl}/${pathsConfig['@plone/volto'][0]}`;
17
+ }
18
+
19
+ const AddonConfigurationRegistry = require(`${voltoPath}/addon-registry.js`);
20
+ const reg = new AddonConfigurationRegistry(projectRootPath);
21
+
22
+ // Extends ESlint configuration for adding the aliases to `src` directories in Volto addons
23
+ const addonAliases = Object.keys(reg.packages).map((o) => [
24
+ o,
25
+ reg.packages[o].modulePath,
26
+ ]);
27
+
28
+ const addonExtenders = reg.getEslintExtenders().map((m) => require(m));
29
+
30
+ const defaultConfig = {
31
+ extends: `${voltoPath}/.eslintrc`,
32
+ settings: {
33
+ 'import/resolver': {
34
+ alias: {
35
+ map: [
36
+ ['@plone/volto', '@plone/volto/src'],
37
+ ['@plone/volto-slate', '@plone/volto/packages/volto-slate/src'],
38
+ ['@root/routes', '@plone/volto/src'],
39
+ ...addonAliases,
40
+ ['@package', `${__dirname}/src`],
41
+ // ['@root', `${__dirname}/src`],
42
+ ['~', `${__dirname}/src`],
43
+ ],
44
+ extensions: ['.js', '.jsx', '.json'],
45
+ },
46
+ 'babel-plugin-root-import': {
47
+ rootPathSuffix: 'src',
48
+ },
49
+ },
50
+ },
51
+ rules: {
52
+ 'react/jsx-no-target-blank': 'off',
53
+ },
54
+ };
55
+
56
+ const config = addonExtenders.reduce(
57
+ (acc, extender) => extender.modify(acc),
58
+ defaultConfig,
59
+ );
60
+
61
+ module.exports = config;
package/CHANGELOG.md CHANGED
@@ -4,6 +4,46 @@ 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.93](https://github.com/eea/volto-cca-policy/compare/0.1.92...0.1.93) - 8 March 2024
8
+
9
+ #### :rocket: New Features
10
+
11
+ - feat: add AnchorLink to smooth scroll to sections [kreafox - [`997d732`](https://github.com/eea/volto-cca-policy/commit/997d732e8cbb679e5944db5197174109fc7df315)]
12
+
13
+ #### :bug: Bug Fixes
14
+
15
+ - fix(views): show info only on observatory [kreafox - [`fbc7558`](https://github.com/eea/volto-cca-policy/commit/fbc7558b062c89af891d75c41735b334a1775594)]
16
+ - fix(views): fix case when we use thumbnail instead of logo [kreafox - [`0222507`](https://github.com/eea/volto-cca-policy/commit/02225070d6dea7211e4ecd5d8608ef6749590789)]
17
+ - fix:unable to resolve path to module @eeacms/search [ana-oprea - [`0abeaf3`](https://github.com/eea/volto-cca-policy/commit/0abeaf36b3123e3f9c738e1593681e39b78ca4c1)]
18
+ - fix(views): share info button link [kreafox - [`af797f0`](https://github.com/eea/volto-cca-policy/commit/af797f07571c95f94aef62ae680d72019493431d)]
19
+ - fix(views): fix metadata for db items [kreafox - [`cc81806`](https://github.com/eea/volto-cca-policy/commit/cc818068ed389a53ca517d95e81fad58a88bbebd)]
20
+
21
+ #### :nail_care: Enhancements
22
+
23
+ - change(views): update section layout on Adaptation Option [kreafox - [`3ee4fb7`](https://github.com/eea/volto-cca-policy/commit/3ee4fb7a378435555726cbb9f04c3914995d1643)]
24
+ - change(views): add IPCC metadata [kreafox - [`a66ad07`](https://github.com/eea/volto-cca-policy/commit/a66ad07be594c8dc1dbec1f5f7b0ef17c0116042)]
25
+
26
+ #### :house: Internal changes
27
+
28
+ - style(views): fix icon position in DocumentList [kreafox - [`7cc9fa8`](https://github.com/eea/volto-cca-policy/commit/7cc9fa8cf2b3bda26eafd17316ab4e8449e0c500)]
29
+
30
+ #### :hammer_and_wrench: Others
31
+
32
+ - Add transparent overlay for collection stats, to make it easier to select the block [Tiberiu Ichim - [`6c8507a`](https://github.com/eea/volto-cca-policy/commit/6c8507a928ffd53d8c6b5384ff492839bfc42c77)]
33
+ - Add another migration button [Tiberiu Ichim - [`5759f2c`](https://github.com/eea/volto-cca-policy/commit/5759f2cd5c4cca7937f74d3f398157ec120524b9)]
34
+ - update path [Teodor - [`0ddd49f`](https://github.com/eea/volto-cca-policy/commit/0ddd49f12cb3b33fba1fda0819b2967bd6948029)]
35
+ - cleanup code [kreafox - [`b096c4c`](https://github.com/eea/volto-cca-policy/commit/b096c4c71ab7c9d04acb2908c6a5e023af41801c)]
36
+ - update rule [Teodor - [`d6f0bba`](https://github.com/eea/volto-cca-policy/commit/d6f0bbabda5279b56a0cf3dcd395cea7852ed915)]
37
+ - test: update snapshots [kreafox - [`afde48c`](https://github.com/eea/volto-cca-policy/commit/afde48c32b461ec06592fc0adb195a4995170998)]
38
+ - test: Update jest,Jenkinsfile,lint to volto-addons-template PR30 [valentinab25 - [`0ab94c8`](https://github.com/eea/volto-cca-policy/commit/0ab94c8a8ff7c457b02ad2b177b79f2b18936e50)]
39
+ - remove eslintrc [Teodor - [`4020b91`](https://github.com/eea/volto-cca-policy/commit/4020b918d28efa18073fb87b011ab2702addf518)]
40
+ - eslintrc removed from gitignore [Teodor - [`f427a9c`](https://github.com/eea/volto-cca-policy/commit/f427a9c8baa29d20d41fd901dda039f251e6fdba)]
41
+ - revert razzle extend config [Teodor - [`b849609`](https://github.com/eea/volto-cca-policy/commit/b84960945009e9821c21a423f8d5f8eec3b21f80)]
42
+ - update eslint rule [Teodor - [`dc1b2c2`](https://github.com/eea/volto-cca-policy/commit/dc1b2c22caa3b0d2359d08093a12a33ee2c65a06)]
43
+ - add eslint rules [Teodor - [`8ab2af3`](https://github.com/eea/volto-cca-policy/commit/8ab2af3336f3c6b4416db1c79df1b9a44383f310)]
44
+ - Fix navigation children [Tiberiu Ichim - [`4ef429d`](https://github.com/eea/volto-cca-policy/commit/4ef429d1b3c4ac359f27741d54f44092e81d4d4d)]
45
+ - Add translate button [Tiberiu Ichim - [`6d4751e`](https://github.com/eea/volto-cca-policy/commit/6d4751e0750373c1e9dd657dc9346c5590ef38d0)]
46
+ - Simplify code [Tiberiu Ichim - [`900e867`](https://github.com/eea/volto-cca-policy/commit/900e867db1d45a3a2f042eb9763c306528346509)]
7
47
  ### [0.1.92](https://github.com/eea/volto-cca-policy/compare/0.1.91...0.1.92) - 6 March 2024
8
48
 
9
49
  #### :rocket: New Features
@@ -604,13 +644,10 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
604
644
  - Refs #260715 rast-block wip [Tripon Eugen - [`f19d54e`](https://github.com/eea/volto-cca-policy/commit/f19d54e0b9a6a86bf344eb85b6a1cda7f3de91bf)]
605
645
  - Refs #260715 rast-block wip [Tripon Eugen - [`2828537`](https://github.com/eea/volto-cca-policy/commit/2828537b6c084cd1a82162d552fb4ef025b71f9f)]
606
646
  - Refs #260715 rast-block updates [Tripon Eugen - [`1e803e5`](https://github.com/eea/volto-cca-policy/commit/1e803e5bd3d3fb7558f261c76c68866be7beb8b5)]
607
- - test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`0a15e1b`](https://github.com/eea/volto-cca-policy/commit/0a15e1b2ad081233685e80d5b3c60a8663f6b896)]
608
- - test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`9554e44`](https://github.com/eea/volto-cca-policy/commit/9554e44c92a621a52b2adb5a4830fb084ee5734b)]
609
647
  ### [0.1.49](https://github.com/eea/volto-cca-policy/compare/0.1.48...0.1.49) - 15 November 2023
610
648
 
611
649
  #### :house: Internal changes
612
650
 
613
- - chore: [JENKINS] Refactor automated testing [valentinab25 - [`7b820a6`](https://github.com/eea/volto-cca-policy/commit/7b820a6369c2ddd5203b1a4abe352cb4bb43db7a)]
614
651
  - chore: husky, lint-staged use fixed versions [valentinab25 - [`f0a8061`](https://github.com/eea/volto-cca-policy/commit/f0a8061c275c236deb00087c23fac9860a073106)]
615
652
 
616
653
  #### :hammer_and_wrench: Others
@@ -627,9 +664,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
627
664
  - Refs #259267 - jenkins test [Tripon Eugen - [`cacd31e`](https://github.com/eea/volto-cca-policy/commit/cacd31e7b1afe0983674ed5c7632d2e1d7fa752e)]
628
665
  - Refs #259267 - jenkins [Tripon Eugen - [`5b3affe`](https://github.com/eea/volto-cca-policy/commit/5b3affee8401239de10097884c1b7f2349d15ec0)]
629
666
  - Refs #259267 - add When, lead image and title to files [Tripon Eugen - [`2cedb23`](https://github.com/eea/volto-cca-policy/commit/2cedb237f898af9057e13fba94b615ef71077204)]
630
- - test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`4d607a5`](https://github.com/eea/volto-cca-policy/commit/4d607a576e9d0a5c34e48c41b409e7df616ee3d6)]
631
- - test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`b7f74d5`](https://github.com/eea/volto-cca-policy/commit/b7f74d53513a6edbfbca5cb6d19687929bb1e5db)]
632
- - test: [JENKINS] Improve cypress time [valentinab25 - [`db65617`](https://github.com/eea/volto-cca-policy/commit/db656173391f65157098d95d388c25f6429753d8)]
633
667
  - Refs #259267 - cca event blocks attachments and check not mandatoty fields [Tripon Eugen - [`3138e5a`](https://github.com/eea/volto-cca-policy/commit/3138e5afb5bfbdbed14e27ed457b16867b7fa414)]
634
668
  - Refs #256681 - Fix error in CCA Event view menu. ([React Intl] An id must be provided to format a message.) [GhitaB - [`517eeb8`](https://github.com/eea/volto-cca-policy/commit/517eeb817264a47bbfd6b9b7d22aaf22d44ed224)]
635
669
  - Refs #161485 - Fix ECDE name conflict. [GhitaB - [`8bfd99f`](https://github.com/eea/volto-cca-policy/commit/8bfd99ff68bb82a04d1c0ed625fa514fcf46289e)]
@@ -846,7 +880,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
846
880
 
847
881
  #### :house: Internal changes
848
882
 
849
- - chore: [JENKINS] Remove alpha testing version [valentinab25 - [`ad1ced0`](https://github.com/eea/volto-cca-policy/commit/ad1ced0971ba116c13a3b5fcc039172cc915c919)]
850
883
 
851
884
  #### :hammer_and_wrench: Others
852
885
 
@@ -1327,7 +1360,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1327
1360
  #### :hammer_and_wrench: Others
1328
1361
 
1329
1362
  - Refs #158294 - Update supported languages list. [GhitaB - [`0a4f91f`](https://github.com/eea/volto-cca-policy/commit/0a4f91f39b7edc367bd4c127d6a8f273c7788361)]
1330
- - Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`8f1f9ce`](https://github.com/eea/volto-cca-policy/commit/8f1f9ce6c22805670cc0800d3c779b6d619d0f31)]
1331
1363
  ### [0.1.1](https://github.com/eea/volto-cca-policy/compare/0.1.0...0.1.1) - 13 December 2022
1332
1364
 
1333
1365
  #### :hammer_and_wrench: Others
@@ -1,3 +1,5 @@
1
+ require('dotenv').config({ path: __dirname + '/.env' })
2
+
1
3
  module.exports = {
2
4
  testMatch: ['**/src/addons/**/?(*.)+(spec|test).[jt]s?(x)'],
3
5
  collectCoverageFrom: [
@@ -9,16 +11,23 @@ module.exports = {
9
11
  '@plone/volto/cypress': '<rootDir>/node_modules/@plone/volto/cypress',
10
12
  '@plone/volto/babel': '<rootDir>/node_modules/@plone/volto/babel',
11
13
  '@plone/volto/(.*)$': '<rootDir>/node_modules/@plone/volto/src/$1',
12
- '@package/(.*)$': '<rootDir>/src/$1',
13
- '@root/(.*)$': '<rootDir>/src/$1',
14
+ '@package/(.*)$': '<rootDir>/node_modules/@plone/volto/src/$1',
15
+ '@root/(.*)$': '<rootDir>/node_modules/@plone/volto/src/$1',
14
16
  '@plone/volto-quanta/(.*)$': '<rootDir>/src/addons/volto-quanta/src/$1',
17
+ '@eeacms/search/(.*)$': '<rootDir>/src/addons/volto-searchlib/searchlib/$1',
18
+ '@eeacms/search': '<rootDir>/src/addons/volto-searchlib/searchlib',
15
19
  '@eeacms/(.*?)/(.*)$': '<rootDir>/node_modules/@eeacms/$1/src/$2',
16
- '@plone/volto-slate':
20
+ '@plone/volto-slate$':
17
21
  '<rootDir>/node_modules/@plone/volto/packages/volto-slate/src',
22
+ '@plone/volto-slate/(.*)$':
23
+ '<rootDir>/node_modules/@plone/volto/packages/volto-slate/src/$1',
18
24
  '~/(.*)$': '<rootDir>/src/$1',
19
25
  'load-volto-addons':
20
26
  '<rootDir>/node_modules/@plone/volto/jest-addons-loader.js',
21
27
  },
28
+ transformIgnorePatterns: [
29
+ '/node_modules/(?!(@plone|@root|@package|@eeacms)/).*/',
30
+ ],
22
31
  transform: {
23
32
  '^.+\\.js(x)?$': 'babel-jest',
24
33
  '^.+\\.(png)$': 'jest-file',
@@ -33,4 +42,9 @@ module.exports = {
33
42
  statements: 5,
34
43
  },
35
44
  },
36
- };
45
+ ...(process.env.JEST_USE_SETUP === 'ON' && {
46
+ setupFilesAfterEnv: [
47
+ '<rootDir>/node_modules/@eeacms/volto-cca-policy/jest.setup.js',
48
+ ],
49
+ }),
50
+ }
package/jest.setup.js ADDED
@@ -0,0 +1,65 @@
1
+ import { jest } from '@jest/globals';
2
+ import configureStore from 'redux-mock-store';
3
+ import thunk from 'redux-thunk';
4
+ import { blocksConfig } from '@plone/volto/config/Blocks';
5
+ import installSlate from '@plone/volto-slate/index';
6
+
7
+ var mockSemanticComponents = jest.requireActual('semantic-ui-react');
8
+ var mockComponents = jest.requireActual('@plone/volto/components');
9
+ var config = jest.requireActual('@plone/volto/registry').default;
10
+
11
+ config.blocks.blocksConfig = {
12
+ ...blocksConfig,
13
+ ...config.blocks.blocksConfig,
14
+ };
15
+
16
+ jest.doMock('semantic-ui-react', () => ({
17
+ __esModule: true,
18
+ ...mockSemanticComponents,
19
+ Popup: ({ content, trigger }) => {
20
+ return (
21
+ <div className="popup">
22
+ <div className="trigger">{trigger}</div>
23
+ <div className="content">{content}</div>
24
+ </div>
25
+ );
26
+ },
27
+ }));
28
+
29
+ jest.doMock('@plone/volto/components', () => {
30
+ return {
31
+ __esModule: true,
32
+ ...mockComponents,
33
+ SidebarPortal: ({ children }) => <div id="sidebar">{children}</div>,
34
+ };
35
+ });
36
+
37
+ jest.doMock('@plone/volto/registry', () =>
38
+ [installSlate].reduce((acc, apply) => apply(acc), config),
39
+ );
40
+
41
+ const mockStore = configureStore([thunk]);
42
+
43
+ global.fetch = jest.fn(() =>
44
+ Promise.resolve({
45
+ json: () => Promise.resolve({}),
46
+ }),
47
+ );
48
+
49
+ global.store = mockStore({
50
+ intl: {
51
+ locale: 'en',
52
+ messages: {},
53
+ formatMessage: jest.fn(),
54
+ },
55
+ content: {
56
+ create: {},
57
+ subrequests: [],
58
+ },
59
+ connected_data_parameters: {},
60
+ screen: {
61
+ page: {
62
+ width: 768,
63
+ },
64
+ },
65
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.1.92",
3
+ "version": "0.1.93",
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",
@@ -1,54 +1,67 @@
1
1
  import { Plug } from '@plone/volto/components/manage/Pluggable';
2
2
  import { getBaseUrl } from '@plone/volto/helpers';
3
3
 
4
+ const button = (id, title, label, destination) => (
5
+ <button
6
+ className={`circle-right-btn `}
7
+ id={id}
8
+ onClick={() => window.open(destination, '_blank')}
9
+ title={title}
10
+ >
11
+ {label}
12
+ </button>
13
+ );
14
+
4
15
  function MigrationButtons(props) {
5
16
  const { content, token, pathname } = props;
6
17
  const contentId = content?.['@id'] || '';
7
18
  const show = !!token && contentId && contentId.indexOf('europa.eu') === -1;
8
19
  const base = getBaseUrl(pathname);
20
+ const buttons = [
21
+ button(
22
+ 'migration',
23
+ 'Migrate context',
24
+ 'M',
25
+ `http://localhost:8080/cca/${base}/@@volto_migrate`,
26
+ ),
27
+ button(
28
+ 'view',
29
+ 'View original',
30
+ 'V',
31
+ `https://climate-adapt.eea.europa.eu${base}`,
32
+ ),
33
+ button(
34
+ 'debug',
35
+ 'Debug',
36
+ 'PDB',
37
+ `http://localhost:8080/cca/${base}/@@gopdb`,
38
+ ),
39
+ button(
40
+ 'translate',
41
+ 'Translate',
42
+ 'T',
43
+ `http://localhost:8080/cca/${base}/@@volto-html`,
44
+ ),
45
+ button(
46
+ 'preview',
47
+ 'Preview Translation',
48
+ 'P',
49
+ `http://localhost:8080/cca/${base}/@@volto-html?half=1`,
50
+ ),
51
+ ];
52
+
53
+ if (!show) return null;
9
54
 
10
- return show ? (
55
+ return (
11
56
  <Plug
12
57
  pluggable="main.toolbar.top"
13
58
  id="cca-migration-helpers"
14
59
  order={0}
15
60
  dependencies={[contentId]}
16
61
  >
17
- <button
18
- className={`circle-right-btn `}
19
- id="toolbar-migration"
20
- onClick={() =>
21
- window.open(
22
- `http://localhost:8080/cca/${base}/@@volto_migrate`,
23
- '_blank',
24
- )
25
- }
26
- title="Migrate context"
27
- >
28
- M
29
- </button>
30
-
31
- <button
32
- className={`circle-right-btn `}
33
- id="toolbar-view"
34
- onClick={() =>
35
- window.open(`https://climate-adapt.eea.europa.eu${base}`, '_blank')
36
- }
37
- title="View original"
38
- >
39
- V
40
- </button>
41
-
42
- <button
43
- className={`circle-right-btn`}
44
- id="toolbar-migration"
45
- onClick={() => window.open(`http://localhost:8080/cca/${base}/@@gopdb`)}
46
- title="Migrate context"
47
- >
48
- PDB
49
- </button>
62
+ {buttons}
50
63
  </Plug>
51
- ) : null;
64
+ );
52
65
  }
53
66
 
54
67
  export default MigrationButtons;
@@ -3,12 +3,15 @@ import { SidebarPortal } from '@plone/volto/components';
3
3
  import InlineForm from '@plone/volto/components/manage/Form/InlineForm';
4
4
  import Schema from './schema';
5
5
  import View from './CollectionStatsView';
6
+ import TransparentOverlay from '../../TransparentOverlay';
6
7
 
7
8
  const Edit = (props) => {
8
9
  const schema = Schema();
9
10
  return (
10
11
  <>
11
- <View {...props} mode="edit" />
12
+ <TransparentOverlay>
13
+ <View {...props} mode="edit" />
14
+ </TransparentOverlay>
12
15
 
13
16
  <SidebarPortal selected={props.selected}>
14
17
  <InlineForm
@@ -0,0 +1,11 @@
1
+ const transparentStyle = {
2
+ pointerEvents: 'none',
3
+ };
4
+
5
+ export default function TransparentOverlay({ children }) {
6
+ return (
7
+ <div className="transparent-overlay" style={transparentStyle}>
8
+ {children}
9
+ </div>
10
+ );
11
+ }
@@ -141,7 +141,6 @@ const EEAHeader = (props) => {
141
141
  <a
142
142
  href="https://europa.eu/european-union/contact/institutions-bodies_en"
143
143
  target="_blank"
144
- rel="noreferrer"
145
144
  onKeyDown={(evt) => evt.stopPropagation()}
146
145
  >
147
146
  See all EU institutions and bodies
@@ -164,7 +163,6 @@ const EEAHeader = (props) => {
164
163
  href={item.href}
165
164
  className="site"
166
165
  target="_blank"
167
- rel="noreferrer"
168
166
  onKeyDown={(evt) => evt.stopPropagation()}
169
167
  >
170
168
  {item.title}
@@ -6,11 +6,12 @@ import {
6
6
  PublishedModifiedInfo,
7
7
  ShareInfo,
8
8
  BannerTitle,
9
- LogoWrapper,
9
+ ItemLogo,
10
10
  } from '@eeacms/volto-cca-policy/helpers';
11
- import { Segment, Divider, Image, Grid } from 'semantic-ui-react';
11
+ import { Segment, Divider, Grid } from 'semantic-ui-react';
12
12
  import { UniversalLink } from '@plone/volto/components';
13
13
  import { PortalMessage } from '@eeacms/volto-cca-policy/components';
14
+ import AnchorLink from 'react-anchor-link-smooth-scroll';
14
15
 
15
16
  function createDataField(type, field, section, title) {
16
17
  return {
@@ -73,44 +74,42 @@ const SectionsMenu = (props) => {
73
74
 
74
75
  return (
75
76
  <div className="adaptation-details">
76
- <div>
77
- {sections.length > 0 && (
78
- <>
79
- <h3>Additional Details</h3>
80
- <ul>
81
- {sections.map((data, index) => (
82
- <li key={index}>
83
- <a href={'#' + sectionID(data.title)}>{data.title}</a>
84
- </li>
85
- ))}
86
- </ul>
87
- </>
88
- )}
89
- </div>
90
- <div>
91
- <h3>Reference information</h3>
92
- <ul>
93
- <li>
94
- <a href="#websites">Websites</a>
95
- </li>
96
- <li>
97
- <a href="#source">Source</a>
98
- </li>
99
- </ul>
100
- </div>
77
+ <Grid columns="12">
78
+ <Grid.Column mobile={12} tablet={12} computer={6}>
79
+ {sections.length > 0 && (
80
+ <>
81
+ <h4>Additional Details</h4>
82
+ <ul>
83
+ {sections.map((data, index) => (
84
+ <li key={index}>
85
+ <AnchorLink href={'#' + sectionID(data.title)}>
86
+ {data.title}
87
+ </AnchorLink>
88
+ </li>
89
+ ))}
90
+ </ul>
91
+ </>
92
+ )}
93
+ </Grid.Column>
94
+ <Grid.Column mobile={12} tablet={12} computer={6}>
95
+ <h4>Reference information</h4>
96
+ <ul>
97
+ <li>
98
+ <AnchorLink href="#websites">Websites</AnchorLink>
99
+ </li>
100
+ <li>
101
+ <AnchorLink href="#source">Source</AnchorLink>
102
+ </li>
103
+ </ul>
104
+ </Grid.Column>
105
+ </Grid>
101
106
  </div>
102
107
  );
103
108
  };
104
109
 
105
110
  function AdaptationOptionView(props) {
106
111
  const { content } = props;
107
- const {
108
- related_case_studies,
109
- long_description,
110
- ipcc_category,
111
- logo,
112
- title,
113
- } = content;
112
+ const { related_case_studies, long_description, ipcc_category } = content;
114
113
 
115
114
  const usedSections = dataDisplay.filter((data) =>
116
115
  content?.hasOwnProperty(data.field),
@@ -133,16 +132,7 @@ function AdaptationOptionView(props) {
133
132
  computer={8}
134
133
  className="col-left"
135
134
  >
136
- <LogoWrapper logo={logo}>
137
- <h2>Description</h2>
138
- {logo && (
139
- <Image
140
- src={logo?.scales?.mini?.download}
141
- alt={title}
142
- className="db-logo"
143
- />
144
- )}
145
- </LogoWrapper>
135
+ <ItemLogo {...props}></ItemLogo>
146
136
  <HTMLField value={long_description} />
147
137
  <SectionsMenu sections={usedSections} />
148
138
 
@@ -5,8 +5,9 @@ import {
5
5
  BannerTitle,
6
6
  LogoWrapper,
7
7
  } from '@eeacms/volto-cca-policy/helpers';
8
- import { Accordion, Icon, Segment, Image } from 'semantic-ui-react';
8
+ import { Accordion, Icon, Segment, Image, Button } from 'semantic-ui-react';
9
9
  import { PortalMessage } from '@eeacms/volto-cca-policy/components';
10
+ import { Link } from 'react-router-dom';
10
11
 
11
12
  if (!__SERVER__) {
12
13
  window.cds_toolbox = {
@@ -170,13 +171,13 @@ function C3SIndicatorView(props) {
170
171
 
171
172
  <div className="c3s-buttons">
172
173
  <a href="#details">
173
- <button className="ui button primary" onClick={toggleIframe}>
174
+ <Button primary onClick={toggleIframe}>
174
175
  {showDetails ? 'Go back' : 'Explore in detail'}
175
- </button>
176
- </a>
177
- <a href="/knowledge/european-climate-data-explorer/">
178
- <button className="ui button primary">ECDE homepage</button>
176
+ </Button>
179
177
  </a>
178
+ <Link to="/knowledge/european-climate-data-explorer/">
179
+ <Button primary>ECDE homepage</Button>
180
+ </Link>
180
181
  </div>
181
182
 
182
183
  {definition_app && !hasIndicatorTitle && (
@@ -9,8 +9,11 @@ import {
9
9
  BannerTitle,
10
10
  } from '@eeacms/volto-cca-policy/helpers';
11
11
  import { Divider, Grid, Icon, Image } from 'semantic-ui-react';
12
- import { ImageGallery } from '@eeacms/volto-cca-policy/components';
13
- import { PortalMessage } from '@eeacms/volto-cca-policy/components';
12
+ import {
13
+ ImageGallery,
14
+ PortalMessage,
15
+ } from '@eeacms/volto-cca-policy/components';
16
+ import AnchorLink from 'react-anchor-link-smooth-scroll';
14
17
 
15
18
  const PrimaryPhoto = (props) => {
16
19
  const { content } = props;
@@ -122,7 +125,7 @@ const dataDisplay = [
122
125
  field: 'source',
123
126
  section: 'source',
124
127
  title: 'Source',
125
- contentTitle: 'Reference', // override the title in content section
128
+ contentTitle: 'References', // override the title in content section
126
129
  group: 3,
127
130
  },
128
131
  ];
@@ -180,7 +183,9 @@ const SectionsMenu = (props) => {
180
183
  <ul>
181
184
  {sections.map((data, index) => (
182
185
  <li key={index}>
183
- <a href={'#' + sectionID(data.title)}>{data.title}</a>
186
+ <AnchorLink href={'#' + sectionID(data.title)}>
187
+ {data.title}
188
+ </AnchorLink>
184
189
  </li>
185
190
  ))}
186
191
  </ul>
@@ -12,21 +12,23 @@ import {
12
12
  ReferenceInfo,
13
13
  ContentMetadata,
14
14
  PublishedModifiedInfo,
15
- LogoWrapper,
15
+ ItemLogo,
16
16
  ShareInfo,
17
17
  ContentRelatedItems,
18
18
  DocumentsList,
19
19
  BannerTitle,
20
20
  } from '@eeacms/volto-cca-policy/helpers';
21
21
  import { PortalMessage } from '@eeacms/volto-cca-policy/components';
22
- import { Divider, Image, Grid } from 'semantic-ui-react';
22
+ import { isObservatoryURL } from '@eeacms/volto-cca-policy/helpers/Utils';
23
+ import { Divider, Grid } from 'semantic-ui-react';
24
+ import { useLocation } from 'react-router-dom';
23
25
 
24
26
  const DatabaseItemView = (props) => {
25
27
  const { content } = props;
26
28
  const type = content['@type'];
29
+ const location = useLocation();
30
+ const isObservatoryItem = isObservatoryURL(location.pathname);
27
31
  const {
28
- logo,
29
- title,
30
32
  long_description,
31
33
  map_graphs,
32
34
  organisational_key_activities,
@@ -86,22 +88,17 @@ const DatabaseItemView = (props) => {
86
88
  computer={8}
87
89
  className="col-left"
88
90
  >
89
- <LogoWrapper logo={logo}>
90
- <h2>Description</h2>
91
- {logo && (
92
- <Image
93
- src={logo?.scales?.mini?.download}
94
- alt={title}
95
- className="db-logo"
96
- />
97
- )}
98
- </LogoWrapper>
91
+ <ItemLogo {...props}></ItemLogo>
99
92
  <HTMLField value={long_description} />
100
93
 
101
- {organisational_key_activities && (
94
+ {isObservatoryItem && (
102
95
  <>
103
- <h3>Key activities within climate change and health</h3>
104
- <HTMLField value={organisational_key_activities} />
96
+ {organisational_key_activities && (
97
+ <>
98
+ <h3>Key activities within climate change and health</h3>
99
+ <HTMLField value={organisational_key_activities} />
100
+ </>
101
+ )}
105
102
  </>
106
103
  )}
107
104
 
@@ -121,17 +118,21 @@ const DatabaseItemView = (props) => {
121
118
 
122
119
  <ReferenceInfo content={content} />
123
120
 
124
- {organisational_websites && (
121
+ {isObservatoryItem && (
125
122
  <>
126
- <h5>Links to further information</h5>
127
- <HTMLField value={organisational_websites} />
128
- </>
129
- )}
123
+ {organisational_websites && (
124
+ <>
125
+ <h5>Links to further information</h5>
126
+ <HTMLField value={organisational_websites} />
127
+ </>
128
+ )}
130
129
 
131
- {organisational_contact_information && (
132
- <>
133
- <h5>Contact information for the Observatory</h5>
134
- <HTMLField value={organisational_contact_information} />
130
+ {organisational_contact_information && (
131
+ <>
132
+ <h5>Contact information for the Observatory</h5>
133
+ <HTMLField value={organisational_contact_information} />
134
+ </>
135
+ )}
135
136
  </>
136
137
  )}
137
138
 
@@ -4,25 +4,17 @@ import {
4
4
  ContentMetadata,
5
5
  PublishedModifiedInfo,
6
6
  ShareInfo,
7
+ ItemLogo,
7
8
  ReferenceInfo,
8
- LogoWrapper,
9
9
  } from '@eeacms/volto-cca-policy/helpers';
10
- import { Divider, Image, Grid } from 'semantic-ui-react';
10
+ import { Divider, Grid } from 'semantic-ui-react';
11
11
  import { PortalMessage } from '@eeacms/volto-cca-policy/components';
12
12
 
13
13
  import config from '@plone/volto/registry';
14
14
 
15
15
  function ProjectView(props) {
16
16
  const { content } = props;
17
- const {
18
- long_description,
19
- lead,
20
- funding,
21
- partners,
22
- acronym,
23
- title,
24
- logo,
25
- } = content;
17
+ const { long_description, lead, funding, partners, acronym, title } = content;
26
18
 
27
19
  const {
28
20
  blocks: { blocksConfig },
@@ -46,6 +38,7 @@ function ProjectView(props) {
46
38
  }}
47
39
  metadata={{
48
40
  ...content,
41
+ image: '',
49
42
  title: title + ' (' + acronym + ')',
50
43
  }}
51
44
  />
@@ -60,16 +53,7 @@ function ProjectView(props) {
60
53
  computer={8}
61
54
  className="col-left"
62
55
  >
63
- <LogoWrapper logo={logo}>
64
- <h2>Description</h2>
65
- {logo && (
66
- <Image
67
- src={logo?.scales?.mini?.download}
68
- alt={title}
69
- className="db-logo"
70
- />
71
- )}
72
- </LogoWrapper>
56
+ <ItemLogo {...props}></ItemLogo>
73
57
  <HTMLField value={long_description} />
74
58
 
75
59
  <Divider />
@@ -3,9 +3,16 @@ import {
3
3
  BIOREGIONS,
4
4
  SUBNATIONAL_REGIONS,
5
5
  } from '@eeacms/volto-cca-policy/helpers';
6
+ import {
7
+ VIDEO,
8
+ GUIDANCE,
9
+ INDICATOR,
10
+ PUBICATION_REPORT,
11
+ } from '@eeacms/volto-cca-policy/helpers/Constants';
6
12
  import { Fragment } from 'react';
7
- import { Popup } from 'semantic-ui-react';
8
- import { Segment } from 'semantic-ui-react';
13
+ import { Popup, Segment } from 'semantic-ui-react';
14
+ import { isObservatoryURL } from '@eeacms/volto-cca-policy/helpers/Utils';
15
+ import { useLocation } from 'react-router-dom';
9
16
 
10
17
  function renderElement(value) {
11
18
  return [BIOREGIONS[value]];
@@ -224,13 +231,13 @@ function PublicationDateInfo(props) {
224
231
  let tooltipText =
225
232
  'The date refers to the moment in which the item has been prepared or updated by contributing experts to be submitted for the publication in Climate ADAPT';
226
233
 
227
- if (portaltype === 'eea.climateadapt.video') {
234
+ if (portaltype === VIDEO) {
228
235
  tooltipText = 'The date refers to the date of release of the video';
229
236
  }
230
237
  if (
231
- portaltype === 'eea.climateadapt.guidancedocument' ||
232
- portaltype === 'eea.climateadapt.indicator' ||
233
- portaltype === 'eea.climateadapt.publicationreport'
238
+ portaltype === GUIDANCE ||
239
+ portaltype === INDICATOR ||
240
+ portaltype === PUBICATION_REPORT
234
241
  ) {
235
242
  tooltipText =
236
243
  'The date refers to the latest date of publication of the item';
@@ -273,18 +280,32 @@ function ItemsList(props) {
273
280
 
274
281
  function ContentMetadata(props) {
275
282
  const { content } = props;
283
+ const {
284
+ sectors,
285
+ geochars,
286
+ keywords,
287
+ elements,
288
+ duration,
289
+ spatial_layer,
290
+ ipcc_category,
291
+ health_impacts,
292
+ climate_impacts,
293
+ governance_level,
294
+ key_type_measures,
295
+ funding_programme,
296
+ } = content;
276
297
  const type = content['@type'];
277
-
278
- const hasGeoChars =
279
- content?.geochars !== null || content?.spatial_layer.length > 0;
298
+ const location = useLocation();
299
+ const isObservatoryItem = isObservatoryURL(location.pathname);
300
+ const hasGeoChars = geochars !== null || spatial_layer.length > 0;
280
301
 
281
302
  let date_title;
282
- if (type === 'eea.climateadapt.video') {
303
+ if (type === VIDEO) {
283
304
  date_title = 'Date of release:';
284
305
  } else if (
285
- type === 'eea.climateadapt.publicationreport' ||
286
- type === 'eea.climateadapt.indicator' ||
287
- type === 'eea.climateadapt.guidancedocument'
306
+ type === PUBICATION_REPORT ||
307
+ type === INDICATOR ||
308
+ type === GUIDANCE
288
309
  ) {
289
310
  date_title = 'Date of publication:';
290
311
  } else {
@@ -299,48 +320,89 @@ function ContentMetadata(props) {
299
320
  value={content?.publication_date}
300
321
  portaltype={content?.portal_type}
301
322
  />
302
- {content?.keywords?.length > 0 && (
323
+
324
+ {isObservatoryItem && (
325
+ <>
326
+ {health_impacts && health_impacts?.length > 0 && (
327
+ <>
328
+ <h5>Health impact:</h5>
329
+ <ItemsList value={health_impacts} />
330
+ </>
331
+ )}
332
+ </>
333
+ )}
334
+
335
+ {keywords && keywords?.length > 0 && (
303
336
  <>
304
337
  <h5>Keywords:</h5>
305
- <span>{content?.keywords?.sort().join(', ')}</span>
338
+ <span>{keywords?.sort().join(', ')}</span>
306
339
  </>
307
340
  )}
308
- {content?.climate_impacts?.length > 0 && (
341
+
342
+ {key_type_measures && key_type_measures?.length > 0 && (
309
343
  <>
310
- <h5>Climate impacts:</h5>
311
- <ItemsList value={content.climate_impacts} />
344
+ <h5>Key Type Measures:</h5>
345
+ <ItemsList value={key_type_measures} />
312
346
  </>
313
347
  )}
314
- {content?.elements?.length > 0 && (
348
+
349
+ {ipcc_category && ipcc_category?.length > 0 && (
315
350
  <>
316
- <h5> Adaptation elements:</h5>
317
- <ItemsList value={content.elements} />
351
+ <h5>IPCC adaptation options categories:</h5>
352
+ <ItemsList value={ipcc_category} />
318
353
  </>
319
354
  )}
320
- {content?.sectors?.length > 0 && (
355
+
356
+ {!isObservatoryItem && (
321
357
  <>
322
- <h5>Sectors:</h5>
323
- <ItemsList value={content.sectors} />
358
+ {climate_impacts && climate_impacts?.length > 0 && (
359
+ <>
360
+ <h5>Climate impacts:</h5>
361
+ <ItemsList value={climate_impacts} />
362
+ </>
363
+ )}
364
+
365
+ {elements && elements?.length > 0 && (
366
+ <>
367
+ <h5> Adaptation elements:</h5>
368
+ <ItemsList value={elements} />
369
+ </>
370
+ )}
371
+
372
+ {sectors && sectors?.length > 0 && (
373
+ <>
374
+ <h5>Sectors:</h5>
375
+ <ItemsList value={sectors} />
376
+ </>
377
+ )}
324
378
  </>
325
379
  )}
326
- {content?.governance_level?.length > 0 && (
380
+
381
+ {governance_level && governance_level?.length > 0 && (
327
382
  <>
328
383
  <h5>Governance level:</h5>
329
- <ItemsList value={content.governance_level} join="<br />" />
384
+ <ItemsList value={governance_level} join="<br />" />
330
385
  </>
331
386
  )}
332
- {content?.funding_programme?.title?.length > 0 && (
387
+
388
+ {!isObservatoryItem && (
333
389
  <>
334
- <h5>Funding Programme:</h5>
335
- <span>{content.funding_programme.title}</span>
390
+ {funding_programme && funding_programme?.title?.length > 0 && (
391
+ <>
392
+ <h5>Funding Programme:</h5>
393
+ <span>{funding_programme.title}</span>
394
+ </>
395
+ )}
336
396
  </>
337
397
  )}
338
- {content?.duration && (
398
+
399
+ {duration && (
339
400
  <>
340
401
  <h5>Duration:</h5>
341
- <span>{content.duration}</span>
402
+ <span>{duration}</span>
342
403
  </>
343
404
  )}
405
+
344
406
  {hasGeoChars && (
345
407
  <>
346
408
  <h5>Geographic characterisation:</h5>
@@ -1,13 +1,21 @@
1
+ import { Link } from 'react-router-dom';
2
+ import { useSelector } from 'react-redux';
3
+ import { Button, Icon } from 'semantic-ui-react';
4
+
1
5
  const ShareInfo = (props) => {
6
+ const currentLang = useSelector((state) => state.intl.locale);
7
+
2
8
  return (
3
- <div className="share-info">
4
- <a href="/help/share-your-info">
5
- <button className="ui button primary icon labeled">
6
- Share your information
7
- <i aria-hidden="true" className="arrow right icon"></i>
8
- </button>
9
- </a>
10
- </div>
9
+ <>
10
+ <div className="share-info">
11
+ <Link to={`/${currentLang + '/help/share-your-info'}`}>
12
+ <Button icon primary labelPosition="left">
13
+ Share your information
14
+ <Icon name="right arrow" />
15
+ </Button>
16
+ </Link>
17
+ </div>
18
+ </>
11
19
  );
12
20
  };
13
21
 
@@ -1,7 +1,14 @@
1
1
  import React, { Fragment } from 'react';
2
2
  import { UniversalLink } from '@plone/volto/components';
3
3
  import config from '@plone/volto/registry';
4
- import { Segment } from 'semantic-ui-react';
4
+ import { Segment, Image } from 'semantic-ui-react';
5
+ import {
6
+ CASE_STUDY,
7
+ PUBICATION_REPORT,
8
+ ORGANISATION,
9
+ ADAPTATION_OPTION,
10
+ ACE_PROJECT,
11
+ } from '@eeacms/volto-cca-policy/helpers/Constants';
5
12
 
6
13
  export const HTMLField = ({ value, className }) => {
7
14
  if (value === null) {
@@ -93,8 +100,16 @@ export const BannerTitle = (props) => {
93
100
 
94
101
  export const ReferenceInfo = (props) => {
95
102
  const { content } = props;
103
+ const type = content['@type'];
96
104
  const { websites, source, contributor_list, other_contributor } = content;
97
105
 
106
+ let source_title;
107
+ if (type === ADAPTATION_OPTION) {
108
+ source_title = 'References';
109
+ } else {
110
+ source_title = 'Source';
111
+ }
112
+
98
113
  return websites?.length > 0 ||
99
114
  (source && source?.data.length > 0) ||
100
115
  contributor_list?.length > 0 ||
@@ -104,11 +119,11 @@ export const ReferenceInfo = (props) => {
104
119
 
105
120
  {websites?.length > 0 && <LinksList title="Websites:" value={websites} />}
106
121
 
107
- {content['@type'] !== 'eea.climateadapt.aceproject' && (
122
+ {type !== ACE_PROJECT && type !== ORGANISATION && (
108
123
  <>
109
124
  {source && source?.data.length > 0 && (
110
125
  <>
111
- <h5>Source:</h5>
126
+ <h5 id="source">{source_title}:</h5>
112
127
  <HTMLField value={source} className="source" />
113
128
  </>
114
129
  )}
@@ -185,6 +200,7 @@ export const PublishedModifiedInfo = (props) => {
185
200
 
186
201
  export const DocumentsList = (props) => {
187
202
  const { content } = props;
203
+ const type = content['@type'];
188
204
  const files = content?.cca_files;
189
205
  if (!files || files.length === 0) {
190
206
  return null;
@@ -199,13 +215,18 @@ export const DocumentsList = (props) => {
199
215
  section_title = content['section_title'];
200
216
  }
201
217
 
202
- if (content['@type'] === 'eea.climateadapt.casestudy') {
218
+ if (type === CASE_STUDY) {
203
219
  section_title = 'Case Studies Documents';
204
220
  }
205
221
 
206
- if (content['@type'] === 'eea.climateadapt.publicationreport') {
222
+ if (type === PUBICATION_REPORT) {
207
223
  section_title = 'Publications and Reports Documents';
208
224
  }
225
+
226
+ if (type === ORGANISATION) {
227
+ section_title = 'Organisation Documents';
228
+ }
229
+
209
230
  return (
210
231
  <Segment>
211
232
  <h5>
@@ -252,3 +273,34 @@ export const ContentRelatedItems = (props) => {
252
273
 
253
274
  export const LogoWrapper = ({ logo, children }) =>
254
275
  logo ? <div className="has-logo">{children}</div> : children;
276
+
277
+ export const ItemLogo = (props) => {
278
+ const { content } = props;
279
+ const { image, logo, title } = content;
280
+
281
+ let logo_image;
282
+ if (logo) {
283
+ logo_image = logo;
284
+ } else if (!logo && image) {
285
+ logo_image = image;
286
+ } else {
287
+ logo_image = null;
288
+ }
289
+
290
+ return (
291
+ <LogoWrapper logo={logo_image}>
292
+ <h2>Description</h2>
293
+ {logo_image && (
294
+ <Image
295
+ src={logo_image?.scales?.mini?.download}
296
+ alt={title}
297
+ className="db-logo"
298
+ />
299
+ )}
300
+ </LogoWrapper>
301
+ );
302
+ };
303
+
304
+ export const isObservatoryURL = (url) => {
305
+ return url.indexOf('/observatory/++aq++metadata') > -1;
306
+ };
@@ -3,6 +3,7 @@ import config from '@plone/volto/registry';
3
3
  import { addHeadersFactory } from '@plone/volto/helpers/Proxy/Proxy';
4
4
  import { isArray } from 'lodash';
5
5
  import { serializeNodes } from '@plone/volto-slate/editor/render';
6
+
6
7
  export {
7
8
  HTMLField,
8
9
  ExternalLink,
@@ -13,6 +14,7 @@ export {
13
14
  BannerTitle,
14
15
  LogoWrapper,
15
16
  ContentRelatedItems,
17
+ ItemLogo,
16
18
  } from './Utils';
17
19
  export ContentMetadata from './ContentMetadata';
18
20
  export ShareInfo from './ShareInfo';
package/src/index.js CHANGED
@@ -318,138 +318,58 @@ const applyConfig = (config) => {
318
318
  },
319
319
  ];
320
320
 
321
+ const hideChildren = {
322
+ hideChildrenFromNavigation: false,
323
+ };
324
+
321
325
  // mega menu layout settings
322
326
  config.settings.menuItemsLayouts = {
323
327
  // '*': {
324
328
  // hideChildrenFromNavigation: false,
325
329
  // },
326
- '/en/eu-policy': {
327
- hideChildrenFromNavigation: false,
328
- },
329
- '/de/eu-policy': {
330
- hideChildrenFromNavigation: false,
331
- },
332
- '/fr/eu-policy': {
333
- hideChildrenFromNavigation: false,
334
- },
335
- '/es/eu-policy': {
336
- hideChildrenFromNavigation: false,
337
- },
338
- '/it/eu-policy': {
339
- hideChildrenFromNavigation: false,
340
- },
341
- '/pl/eu-policy': {
342
- hideChildrenFromNavigation: false,
343
- },
344
- '/en/knowledge-1': {
345
- hideChildrenFromNavigation: false,
346
- },
347
- '/de/knowledge-1': {
348
- hideChildrenFromNavigation: false,
349
- },
350
- '/fr/knowledge-1': {
351
- hideChildrenFromNavigation: false,
352
- },
353
- '/es/knowledge-1': {
354
- hideChildrenFromNavigation: false,
355
- },
356
- '/it/knowledge-1': {
357
- hideChildrenFromNavigation: false,
358
- },
359
- '/pl/knowledge-1': {
360
- hideChildrenFromNavigation: false,
361
- },
330
+ '/en/eu-policy': hideChildren,
331
+ '/de/eu-policy': hideChildren,
332
+ '/fr/eu-policy': hideChildren,
333
+ '/es/eu-policy': hideChildren,
334
+ '/it/eu-policy': hideChildren,
335
+ '/pl/eu-policy': hideChildren,
336
+ '/en/knowledge-1': hideChildren,
337
+ '/de/knowledge-1': hideChildren,
338
+ '/fr/knowledge-1': hideChildren,
339
+ '/es/knowledge-1': hideChildren,
340
+ '/it/knowledge-1': hideChildren,
341
+ '/pl/knowledge-1': hideChildren,
362
342
  // observatory
363
- '/en/observatory/about': {
364
- hideChildrenFromNavigation: false,
365
- },
366
- '/de/observatory/about': {
367
- hideChildrenFromNavigation: false,
368
- },
369
- '/fr/observatory/about': {
370
- hideChildrenFromNavigation: false,
371
- },
372
- '/es/observatory/about': {
373
- hideChildrenFromNavigation: false,
374
- },
375
- '/it/observatory/about': {
376
- hideChildrenFromNavigation: false,
377
- },
378
- '/pl/observatory/about': {
379
- hideChildrenFromNavigation: false,
380
- },
381
- '/en/observatory/policy-context-1': {
382
- hideChildrenFromNavigation: false,
383
- },
384
- '/de/observatory/policy-context-1': {
385
- hideChildrenFromNavigation: false,
386
- },
387
- '/fr/observatory/policy-context-1': {
388
- hideChildrenFromNavigation: false,
389
- },
390
- '/es/observatory/policy-context-1': {
391
- hideChildrenFromNavigation: false,
392
- },
393
- '/it/observatory/policy-context-1': {
394
- hideChildrenFromNavigation: false,
395
- },
396
- '/pl/observatory/policy-context-1': {
397
- hideChildrenFromNavigation: false,
398
- },
399
- '/en/observatory/evidence-on-climate-and-health': {
400
- hideChildrenFromNavigation: false,
401
- },
402
- '/de/observatory/evidence-on-climate-and-health': {
403
- hideChildrenFromNavigation: false,
404
- },
405
- '/fr/observatory/evidence-on-climate-and-health': {
406
- hideChildrenFromNavigation: false,
407
- },
408
- '/es/observatory/evidence-on-climate-and-health': {
409
- hideChildrenFromNavigation: false,
410
- },
411
- '/it/observatory/evidence-on-climate-and-health': {
412
- hideChildrenFromNavigation: false,
413
- },
414
- '/pl/observatory/evidence-on-climate-and-health': {
415
- hideChildrenFromNavigation: false,
416
- },
417
- '/en/observatory/resource-catalogue-1': {
418
- hideChildrenFromNavigation: false,
419
- },
420
- '/de/observatory/resource-catalogue-1': {
421
- hideChildrenFromNavigation: false,
422
- },
423
- '/fr/observatory/resource-catalogue-1': {
424
- hideChildrenFromNavigation: false,
425
- },
426
- '/es/observatory/resource-catalogue-1': {
427
- hideChildrenFromNavigation: false,
428
- },
429
- '/it/observatory/resource-catalogue-1': {
430
- hideChildrenFromNavigation: false,
431
- },
432
- '/pl/observatory/resource-catalogue-1': {
433
- hideChildrenFromNavigation: false,
434
- },
435
- '/en/observatory/publications-and-outreach': {
436
- hideChildrenFromNavigation: false,
437
- },
438
- '/de/observatory/publications-and-outreach': {
439
- hideChildrenFromNavigation: false,
440
- },
441
- '/fr/observatory/publications-and-outreach': {
442
- hideChildrenFromNavigation: false,
443
- },
444
- '/es/observatory/publications-and-outreach': {
445
- hideChildrenFromNavigation: false,
446
- },
447
- '/it/observatory/publications-and-outreach': {
448
- hideChildrenFromNavigation: false,
449
- },
450
- '/pl/observatory/publications-and-outreach': {
451
- hideChildrenFromNavigation: false,
452
- },
343
+ '/en/observatory/about': hideChildren,
344
+ '/de/observatory/about': hideChildren,
345
+ '/fr/observatory/about': hideChildren,
346
+ '/es/observatory/about': hideChildren,
347
+ '/it/observatory/about': hideChildren,
348
+ '/pl/observatory/about': hideChildren,
349
+ '/en/observatory/policy-context-1': hideChildren,
350
+ '/de/observatory/policy-context-1': hideChildren,
351
+ '/fr/observatory/policy-context-1': hideChildren,
352
+ '/es/observatory/policy-context-1': hideChildren,
353
+ '/it/observatory/policy-context-1': hideChildren,
354
+ '/pl/observatory/policy-context-1': hideChildren,
355
+ '/en/observatory/evidence-on-climate-and-health': hideChildren,
356
+ '/de/observatory/evidence-on-climate-and-health': hideChildren,
357
+ '/fr/observatory/evidence-on-climate-and-health': hideChildren,
358
+ '/es/observatory/evidence-on-climate-and-health': hideChildren,
359
+ '/it/observatory/evidence-on-climate-and-health': hideChildren,
360
+ '/pl/observatory/evidence-on-climate-and-health': hideChildren,
361
+ '/en/observatory/resource-catalogue-1': hideChildren,
362
+ '/de/observatory/resource-catalogue-1': hideChildren,
363
+ '/fr/observatory/resource-catalogue-1': hideChildren,
364
+ '/es/observatory/resource-catalogue-1': hideChildren,
365
+ '/it/observatory/resource-catalogue-1': hideChildren,
366
+ '/pl/observatory/resource-catalogue-1': hideChildren,
367
+ '/en/observatory/publications-and-outreach': hideChildren,
368
+ '/de/observatory/publications-and-outreach': hideChildren,
369
+ '/fr/observatory/publications-and-outreach': hideChildren,
370
+ '/es/observatory/publications-and-outreach': hideChildren,
371
+ '/it/observatory/publications-and-outreach': hideChildren,
372
+ '/pl/observatory/publications-and-outreach': hideChildren,
453
373
  };
454
374
 
455
375
  // Custom results
@@ -94,6 +94,12 @@ hr {
94
94
  display: flex;
95
95
  align-items: flex-start;
96
96
  word-break: break-all;
97
+
98
+ i.icon {
99
+ position: relative;
100
+ top: 4px;
101
+ margin-right: 5px;
102
+ }
97
103
  }
98
104
 
99
105
  .db-item-view {