@eeacms/volto-cca-policy 0.3.105 → 0.3.106
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,15 @@ 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.3.106](https://github.com/eea/volto-cca-policy/compare/0.3.105...0.3.106) - 20 March 2026
|
|
8
|
+
|
|
9
|
+
#### :rocket: New Features
|
|
10
|
+
|
|
11
|
+
- feat(teaser): preserve query strings in CardTitle.jsx [kreafox - [`a0b70ea`](https://github.com/eea/volto-cca-policy/commit/a0b70ea9055a8b1d3a6d7c93aedad6e5b36bf3a1)]
|
|
12
|
+
|
|
13
|
+
#### :hammer_and_wrench: Others
|
|
14
|
+
|
|
15
|
+
- core: add CardTitle.jsx for customization [kreafox - [`c6b34db`](https://github.com/eea/volto-cca-policy/commit/c6b34db474de98f5a04e4d69a5b754c508c85b2d)]
|
|
7
16
|
### [0.3.105](https://github.com/eea/volto-cca-policy/compare/0.3.104...0.3.105) - 19 March 2026
|
|
8
17
|
|
|
9
18
|
#### :rocket: New Features
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Customized SimpleItemTemplates.jsx to preserve query strings. (refs #299560)
|
|
1
|
+
Customized SimpleItemTemplates.jsx and CardTitle.jsx to preserve query strings. (refs #299560)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Card as UiCard } from 'semantic-ui-react';
|
|
3
|
+
import { ConditionalLink } from '@plone/volto/components';
|
|
4
|
+
|
|
5
|
+
const getItemHref = (item) =>
|
|
6
|
+
item?.linkHref || item?.linkWithHash || item?.['@id'];
|
|
7
|
+
|
|
8
|
+
const CardTitle = (props) => {
|
|
9
|
+
const { item, isEditMode, itemModel } = props;
|
|
10
|
+
const { title, Title } = item;
|
|
11
|
+
const t = title || Title;
|
|
12
|
+
|
|
13
|
+
const href = getItemHref(item);
|
|
14
|
+
|
|
15
|
+
return t && !itemModel?.titleOnImage ? (
|
|
16
|
+
<UiCard.Header>
|
|
17
|
+
<ConditionalLink
|
|
18
|
+
className="header-link"
|
|
19
|
+
to={href}
|
|
20
|
+
condition={!isEditMode && itemModel?.hasLink && !!href}
|
|
21
|
+
>
|
|
22
|
+
{t}
|
|
23
|
+
</ConditionalLink>
|
|
24
|
+
</UiCard.Header>
|
|
25
|
+
) : null;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default CardTitle;
|