Skip to content

Commit

Permalink
Merge pull request #57 from eea/develop
Browse files Browse the repository at this point in the history
chore: set DataProvenace based on behavior
  • Loading branch information
avoinea authored Jul 29, 2023
2 parents aa37b1c + becff35 commit faf0586
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 12 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

### [1.7.2](https://github.com/eea/volto-eea-website-policy/compare/1.7.1...1.7.2) - 28 July 2023

#### :house: Internal changes

- chore: set DataProvenace based on behavior [Miu Razvan - [`b4623f0`](https://github.com/eea/volto-eea-website-policy/commit/b4623f066a2212ec60725dc16326eae9f0170a3b)]

### [1.7.1](https://github.com/eea/volto-eea-website-policy/compare/1.7.0...1.7.1) - 24 July 2023

#### :rocket: New Features
Expand Down
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eeacms/volto-eea-website-policy",
"version": "1.7.1",
"version": "1.7.2",
"description": "@eeacms/volto-eea-website-policy: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand All @@ -16,7 +16,12 @@
"type": "git",
"url": "[email protected]:eea/volto-eea-website-policy.git"
},
"addons": [],
"addons": [
"@eeacms/volto-widget-dataprovenance"
],
"dependencies": {
"@eeacms/volto-widget-dataprovenance": "*"
},
"devDependencies": {
"@cypress/code-coverage": "^3.10.0",
"@plone/scripts": "*",
Expand Down
16 changes: 11 additions & 5 deletions src/components/Widgets/DataProvenance.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
// import React from 'react';
// import RichTextWidget from '@plone/volto-slate/widgets/RichTextWidget';
import RichTextWidget from '@plone/volto-slate/widgets/RichTextWidget';
import { DataProvenance as NextDataProvenance } from '@eeacms/volto-widget-dataprovenance/components/theme/Widgets/DataProvenance';

export const DataProvenance = () =>
// <RichTextWidget {...props} readOnly={true} />
' Data Provenance ';
export const DataProvenance = (props) => {
if (props.behavior === 'eea.coremetadata.behavior') {
return <NextDataProvenance {...props} />;
}
if (props.behavior === 'eea.dexterity.indicators.metadata') {
return <RichTextWidget {...props} />;
}
return ' Data Provenance ';
};
9 changes: 4 additions & 5 deletions src/components/Widgets/InstitutionalMandate.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// import React from 'react';
// import RichTextWidget from '@plone/volto-slate/widgets/RichTextWidget';
import RichTextWidget from '@plone/volto-slate/widgets/RichTextWidget';

export const InstitutionalMandate = () =>
// <RichTextWidget {...props} readOnly={true} />
' Institutional Mandate ';
export const InstitutionalMandate = (props) => {
return <RichTextWidget {...props} readOnly={true} />;
};

0 comments on commit faf0586

Please sign in to comment.