@eeacms/volto-cca-policy 0.1.87 → 0.1.88

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,6 +4,16 @@ 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.88](https://github.com/eea/volto-cca-policy/compare/0.1.87...0.1.88) - 1 March 2024
8
+
9
+ #### :bug: Bug Fixes
10
+
11
+ - fix(views): remove unused import [kreafox - [`b90c40c`](https://github.com/eea/volto-cca-policy/commit/b90c40c8d15d79ad670794710b6a7a1274657cb7)]
12
+ - fix(views): show missing metadata on DB items [kreafox - [`6ed7638`](https://github.com/eea/volto-cca-policy/commit/6ed763854172398446d6c5f4dc1d34ea516df7ef)]
13
+
14
+ #### :hammer_and_wrench: Others
15
+
16
+ - test: update [kreafox - [`3bb98b1`](https://github.com/eea/volto-cca-policy/commit/3bb98b1f36d92eea76fa46af56ecfbf9a2d5201e)]
7
17
  ### [0.1.87](https://github.com/eea/volto-cca-policy/compare/0.1.86...0.1.87) - 1 March 2024
8
18
 
9
19
  #### :bug: Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.1.87",
3
+ "version": "0.1.88",
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",
@@ -7,7 +7,7 @@ import {
7
7
  ShareInfo,
8
8
  BannerTitle,
9
9
  } from '@eeacms/volto-cca-policy/helpers';
10
- import { Segment, Divider } from 'semantic-ui-react';
10
+ import { Segment, Divider, Image } from 'semantic-ui-react';
11
11
  import { UniversalLink } from '@plone/volto/components';
12
12
  import cx from 'classnames';
13
13
 
@@ -109,6 +109,7 @@ function AdaptationOptionView(props) {
109
109
  websites,
110
110
  source,
111
111
  ipcc_category,
112
+ logo,
112
113
  } = content;
113
114
 
114
115
  const usedSections = dataDisplay.filter((data) =>
@@ -120,6 +121,13 @@ function AdaptationOptionView(props) {
120
121
  <BannerTitle content={content} type="Adaptation Option" />
121
122
 
122
123
  <div className="ui container">
124
+ {logo && (
125
+ <Image
126
+ src={logo?.scales?.mini?.download}
127
+ alt={content.title}
128
+ className="db-logo"
129
+ />
130
+ )}
123
131
  <HTMLField value={long_description} />
124
132
  <SectionsMenu sections={usedSections} />
125
133
  <Divider />
@@ -31,7 +31,7 @@ function CcaEventView(props) {
31
31
 
32
32
  return (
33
33
  <div className="cca-event-view">
34
- <BannerTitle content={content} type="CCA Event" />
34
+ <BannerTitle content={content} />
35
35
 
36
36
  <div className="ui container">
37
37
  <Grid columns="12">
@@ -11,7 +11,7 @@ function CcaEventView(props) {
11
11
 
12
12
  return (
13
13
  <div className="cca-event-view">
14
- <BannerTitle content={content} type="Event" />
14
+ <BannerTitle content={content} />
15
15
 
16
16
  <div className="ui container">
17
17
  <Grid columns="12">
@@ -8,7 +8,7 @@ import {
8
8
  BannerTitle,
9
9
  DocumentsList,
10
10
  } from '@eeacms/volto-cca-policy/helpers';
11
- import { Segment, Divider } from 'semantic-ui-react';
11
+ import { Segment, Divider, Image } from 'semantic-ui-react';
12
12
 
13
13
  const ContributorsList = (props) => {
14
14
  const { content } = props;
@@ -32,12 +32,19 @@ const ContributorsList = (props) => {
32
32
 
33
33
  function GuidanceView(props) {
34
34
  const { content } = props;
35
- const { long_description, websites, source, cca_files } = content;
35
+ const { long_description, websites, source, cca_files, logo } = content;
36
36
 
37
37
  return (
38
38
  <div className="db-item-view guidance-view">
39
39
  <BannerTitle content={content} type="Guidance Document" />
40
40
  <div className="ui container">
41
+ {logo && (
42
+ <Image
43
+ src={logo?.scales?.mini?.download}
44
+ alt={content.title}
45
+ className="db-logo"
46
+ />
47
+ )}
41
48
  <h2>Description</h2>
42
49
  <HTMLField value={long_description} />
43
50
  <Divider />
@@ -7,7 +7,7 @@ import {
7
7
  ShareInfo,
8
8
  BannerTitle,
9
9
  } from '@eeacms/volto-cca-policy/helpers';
10
- import { Segment, Divider } from 'semantic-ui-react';
10
+ import { Segment, Divider, Image } from 'semantic-ui-react';
11
11
 
12
12
  function IndicatorView(props) {
13
13
  const { content } = props;
@@ -17,13 +17,21 @@ function IndicatorView(props) {
17
17
  source,
18
18
  contributor_list,
19
19
  other_contributor,
20
+ logo,
20
21
  } = content;
21
22
 
22
23
  return (
23
24
  <div className="db-item-view indicator-view">
24
- <BannerTitle content={content} type="Indicator" />
25
+ <BannerTitle content={{ ...content, image: '' }} type="Indicator" />
25
26
 
26
27
  <div className="ui container">
28
+ {logo && (
29
+ <Image
30
+ src={logo?.scales?.mini?.download}
31
+ alt={content.title}
32
+ className="db-logo"
33
+ />
34
+ )}
27
35
  <h2>Description</h2>
28
36
  <HTMLField value={long_description} />
29
37
  <Divider />
@@ -7,17 +7,24 @@ import {
7
7
  ShareInfo,
8
8
  BannerTitle,
9
9
  } from '@eeacms/volto-cca-policy/helpers';
10
- import { Segment } from 'semantic-ui-react';
10
+ import { Segment, Image } from 'semantic-ui-react';
11
11
 
12
12
  function InformationPortalView(props) {
13
13
  const { content } = props;
14
- const { long_description, websites, source } = content;
14
+ const { long_description, websites, source, logo } = content;
15
15
 
16
16
  return (
17
17
  <div className="db-item-view information-portal-view">
18
18
  <BannerTitle content={content} type="Information Portal" />
19
19
 
20
20
  <div className="ui container">
21
+ {logo && (
22
+ <Image
23
+ src={logo?.scales?.mini?.download}
24
+ alt={content.title}
25
+ className="db-logo"
26
+ />
27
+ )}
21
28
  <h2>Description</h2>
22
29
  <HTMLField value={long_description} />
23
30
 
@@ -9,7 +9,6 @@ import {
9
9
  BannerTitle,
10
10
  } from '@eeacms/volto-cca-policy/helpers';
11
11
  import { Segment, Divider, Image } from 'semantic-ui-react';
12
- import cx from 'classnames';
13
12
 
14
13
  function OrganisationView(props) {
15
14
  const { content } = props;
@@ -33,15 +32,14 @@ function OrganisationView(props) {
33
32
 
34
33
  <div className="ui container">
35
34
  <div>
36
- <div className={cx({ 'has-logo': logo })}>
37
- <h2>Description</h2>
38
-
35
+ {logo && (
39
36
  <Image
40
37
  src={logo?.scales?.mini?.download}
41
38
  alt={content.title}
42
- className="org-logo"
39
+ className="db-logo"
43
40
  />
44
- </div>
41
+ )}
42
+ <h2>Description</h2>
45
43
 
46
44
  <HTMLField value={long_description} />
47
45
  <Divider />
@@ -6,7 +6,7 @@ import {
6
6
  PublishedModifiedInfo,
7
7
  ShareInfo,
8
8
  } from '@eeacms/volto-cca-policy/helpers';
9
- import { Divider, Segment } from 'semantic-ui-react';
9
+ import { Divider, Segment, Image } from 'semantic-ui-react';
10
10
 
11
11
  import config from '@plone/volto/registry';
12
12
 
@@ -20,6 +20,7 @@ function ProjectView(props) {
20
20
  acronym,
21
21
  title,
22
22
  websites,
23
+ logo,
23
24
  } = content;
24
25
 
25
26
  const {
@@ -49,6 +50,13 @@ function ProjectView(props) {
49
50
  />
50
51
 
51
52
  <div className="ui container">
53
+ {logo && (
54
+ <Image
55
+ src={logo?.scales?.mini?.download}
56
+ alt={content.title}
57
+ className="db-logo"
58
+ />
59
+ )}
52
60
  <h2>Description</h2>
53
61
  <HTMLField value={long_description} />
54
62
 
@@ -7,17 +7,25 @@ import {
7
7
  ReferenceInfo,
8
8
  BannerTitle,
9
9
  } from '@eeacms/volto-cca-policy/helpers';
10
- import { Segment } from 'semantic-ui-react';
10
+ import { Segment, Image } from 'semantic-ui-react';
11
11
 
12
12
  function PublicationReportView(props) {
13
13
  const { content } = props;
14
- const { cca_files } = content;
14
+ const { cca_files, logo } = content;
15
15
 
16
16
  return (
17
17
  <div className="db-item-view publication-report-view">
18
18
  <BannerTitle content={content} type="Publications and Report" />
19
19
 
20
20
  <div className="ui container">
21
+ {logo && (
22
+ <Image
23
+ src={logo?.scales?.mini?.download}
24
+ alt={content.title}
25
+ className="db-logo"
26
+ />
27
+ )}
28
+
21
29
  <ReferenceInfo content={content} />
22
30
  <PublishedModifiedInfo {...props} />
23
31
  <ShareInfo {...props} />
@@ -5,16 +5,23 @@ import {
5
5
  ReferenceInfo,
6
6
  BannerTitle,
7
7
  } from '@eeacms/volto-cca-policy/helpers';
8
- import { Segment } from 'semantic-ui-react';
8
+ import { Segment, Image } from 'semantic-ui-react';
9
9
 
10
10
  function ToolView(props) {
11
- const { content } = props;
11
+ const { content, logo } = props;
12
12
 
13
13
  return (
14
14
  <div className="db-item-view tool-view">
15
15
  <BannerTitle content={content} type="Tools" />
16
16
 
17
17
  <div className="ui container">
18
+ {logo && (
19
+ <Image
20
+ src={logo?.scales?.mini?.download}
21
+ alt={content.title}
22
+ className="db-logo"
23
+ />
24
+ )}
18
25
  <ReferenceInfo content={content} />
19
26
  <PublishedModifiedInfo {...props} />
20
27
 
@@ -7,7 +7,7 @@ import {
7
7
  ShareInfo,
8
8
  BannerTitle,
9
9
  } from '@eeacms/volto-cca-policy/helpers';
10
- import { Divider, Segment } from 'semantic-ui-react';
10
+ import { Divider, Segment, Image } from 'semantic-ui-react';
11
11
 
12
12
  function VideoView(props) {
13
13
  const { content } = props;
@@ -19,6 +19,7 @@ function VideoView(props) {
19
19
  long_description,
20
20
  other_contributor,
21
21
  related_documents_presentations,
22
+ logo,
22
23
  } = content;
23
24
 
24
25
  const share_eea = ['https://cmshare.eea.eu', 'shareit.eea.europa.eu'];
@@ -39,6 +40,14 @@ function VideoView(props) {
39
40
  <BannerTitle content={content} type="Video" />
40
41
 
41
42
  <div className="ui container">
43
+ {logo && (
44
+ <Image
45
+ src={logo?.scales?.mini?.download}
46
+ alt={content.title}
47
+ className="db-logo"
48
+ />
49
+ )}
50
+
42
51
  {is_cmshare_video && (
43
52
  <div className="video-wrapper">
44
53
  <center>
@@ -112,20 +112,12 @@ hr {
112
112
  }
113
113
  }
114
114
 
115
- .db-item-view.organisation-view {
116
- .has-logo {
117
- display: flex;
118
- align-items: flex-start;
119
- justify-content: space-between;
120
- }
121
-
122
- .org-logo {
123
- max-width: 150px;
115
+ .db-item-view {
116
+ .db-logo {
117
+ max-width: 150px !important;
124
118
  margin-bottom: 1em;
125
119
  }
126
- }
127
120
 
128
- .db-item-view {
129
121
  .ui.divider {
130
122
  margin: 2em 0;
131
123
  }