Skip to content

Commit

Permalink
Merge pull request #128 from eea/develop
Browse files Browse the repository at this point in the history
Release: copyright prefix - refs #250724
  • Loading branch information
avoinea authored Mar 27, 2023
2 parents f0e474e + 1ea1883 commit db7605f
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 1 deletion.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ 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.13.0](https://github.com/eea/volto-eea-website-theme/compare/1.12.0...1.13.0) - 27 March 2023

#### :rocket: New Features

- feat(Title): Possibility to add arbitrary copyright prefix - refs #250724 [Alin Voinea - [`9249bad`](https://github.com/eea/volto-eea-website-theme/commit/9249bad0a588206cb97c13ffb08a9b4fd4fc548f)]

#### :hammer_and_wrench: Others

- Release 1.13.0 [Alin Voinea - [`9e06d22`](https://github.com/eea/volto-eea-website-theme/commit/9e06d2253d08fe9ccec6cadd71b828f1558398f5)]
### [1.12.0](https://github.com/eea/volto-eea-website-theme/compare/1.11.3...1.12.0) - 24 March 2023

#### :nail_care: Enhancements
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eeacms/volto-eea-website-theme",
"version": "1.12.0",
"version": "1.13.0",
"description": "@eeacms/volto-eea-website-theme: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down
1 change: 1 addition & 0 deletions src/components/manage/Blocks/Title/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default (config) => {
...config.blocks.blocksConfig.title,
edit: Edit,
view: View,
copyrightPrefix: 'Image',
sidebarTab: 1,
};

Expand Down
5 changes: 5 additions & 0 deletions src/components/theme/Banner/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import qs from 'querystring';
import { Icon } from 'semantic-ui-react';
import Popup from '@eeacms/volto-eea-design-system/ui/Popup/Popup';
import { flattenToAppURL } from '@plone/volto/helpers';
import config from '@plone/volto/registry';
import Banner from '@eeacms/volto-eea-design-system/ui/Banner/Banner';
import {
getImageSource,
Expand Down Expand Up @@ -77,6 +78,9 @@ const View = (props) => {
copyrightPosition,
// contentType,
} = props.data;
const copyrightPrefix =
config.blocks.blocksConfig.title.copyrightPrefix || '';

// Set query parameters
const parameters = useMemo(
() => qs.parse(location.search.replace('?', '')) || {},
Expand Down Expand Up @@ -213,6 +217,7 @@ const View = (props) => {
</Banner.Metadata>
{copyright ? (
<Copyright copyrightPosition={copyrightPosition}>
<Copyright.Prefix>{copyrightPrefix}</Copyright.Prefix>
<Copyright.Icon>
<Icon className={copyrightIcon} />
</Copyright.Icon>
Expand Down
5 changes: 5 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ const applyConfig = (config) => {
config.blocks.blocksConfig.description.className =
'documentDescription eea callout';

// Hero block copyright prefix
if (config.blocks.blocksConfig.hero) {
config.blocks.blocksConfig.hero.copyrightPrefix = 'Image';
}

// Custom TokenWidget
if (config.widgets.views) {
config.widgets.views.id.subjects = TokenWidget;
Expand Down

0 comments on commit db7605f

Please sign in to comment.