Skip to content

Commit

Permalink
Merge pull request #372 from eea/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
kreafox authored Jan 14, 2025
2 parents b0d6fd1 + f7b2e30 commit 65e44b6
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 49 deletions.
15 changes: 7 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ 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).

### [0.2.94](https://github.com/eea/volto-cca-policy/compare/0.2.93...0.2.94) - 14 January 2025

#### :bug: Bug Fixes

- fix(listing): improve event listing view - refs #282708 [kreafox - [`b13a9f3`](https://github.com/eea/volto-cca-policy/commit/b13a9f3c9f8ba44ac7daf655d7f87744c52ebff6)]
- fix(listing): fix wrong URL in event listing view + code cleanup - refs #282708 [kreafox - [`f916165`](https://github.com/eea/volto-cca-policy/commit/f916165ae5d3110893216ef9d6e7882f3f07673d)]

### [0.2.93](https://github.com/eea/volto-cca-policy/compare/0.2.92...0.2.93) - 9 January 2025

#### :hammer_and_wrench: Others
Expand Down Expand Up @@ -1786,13 +1793,10 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Refs #260715 rast-block wip [Tripon Eugen - [`f19d54e`](https://github.com/eea/volto-cca-policy/commit/f19d54e0b9a6a86bf344eb85b6a1cda7f3de91bf)]
- Refs #260715 rast-block wip [Tripon Eugen - [`2828537`](https://github.com/eea/volto-cca-policy/commit/2828537b6c084cd1a82162d552fb4ef025b71f9f)]
- Refs #260715 rast-block updates [Tripon Eugen - [`1e803e5`](https://github.com/eea/volto-cca-policy/commit/1e803e5bd3d3fb7558f261c76c68866be7beb8b5)]
- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`0a15e1b`](https://github.com/eea/volto-cca-policy/commit/0a15e1b2ad081233685e80d5b3c60a8663f6b896)]
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`9554e44`](https://github.com/eea/volto-cca-policy/commit/9554e44c92a621a52b2adb5a4830fb084ee5734b)]
### [0.1.49](https://github.com/eea/volto-cca-policy/compare/0.1.48...0.1.49) - 15 November 2023

#### :house: Internal changes

- chore: [JENKINS] Refactor automated testing [valentinab25 - [`7b820a6`](https://github.com/eea/volto-cca-policy/commit/7b820a6369c2ddd5203b1a4abe352cb4bb43db7a)]
- chore: husky, lint-staged use fixed versions [valentinab25 - [`f0a8061`](https://github.com/eea/volto-cca-policy/commit/f0a8061c275c236deb00087c23fac9860a073106)]

#### :hammer_and_wrench: Others
Expand All @@ -1809,9 +1813,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Refs #259267 - jenkins test [Tripon Eugen - [`cacd31e`](https://github.com/eea/volto-cca-policy/commit/cacd31e7b1afe0983674ed5c7632d2e1d7fa752e)]
- Refs #259267 - jenkins [Tripon Eugen - [`5b3affe`](https://github.com/eea/volto-cca-policy/commit/5b3affee8401239de10097884c1b7f2349d15ec0)]
- Refs #259267 - add When, lead image and title to files [Tripon Eugen - [`2cedb23`](https://github.com/eea/volto-cca-policy/commit/2cedb237f898af9057e13fba94b615ef71077204)]
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`4d607a5`](https://github.com/eea/volto-cca-policy/commit/4d607a576e9d0a5c34e48c41b409e7df616ee3d6)]
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`b7f74d5`](https://github.com/eea/volto-cca-policy/commit/b7f74d53513a6edbfbca5cb6d19687929bb1e5db)]
- test: [JENKINS] Improve cypress time [valentinab25 - [`db65617`](https://github.com/eea/volto-cca-policy/commit/db656173391f65157098d95d388c25f6429753d8)]
- Refs #259267 - cca event blocks attachments and check not mandatoty fields [Tripon Eugen - [`3138e5a`](https://github.com/eea/volto-cca-policy/commit/3138e5afb5bfbdbed14e27ed457b16867b7fa414)]
- 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)]
- Refs #161485 - Fix ECDE name conflict. [GhitaB - [`8bfd99f`](https://github.com/eea/volto-cca-policy/commit/8bfd99ff68bb82a04d1c0ed625fa514fcf46289e)]
Expand Down Expand Up @@ -2028,7 +2029,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :house: Internal changes

- chore: [JENKINS] Remove alpha testing version [valentinab25 - [`ad1ced0`](https://github.com/eea/volto-cca-policy/commit/ad1ced0971ba116c13a3b5fcc039172cc915c919)]

#### :hammer_and_wrench: Others

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

- Refs #158294 - Update supported languages list. [GhitaB - [`0a4f91f`](https://github.com/eea/volto-cca-policy/commit/0a4f91f39b7edc367bd4c127d6a8f273c7788361)]
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`8f1f9ce`](https://github.com/eea/volto-cca-policy/commit/8f1f9ce6c22805670cc0800d3c779b6d619d0f31)]
### [0.1.1](https://github.com/eea/volto-cca-policy/compare/0.1.0...0.1.1) - 13 December 2022

#### :hammer_and_wrench: Others
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-cca-policy",
"version": "0.2.93",
"version": "0.2.94",
"description": "@eeacms/volto-cca-policy: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down
66 changes: 26 additions & 40 deletions src/components/manage/Blocks/Listing/EventCardsListingView.jsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { compose } from 'redux';
import cx from 'classnames';
import './styles.less';
import { ConditionalLink } from '@plone/volto/components';
import { Icon } from 'semantic-ui-react';
import { When } from '@plone/volto/components/theme/View/EventDatesInfo';
import { Card, Grid } from 'semantic-ui-react';
import { Label } from 'semantic-ui-react';
import { connect } from 'react-redux';
import { Card, Grid, Icon, Label } from 'semantic-ui-react';
import { useIntl, defineMessages, FormattedMessage } from 'react-intl';
import { ConditionalLink, UniversalLink } from '@plone/volto/components';
import { When } from '@plone/volto/components/theme/View/EventDatesInfo';
import './styles.less';

const Separator = () => {
return <div className="sep">&nbsp;&nbsp;⎯&nbsp;&nbsp;</div>;
Expand Down Expand Up @@ -37,6 +34,7 @@ const messages = defineMessages({
sa: { id: 'Sa', defaultMessage: 'Sa' },
su: { id: 'Su', defaultMessage: 'Su' },
});

const StartDate = (start) => {
const start_date = new Date(start);

Expand Down Expand Up @@ -87,27 +85,15 @@ const StartDate = (start) => {
};

const EventCardsListingView = ({ items, isEditMode, token }) => {
const go_to_contact = (contact_info) => {
if (contact_info.includes('@')) {
return `mailto:${contact_info}`;
}
return contact_info;
};
const goToContact = (contactInfo) =>
contactInfo.includes('@') ? `mailto:${contactInfo}` : contactInfo;

const event_url = (item) => {
if (!!item.event_url) {
return item.event_url;
}
return item.id;
};
const getEventUrl = (item) => item.event_url || item['@id'];

return (
<div className={cx('ui fluid eventCards')}>
<div className="ui fluid eventCards">
{items.map((item, index) => (
<div
className={cx('u-item listing-item simple-listing-item')}
key={item['@id']}
>
<div className="u-item listing-item simple-listing-item" key={item.UID}>
<div className="wrapper">
<Card fluid>
<Card.Content>
Expand All @@ -117,13 +103,13 @@ const EventCardsListingView = ({ items, isEditMode, token }) => {
</Grid.Column>
<Grid.Column width={10}>
<div className="event-details">
<h3 className={'listing-header'}>
<a href={event_url(item)}>
{item.title ? item.title : item.id}
</a>
<h3 className="listing-header">
<UniversalLink href={getEventUrl(item)}>
{item.title}
</UniversalLink>
</h3>
<div className="listing-body-dates">
{!!item.start && (
{!!item.start && (
<div className="listing-body-dates">
<span className="event-date">
<Icon className="ri-calendar-line" />
<When
Expand All @@ -133,18 +119,18 @@ const EventCardsListingView = ({ items, isEditMode, token }) => {
open_end={item.open_end}
/>
</span>
)}
</div>
<div className="listing-body-dates">
{!!item['location'] && (
</div>
)}
{!!item.location && (
<div className="listing-body-dates">
<span className="event-date">
<Icon className="map marker alternate" />
{item['location']}
{item.location}
</span>
)}
</div>
</div>
)}
{item.description && (
<p className={'listing-description'}>
<p className="listing-description">
{item.description}
</p>
)}
Expand Down Expand Up @@ -178,7 +164,7 @@ const EventCardsListingView = ({ items, isEditMode, token }) => {
<a
className="contact_email"
title=""
href={go_to_contact(item.contact_email)}
href={goToContact(item.contact_email)}
target="_blank"
rel="noreferrer"
>
Expand Down

0 comments on commit 65e44b6

Please sign in to comment.