Skip to content

Commit

Permalink
Merge pull request #141 from eea/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
avoinea authored Jun 6, 2023
2 parents 704f373 + 7544bc7 commit 0a43f14
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 57 deletions.
32 changes: 23 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,29 @@ 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.15.0](https://github.com/eea/volto-eea-website-theme/compare/1.14.1...1.15.0) - 2 June 2023

#### :rocket: New Features

- feat: can disable all actions from footer - refs #253198 [Teodor Voicu - [`ab52ee8`](https://github.com/eea/volto-eea-website-theme/commit/ab52ee818d4343add1ac641b1a7a2e1c76ce0946)]
- feat(blocks): add body class option in layout settings block #138 from eea/layout-body-class [ichim-david - [`4409d1c`](https://github.com/eea/volto-eea-website-theme/commit/4409d1c7416ad143eafe578d55c2c9ef70433879)]
- feat(blocks): add homepage class in layout settings block [kreafox - [`979ed1e`](https://github.com/eea/volto-eea-website-theme/commit/979ed1eae9253735ad20c4558c021a1a0ec267d6)]
- feat(blocks): add body class option in layout settings block [kreafox - [`d401bd6`](https://github.com/eea/volto-eea-website-theme/commit/d401bd6651481c9e5a1fe626724d80bf7d3babed)]

#### :nail_care: Enhancements

- change(title): use portal type_title instead @type refs151851 [nileshgulia1 - [`aa38e44`](https://github.com/eea/volto-eea-website-theme/commit/aa38e4444f12cab2f80647774b3e4933053fade6)]
- change(layout-block): removed css that hid the layout settings [David Ichim - [`1e26a94`](https://github.com/eea/volto-eea-website-theme/commit/1e26a94a01fcbc44f6e07c6fa60e5e43f9545788)]
- change(layout): removed most used from layout block [David Ichim - [`31c901d`](https://github.com/eea/volto-eea-website-theme/commit/31c901d75d509d011269dee4224e0bec6b12bfe4)]
- change(blocks): remove restriction in layout settings block [kreafox - [`c3b01f6`](https://github.com/eea/volto-eea-website-theme/commit/c3b01f60b84ccc8b4ae6446a2b607615a3546ceb)]

#### :house: Internal changes


#### :hammer_and_wrench: Others

- other: group restricted blocks in an array [Miu Razvan - [`b79680d`](https://github.com/eea/volto-eea-website-theme/commit/b79680dd4162a0ee316489d15c76eab274888f74)]
- Bump to 1.15.0 [kreafox - [`48aa9d8`](https://github.com/eea/volto-eea-website-theme/commit/48aa9d8e8dd45bd1ca0a1a63b579ed3db77e7463)]
### [1.14.1](https://github.com/eea/volto-eea-website-theme/compare/1.14.0...1.14.1) - 22 May 2023

#### :rocket: New Features
Expand Down Expand Up @@ -154,7 +177,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`6c5e2f8`](https://github.com/eea/volto-eea-website-theme/commit/6c5e2f80456e2061d9e9c15fd0a0b91b9ac70568)]
### [1.9.1](https://github.com/eea/volto-eea-website-theme/compare/1.9.0...1.9.1) - 28 February 2023

#### :bug: Bug Fixes
Expand Down Expand Up @@ -301,7 +323,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

- For some reasons types is a string [Alin Voinea - [`3769a09`](https://github.com/eea/volto-eea-website-theme/commit/3769a0981181d5b633f3498daebbe96be8b4b833)]
- Fix(redirect): o.filter - refs #157627 [Alin Voinea - [`deb23da`](https://github.com/eea/volto-eea-website-theme/commit/deb23da846444cc96539697fd798429ae0abe89e)]
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`f1fffc5`](https://github.com/eea/volto-eea-website-theme/commit/f1fffc5db96725440863d545580b4e76cce4b796)]
### [1.5.0](https://github.com/eea/volto-eea-website-theme/compare/1.4.2...1.5.0) - 9 January 2023

#### :hammer_and_wrench: Others
Expand Down Expand Up @@ -335,7 +356,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

- Release 1.4.0 [Alin Voinea - [`bd42a0d`](https://github.com/eea/volto-eea-website-theme/commit/bd42a0d26e928cac5d99933194755da3db06b341)]
- bump version to use as volto-eea-design-system [David Ichim - [`f4be047`](https://github.com/eea/volto-eea-website-theme/commit/f4be047328b46399b03b612d378b18aaf82e7dc1)]
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`9b7cfef`](https://github.com/eea/volto-eea-website-theme/commit/9b7cfefb4d34fc1c948015e491feb370f9795bd8)]
- test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`df252a9`](https://github.com/eea/volto-eea-website-theme/commit/df252a9bfed0bb86cadf53c59dd1603b1e2cd822)]
### [1.3.2](https://github.com/eea/volto-eea-website-theme/compare/1.3.1...1.3.2) - 16 December 2022

Expand All @@ -345,7 +365,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`a43c658`](https://github.com/eea/volto-eea-website-theme/commit/a43c658a7920c8df95e763b9a637f38ce77eba2c)]
- Better razzle.config [Tiberiu Ichim - [`81dbf48`](https://github.com/eea/volto-eea-website-theme/commit/81dbf48815fb27facb4f82c9b764540fdf188b2e)]
- Better razzle.config [Tiberiu Ichim - [`7bc9da2`](https://github.com/eea/volto-eea-website-theme/commit/7bc9da2cd837ab62a95cd29979cdd9b0055b7d67)]
### [1.3.1](https://github.com/eea/volto-eea-website-theme/compare/1.3.0...1.3.1) - 28 November 2022
Expand All @@ -356,7 +375,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- yarn 3 [Alin Voinea - [`ea7a709`](https://github.com/eea/volto-eea-website-theme/commit/ea7a7094945312776e9b6f44e371178603e92139)]
### [1.3.0](https://github.com/eea/volto-eea-website-theme/compare/1.2.0...1.3.0) - 22 November 2022

#### :rocket: New Features
Expand Down Expand Up @@ -397,7 +415,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Add subsite class to body [Tiberiu Ichim - [`74d700f`](https://github.com/eea/volto-eea-website-theme/commit/74d700fbfd6249a8604762a7e4e49cce857db0f3)]
- Add subsite info to header [Tiberiu Ichim - [`47daf8b`](https://github.com/eea/volto-eea-website-theme/commit/47daf8bb6374a1222040626b19d4154df7ba1b83)]
- fix eslint [Miu Razvan - [`eb8d0a7`](https://github.com/eea/volto-eea-website-theme/commit/eb8d0a790bc70c0aae256c6ff35f63c4885f338e)]
- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`cc578a4`](https://github.com/eea/volto-eea-website-theme/commit/cc578a413b205a8e61e091fab3a88f94cedefc89)]
### [1.1.0](https://github.com/eea/volto-eea-website-theme/compare/1.0.0...1.1.0) - 28 October 2022

#### :nail_care: Enhancements
Expand Down Expand Up @@ -445,7 +462,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`33b56ac`](https://github.com/eea/volto-eea-website-theme/commit/33b56acb13fbaf0c5b79e8fc6e13c4b699c79c90)]
### [0.7.3](https://github.com/eea/volto-eea-website-theme/compare/0.7.2...0.7.3) - 22 September 2022

#### :hammer_and_wrench: Others
Expand Down Expand Up @@ -713,7 +729,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Header refactor, add custom logo #5 [ichim-david - [`4950235`](https://github.com/eea/volto-eea-website-theme/commit/49502358105437cfeac3b144e6d301cb59aa2346)]
- Update footer.config with new publication card component [ichim-david - [`2e38e9a`](https://github.com/eea/volto-eea-website-theme/commit/2e38e9a417f835009d60c80d4eb4b30229f55e45)]
- feature(breadcrumbs): implement eea-design-system breadcrumb as Volto component #32 #7 [ichim-david - [`181af41`](https://github.com/eea/volto-eea-website-theme/commit/181af4125ce2b9ddac56dab4723cb11c26633221)]
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`da8ceb6`](https://github.com/eea/volto-eea-website-theme/commit/da8ceb68ea68bfbc9504e48ccd4d68277f11ab9a)]
- use breadcrumbs from eea-design-system [nileshgulia1 - [`db2f9e9`](https://github.com/eea/volto-eea-website-theme/commit/db2f9e9a4327420a3cce9a9903cd88549b129eab)]
- Update theme.config [ichim-david - [`8eca4f4`](https://github.com/eea/volto-eea-website-theme/commit/8eca4f40397a4aeca6d39029c92db78968d37064)]
- Added keyContent component to theme.config [ichim-david - [`d86f202`](https://github.com/eea/volto-eea-website-theme/commit/d86f202d0274d839487a88b51cae9a0e899beb23)]
Expand Down Expand Up @@ -755,5 +770,4 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- yarn bootstrap [Alin Voinea - [`6995e9e`](https://github.com/eea/volto-eea-website-theme/commit/6995e9e091f21fdbbdffa8a44fc0e2c626f6d46a)]
- Initial commit [Alin Voinea - [`6a9c03a`](https://github.com/eea/volto-eea-website-theme/commit/6a9c03a7cebe71ca87e82cf58c42904063e9d8d3)]
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pipeline {
environment {
GIT_NAME = "volto-eea-website-theme"
NAMESPACE = "@eeacms"
SONARQUBE_TAGS = "volto.eea.europa.eu,demo-www.eea.europa.eu,prod-www.eea.europa.eu,circularity.eea.europa.eu,climate-adapt.eea.europa.eu,climate-advisory-board.devel4cph.eea.europa.eu,climate-advisory-board.europa.eu,www.eea.europa.eu-en"
SONARQUBE_TAGS = "volto.eea.europa.eu,demo-www.eea.europa.eu,prod-www.eea.europa.eu,climate-adapt.eea.europa.eu,climate-advisory-board.devel4cph.eea.europa.eu,climate-advisory-board.europa.eu,www.eea.europa.eu-en"
DEPENDENCIES = ""
VOLTO = ""
}
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.14.1",
"version": "1.15.0",
"description": "@eeacms/volto-eea-website-theme: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import { EditSchema } from './schema';
import { BlockDataForm, SidebarPortal } from '@plone/volto/components';
import LayoutSettingsView from './LayoutSettingsView';
import './edit.less';

const LayoutSettingsEdit = (props) => {
const schema = EditSchema();
Expand Down
4 changes: 0 additions & 4 deletions src/components/manage/Blocks/LayoutSettings/edit.less

This file was deleted.

6 changes: 2 additions & 4 deletions src/components/manage/Blocks/LayoutSettings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ export default (config) => {
view: LayoutSettingsView,
edit: LayoutSettingsEdit,
schema: BlockSettingsSchema,
restricted: ({ properties }) => {
return !!properties['@type'];
},
mostUsed: true,
restricted: false,
mostUsed: false,
blockHasOwnFocusManagement: true,
sidebarTab: 1,
};
Expand Down
9 changes: 8 additions & 1 deletion src/components/manage/Blocks/LayoutSettings/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const EditSchema = () => {
{
id: 'default',
title: 'Default',
fields: ['layout_size'],
fields: ['layout_size', 'body_class'],
},
],
required: [],
Expand All @@ -26,6 +26,13 @@ export const EditSchema = () => {
actions: Object.keys(ALIGN_INFO_MAP),
actionsInfoMap: ALIGN_INFO_MAP,
},
body_class: {
title: 'Body class',
choices: [
['homepage', 'Homepage'],
['homepage-inverse', 'Homepage inverse'],
],
},
},
};
};
24 changes: 3 additions & 21 deletions src/components/theme/Banner/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ import { compose } from 'redux';
import { connect } from 'react-redux';
import { withRouter } from 'react-router';
import { defineMessages, injectIntl } from 'react-intl';
import { startCase } from 'lodash';
import qs from 'querystring';
import startCase from 'lodash/startCase';
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 {
Expand Down Expand Up @@ -62,7 +60,7 @@ const Title = ({ config = {}, properties }) => {
};

const View = (props) => {
const { banner = {}, intl, location, types = [] } = props;
const { banner = {}, intl } = props;
const metadata = props.metadata || props.properties;
const popupRef = useRef(null);
const {
Expand All @@ -81,11 +79,6 @@ const View = (props) => {
const copyrightPrefix =
config.blocks.blocksConfig.title.copyrightPrefix || '';

// Set query parameters
const parameters = useMemo(
() => qs.parse(location.search.replace('?', '')) || {},
[location],
);
// Set dates
const getDate = useCallback(
(hidden, key) => {
Expand All @@ -109,18 +102,7 @@ const View = (props) => {
// Set image source
const image = getImageSource(metadata['image']);
// Get type
const type = useMemo(() => {
return (
types?.filter?.(
(type) =>
flattenToAppURL(type['@id']) ===
`/@types/${metadata['@type'] || parameters.type}`,
)[0]?.title ||
friendlyId(metadata['@type']) ||
metadata['@type'] ||
parameters.type
);
}, [types, metadata, parameters]);
const type = metadata.type_title || friendlyId(metadata['@type']);

return (
<Banner {...props} image={image}>
Expand Down
9 changes: 5 additions & 4 deletions src/customizations/volto/components/theme/Footer/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { useSelector, shallowEqual } from 'react-redux';
import { flattenToAppURL } from '@plone/volto/helpers';
import EEAFooter from '@eeacms/volto-eea-design-system/ui/Footer/Footer';
import config from '@plone/volto/registry';
import isArray from 'lodash/isArray';

const Footer = () => {
const { eea } = config.settings;
Expand All @@ -28,15 +29,15 @@ const Footer = () => {
shallowEqual,
);
// ZMI > portal_actions > footer_actions
const actions = footerActions.length
const actions = isArray(footerActions)
? footerActions.map((action) => ({
title: action.title,
link: flattenToAppURL(action.url),
}))
: eea.footerOpts.actions;

// ZMI > portal_actions > copyright_actions
const copyright = copyrightActions.length
const copyright = isArray(copyrightActions)
? copyrightActions.map((action) => ({
title: action.title,
site: action.title,
Expand All @@ -45,7 +46,7 @@ const Footer = () => {
: eea.footerOpts.copyright;

// ZMI > portal_actions > social_actions
const social = socialActions.length
const social = isArray(socialActions)
? socialActions.map((action) => ({
name: action.id,
icon: action.icon,
Expand All @@ -54,7 +55,7 @@ const Footer = () => {
: eea.footerOpts.social;

// ZMI > portal_actions > contact_actions
const contacts = contactActions.length
const contacts = isArray(contactActions)
? contactActions.map((action, idx) => ({
text: action.title,
icon: action.icon,
Expand Down
24 changes: 13 additions & 11 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ import voltoCustomMiddleware from './middleware/voltoCustom';
import okMiddleware from './middleware/ok';
import installSlate from './slate';

const restrictedBlocks = [
'__grid', // Grid/Teaser block (kitconcept)
'imagesGrid',
'teaser',
];

const applyConfig = (config) => {
// EEA specific settings
config.settings.eea = {
Expand All @@ -34,6 +40,13 @@ const applyConfig = (config) => {
// Disable tags on View
config.settings.showTags = false;

// Disable some blocks
restrictedBlocks.forEach((block) => {
if (config.blocks.blocksConfig[block]) {
config.blocks.blocksConfig[block].restricted = true;
}
});

// Enable Title block
config.blocks.blocksConfig.title.restricted = false;

Expand Down Expand Up @@ -206,17 +219,6 @@ const applyConfig = (config) => {
},
];

// Grid/Teaser block (kitconcept)
if (config.blocks.blocksConfig.__grid) {
config.blocks.blocksConfig.__grid.restricted = true;
}
if (config.blocks.blocksConfig.imagesGrid) {
config.blocks.blocksConfig.imagesGrid.restricted = true;
}
if (config.blocks.blocksConfig.teaser) {
config.blocks.blocksConfig.teaser.restricted = true;
}

// layout settings
config = [installLayoutSettingsBlock].reduce(
(acc, apply) => apply(acc),
Expand Down

0 comments on commit 0a43f14

Please sign in to comment.