design-comuni-plone-theme 8.2.1 → 8.3.1

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.
Files changed (29) hide show
  1. package/.github/workflows/develop.yml +15 -13
  2. package/.github/workflows/main.yml +1 -1
  3. package/.github/workflows/prs.yml +1 -1
  4. package/CHANGELOG.md +45 -0
  5. package/Makefile +1 -1
  6. package/package.json +1 -1
  7. package/publiccode.yml +2 -2
  8. package/src/components/ItaliaTheme/Blocks/Listing/CardWithImageTemplate.jsx +1 -1
  9. package/src/components/ItaliaTheme/Blocks/Listing/CompleteBlockLinksTemplate.jsx +18 -0
  10. package/src/components/ItaliaTheme/Blocks/Listing/InEvidenceTemplate.jsx +1 -1
  11. package/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx +1 -0
  12. package/src/components/ItaliaTheme/Cards/CardPersona.jsx +6 -4
  13. package/src/components/ItaliaTheme/Cards/CardPersona.test.jsx +1 -0
  14. package/src/components/ItaliaTheme/View/Commons/OfficeCard.jsx +2 -2
  15. package/src/components/ItaliaTheme/View/DocumentoView/DocumentoAutori.jsx +0 -2
  16. package/src/components/ItaliaTheme/View/UOView/UOPeople.jsx +1 -2
  17. package/src/components/ItaliaTheme/View/UOView/UOStructure.jsx +0 -1
  18. package/src/customizations/volto/components/manage/Blocks/Listing/ListingBody.jsx +1 -1
  19. package/src/customizations/volto/components/manage/Blocks/Listing/withQuerystringResults.jsx +23 -15
  20. package/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx +0 -1
  21. package/src/customizations/volto/components/theme/NotFound/NotFound.jsx +77 -0
  22. package/src/customizations/volto/components/theme/View/EventDatesInfo.jsx +1 -1
  23. package/src/helpers/ListingHelper.js +6 -2
  24. package/src/theme/ItaliaTheme/Addons/volto-gdpr-privacy.scss +2 -1
  25. package/src/theme/ItaliaTheme/Blocks/_completeBlockLinkstemplate.scss +6 -0
  26. package/src/theme/ItaliaTheme/Components/_cardPersona.scss +24 -47
  27. package/src/theme/ItaliaTheme/Views/_slider.scss +3 -0
  28. package/src/theme/ItaliaTheme/_common.scss +4 -0
  29. package/src/theme/_cms-ui.scss +6 -1
@@ -31,17 +31,19 @@ jobs:
31
31
  build-args: |
32
32
  ADDON_NAME=design-comuni-plone-theme
33
33
  ADDON_PATH=design-comuni-plone-theme
34
- VOLTO_VERSION=17.0.0-alpha.17
34
+ VOLTO_VERSION=17.0.0-alpha.19
35
35
 
36
- - name: Deploy to rancher
37
- uses: redturtle/rancher-deploy-action@v0.2.0
38
- with:
39
- host: ${{ secrets.RANCHER_HOST }}
40
- api-username: ${{ secrets.RANCHER_API_USERNAME }}
41
- api-password: ${{ secrets.RANCHER_API_PASSWORD }}
42
- cluster-id: ${{ secrets.RANCHER_CLUSTER_ID }}
43
- project-id: ${{ secrets.RANCHER_PROJECT_ID }}
44
- namespace: ${{ secrets.RANCHER_NAMESPACE_DEVELOP }}
45
- workload: ${{ secrets.RANCHER_WORKLOAD_DEVELOP }}
46
- image: redturtletech/io-comune-base:develop
47
- slack-hook-url: ${{ secrets.RANCHER_SLACK_HOOK_URL }}
36
+ # deploy disabled. see https://gitlab.com/redturtle/io-comune/io-comune-demo-theme
37
+ #
38
+ # - name: Deploy to rancher
39
+ # uses: redturtle/rancher-deploy-action@v0.2.0
40
+ # with:
41
+ # host: ${{ secrets.RANCHER_HOST }}
42
+ # api-username: ${{ secrets.RANCHER_API_USERNAME }}
43
+ # api-password: ${{ secrets.RANCHER_API_PASSWORD }}
44
+ # cluster-id: ${{ secrets.RANCHER_CLUSTER_ID }}
45
+ # project-id: ${{ secrets.RANCHER_PROJECT_ID }}
46
+ # namespace: ${{ secrets.RANCHER_NAMESPACE_DEVELOP }}
47
+ # workload: ${{ secrets.RANCHER_WORKLOAD_DEVELOP }}
48
+ # image: redturtletech/io-comune-base:develop
49
+ # slack-hook-url: ${{ secrets.RANCHER_SLACK_HOOK_URL }}
@@ -35,4 +35,4 @@ jobs:
35
35
  build-args: |
36
36
  ADDON_NAME=design-comuni-plone-theme
37
37
  ADDON_PATH=design-comuni-plone-theme
38
- VOLTO_VERSION=17.0.0-alpha.17
38
+ VOLTO_VERSION=17.0.0-alpha.19
@@ -34,4 +34,4 @@ jobs:
34
34
  build-args: |
35
35
  ADDON_NAME=design-comuni-plone-theme
36
36
  ADDON_PATH=design-comuni-plone-theme
37
- VOLTO_VERSION=17.0.0-alpha.17
37
+ VOLTO_VERSION=17.0.0-alpha.19
package/CHANGELOG.md CHANGED
@@ -1,5 +1,50 @@
1
1
 
2
2
 
3
+ ## [8.3.1](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v8.3.0...v8.3.1) (2023-08-10)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * card persona images now have fixed size ([#275](https://github.com/RedTurtle/design-comuni-plone-theme/issues/275)) ([cfbdbc8](https://github.com/RedTurtle/design-comuni-plone-theme/commit/cfbdbc8c458036864dd5c6c02fa35e85fc87fc63))
9
+ * event card in listing breaking with invalid dates ([94aa154](https://github.com/RedTurtle/design-comuni-plone-theme/commit/94aa154e02f1a48f2afb9757d43767fea5c1f01a))
10
+ * event dates in cards when recurrence is entirely in the past ([#277](https://github.com/RedTurtle/design-comuni-plone-theme/issues/277)) ([5c45415](https://github.com/RedTurtle/design-comuni-plone-theme/commit/5c4541529e276693a7d145d99dfbd6a291a52796))
11
+ * focus on cookie banner toggles ([#282](https://github.com/RedTurtle/design-comuni-plone-theme/issues/282)) ([ccc3c73](https://github.com/RedTurtle/design-comuni-plone-theme/commit/ccc3c7324263058916cbe053131be6ae1add7ea0))
12
+ * querystring results when block ids are the same on different pages ([#278](https://github.com/RedTurtle/design-comuni-plone-theme/issues/278)) ([71db4d3](https://github.com/RedTurtle/design-comuni-plone-theme/commit/71db4d30b2ac0faa0dbe1e06302ceb20b81f5b1c))
13
+ * restored full-width class to listing block ([#280](https://github.com/RedTurtle/design-comuni-plone-theme/issues/280)) ([d19c08a](https://github.com/RedTurtle/design-comuni-plone-theme/commit/d19c08a29cefe3b4a482e3b2546e71f3c4bf0604))
14
+ * wrong layout for external link indicator icon if objects are Plone Links in anonimous view ([#270](https://github.com/RedTurtle/design-comuni-plone-theme/issues/270)) ([4bbb741](https://github.com/RedTurtle/design-comuni-plone-theme/commit/4bbb74110659144e4f398e54b10b9c66b2c41f7a))
15
+
16
+
17
+ ### Maintenance
18
+
19
+ * deploy to rancher disabled ([d924ef1](https://github.com/RedTurtle/design-comuni-plone-theme/commit/d924ef133380d2e7b890483bf0c519ecf4c07a78))
20
+
21
+
22
+ ### Documentation
23
+
24
+ * updated publiccode ([c8769d2](https://github.com/RedTurtle/design-comuni-plone-theme/commit/c8769d20088300e59b1d0fef70319b4416ef4a97))
25
+
26
+ ## [8.3.0](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v8.2.1...v8.3.0) (2023-08-04)
27
+
28
+
29
+ ### Features
30
+
31
+ * coherent description in card persona everywhere ([#273](https://github.com/RedTurtle/design-comuni-plone-theme/issues/273)) ([137fdd5](https://github.com/RedTurtle/design-comuni-plone-theme/commit/137fdd5a17d36ccb67c736467761d645f446d116))
32
+ * rimosso link a form contatto, aggiunto link a motore di ricerca del sito ([#269](https://github.com/RedTurtle/design-comuni-plone-theme/issues/269)) ([6793855](https://github.com/RedTurtle/design-comuni-plone-theme/commit/67938552ba8829c383757d8415c24861ce729b88))
33
+ * upgrade to volto alpha.19 ([02e3096](https://github.com/RedTurtle/design-comuni-plone-theme/commit/02e3096c61331cb5137003c2782fa07aaed23c32))
34
+
35
+
36
+ ### Bug Fixes
37
+
38
+ * equal height for card persona in uo people ([#276](https://github.com/RedTurtle/design-comuni-plone-theme/issues/276)) ([3a5e8d1](https://github.com/RedTurtle/design-comuni-plone-theme/commit/3a5e8d1672b5700e3d1097f43588ecff86efaff1))
39
+ * height of accessibility icon for external links ([#268](https://github.com/RedTurtle/design-comuni-plone-theme/issues/268)) ([8714eb2](https://github.com/RedTurtle/design-comuni-plone-theme/commit/8714eb29ad7a05b6f40058dfdf315e046dff00ef))
40
+ * optional chaining for pdc data in OfficeCard ([#274](https://github.com/RedTurtle/design-comuni-plone-theme/issues/274)) ([88ec896](https://github.com/RedTurtle/design-comuni-plone-theme/commit/88ec896ae9cbbc357ccb8d7a69977562aef3ab1a))
41
+ * z-index moved to a generic block ([#265](https://github.com/RedTurtle/design-comuni-plone-theme/issues/265)) ([c0d729c](https://github.com/RedTurtle/design-comuni-plone-theme/commit/c0d729ceaf50021f5752bfbb961124c3e03e7133))
42
+
43
+
44
+ ### Documentation
45
+
46
+ * updated publiccode ([6329a9b](https://github.com/RedTurtle/design-comuni-plone-theme/commit/6329a9b3f47cc43d4958155db52529ce25f16807))
47
+
3
48
  ## [8.2.1](https://github.com/redturtle/design-comuni-plone-theme/compare/v8.2.0...v8.2.1) (2023-07-27)
4
49
 
5
50
 
package/Makefile CHANGED
@@ -27,7 +27,7 @@ CURRENT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
27
27
  # ADDON ?= "design-comuni-plone-theme"
28
28
 
29
29
  PLONE_VERSION=6
30
- VOLTO_VERSION=17.0.0-alpha.17
30
+ VOLTO_VERSION=17.0.0-alpha.19
31
31
 
32
32
  ADDON_NAME='design-comuni-plone-theme'
33
33
  ADDON_PATH='design-comuni-plone-theme'
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "design-comuni-plone-theme",
3
3
  "description": "Volto Theme for Italia design guidelines",
4
4
  "license": "GPL-v3",
5
- "version": "8.2.1",
5
+ "version": "8.3.1",
6
6
  "main": "src/index.js",
7
7
  "keywords": [
8
8
  "volto-addon",
package/publiccode.yml CHANGED
@@ -227,9 +227,9 @@ maintenance:
227
227
  name: io-Comune - Il sito AgID per Comuni ed Enti Pubblici
228
228
  platforms:
229
229
  - web
230
- releaseDate: '2023-07-27'
230
+ releaseDate: '2023-08-10'
231
231
  softwareType: standalone/web
232
- softwareVersion: 8.2.1
232
+ softwareVersion: 8.3.1
233
233
  url: 'https://github.com/italia/design-comuni-plone-theme'
234
234
  usedBy:
235
235
  - ASP Comuni Modenesi Area Nord
@@ -107,7 +107,7 @@ const CardWithImageTemplate = (props) => {
107
107
  className="listing-item card-bg shadow-sm"
108
108
  showImage={showImage}
109
109
  natural_image_size={natural_image_size}
110
- listingText={listingText}
110
+ show_description={show_description}
111
111
  icon={icon}
112
112
  type={category}
113
113
  isEditMode={isEditMode}
@@ -15,6 +15,10 @@ import {
15
15
  ListingLinkMore,
16
16
  ListingImage,
17
17
  } from 'design-comuni-plone-theme/components/ItaliaTheme';
18
+ import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme';
19
+ import { isInternalURL } from '@plone/volto/helpers/Url/Url';
20
+
21
+ import config from '@plone/volto/registry';
18
22
 
19
23
  const CompleteBlockLinksTemplate = ({
20
24
  items,
@@ -61,6 +65,7 @@ const CompleteBlockLinksTemplate = ({
61
65
  item={!isEditMode ? item : null}
62
66
  href={isEditMode ? '#' : null}
63
67
  data-element={id_lighthouse}
68
+ className={'no-external-if-link'}
64
69
  >
65
70
  <div className="d-flex">
66
71
  {image && <div className="image-container">{image}</div>}
@@ -68,6 +73,19 @@ const CompleteBlockLinksTemplate = ({
68
73
  <CardBody>
69
74
  <CardTitle tag="h3" className="text-secondary">
70
75
  {item.title}
76
+ {item['@type'] === 'Link' &&
77
+ !isInternalURL(
78
+ item.remoteUrl || item.getRemoteUrl,
79
+ ) &&
80
+ config.settings.siteProperties
81
+ .markSpecialLinks && (
82
+ <Icon
83
+ icon="it-external-link"
84
+ title={title}
85
+ size="xs"
86
+ className="align-top ms-1 external-link"
87
+ />
88
+ )}
71
89
  </CardTitle>
72
90
  {show_description && (
73
91
  <CardText tag="p" className="text-secondary">
@@ -92,7 +92,7 @@ const InEvidenceTemplate = (props) => {
92
92
  item={item}
93
93
  className="listing-item card-bg"
94
94
  showImage={image ? true : false}
95
- listingText={listingText}
95
+ show_description={show_description}
96
96
  icon={icon}
97
97
  isEditMode={isEditMode}
98
98
  key={index}
@@ -166,6 +166,7 @@ const SliderTemplate = ({
166
166
  <UniversalLink
167
167
  item={item}
168
168
  title={intl.formatMessage(messages.viewImage)}
169
+ className={'no-external-if-link'}
169
170
  >
170
171
  <div className="slide-title">
171
172
  {full_width ? (
@@ -15,7 +15,7 @@ export const CardPersona = ({
15
15
  titleClassName = '',
16
16
  titleTagName = 'h3',
17
17
  showImage,
18
- listingText,
18
+ show_description = true,
19
19
  icon,
20
20
  type,
21
21
  isEditMode,
@@ -34,7 +34,7 @@ export const CardPersona = ({
34
34
  {
35
35
  'card-with-image': hasImage,
36
36
  },
37
- `card-persona card-big-io-comune p-4 card-teaser-image card-flex no-after border border-light rounded`,
37
+ `card-persona card-big-io-comune card-teaser-image card-flex no-after border border-light rounded`,
38
38
  className,
39
39
  )}
40
40
  >
@@ -53,9 +53,11 @@ export const CardPersona = ({
53
53
  {item.title || item.id}
54
54
  </UniversalLink>
55
55
  </CardTitle>
56
- {listingText && <CardText>{listingText}</CardText>}
56
+ {show_description && (
57
+ <CardText>{item.incarichi || item.description}</CardText>
58
+ )}
57
59
  </CardBody>
58
- {showImage && (
60
+ {hasImage && (
59
61
  <div className="card-image card-image-rounded">{image}</div>
60
62
  )}
61
63
  </div>
@@ -21,6 +21,7 @@ it('renders the title correctly', () => {
21
21
  item={{
22
22
  '@id': 'http://localhost:3000/persona',
23
23
  title: 'Mario Rossi',
24
+ description: '',
24
25
  id: 'persona',
25
26
  }}
26
27
  />
@@ -78,8 +78,8 @@ const OfficeCard = ({
78
78
  {sede.zip_code} {sede.city}
79
79
  </p>
80
80
  )}
81
- {office_fo.contact_info?.map((el) =>
82
- el.value_punto_contatto?.map((pdc, i) => {
81
+ {office_fo?.contact_info?.map((el) =>
82
+ el?.value_punto_contatto?.map((pdc, i) => {
83
83
  if (pdc.pdc_type === 'telefono') {
84
84
  return (
85
85
  <div key={i}>
@@ -3,7 +3,6 @@ import { defineMessages, useIntl } from 'react-intl';
3
3
  import PropTypes from 'prop-types';
4
4
 
5
5
  import { Row, Col } from 'design-react-kit';
6
- import { UniversalLink } from '@plone/volto/components';
7
6
  import { CardPersona } from 'design-comuni-plone-theme/components/ItaliaTheme';
8
7
  import { RichTextSection } from 'design-comuni-plone-theme/components/ItaliaTheme/View';
9
8
 
@@ -40,7 +39,6 @@ const DocumentoAutori = ({ autori, title }) => {
40
39
  className="shadow-sm"
41
40
  titleTagName="h5"
42
41
  showImage={true}
43
- listingText={autore?.incarichi ?? ''}
44
42
  />
45
43
  </Col>
46
44
  ))}
@@ -28,7 +28,7 @@ const UOPeople = ({ content }) => {
28
28
  <p className="mt-4">
29
29
  {intl.formatMessage(messages.persone_p_description)}:
30
30
  </p>
31
- <Row className="card-wrapper card-teaser-wrapper ruolo-persone-struttura">
31
+ <Row className="card-wrapper card-teaser-wrapper card-teaser-wrapper-equal ruolo-persone-struttura">
32
32
  {content?.persone_struttura?.map((p, _i) => {
33
33
  return (
34
34
  <Col xs="12" lg="12" xl="6" md="12" key={p['@id']}>
@@ -37,7 +37,6 @@ const UOPeople = ({ content }) => {
37
37
  className={'shadow-sm'}
38
38
  showImage={true}
39
39
  titleTagName={'h5'}
40
- listingText={p?.incarichi}
41
40
  />
42
41
  </Col>
43
42
  );
@@ -119,7 +119,6 @@ const UOStructure = ({ content }) => {
119
119
  className={'shadow-sm'}
120
120
  showImage={true}
121
121
  titleTagName={'h5'}
122
- listingText={item.incarichi}
123
122
  />
124
123
  </Col>
125
124
  ))}
@@ -66,7 +66,7 @@ const ListingBody = React.memo(
66
66
  const isSearchBlockResults = variation?.['@type'] === 'search';
67
67
  const block = isSearchBlockResults ? variation : data;
68
68
 
69
- if (!block?.show_block_bg) return '';
69
+ if (!block?.show_block_bg) return 'full-width';
70
70
 
71
71
  let bg_color = data.bg_color ? `bg-${data.bg_color}` : '';
72
72
 
@@ -5,6 +5,7 @@ CUSTOMIZATIONS:
5
5
  - added additional filters
6
6
  - added additional fields to pass to @querystring-search (config.settings.querystringAdditionalFields)
7
7
  - usedeepCompareEffect and integrate custom logic for searchBlock to make it work with our implementation
8
+ - used [subrequestID] instead [id] of block, as id of subrequest to avoid block unload on duplicate contents with blocks with same id's. Volto's pr: https://github.com/plone/volto/pull/5071
8
9
  */
9
10
  import React, { createRef, useEffect } from 'react';
10
11
  import hoistNonReactStatics from 'hoist-non-react-statics';
@@ -66,6 +67,7 @@ export default function withQuerystringResults(WrappedComponent) {
66
67
  const content = useSelector((state) => state.content.data);
67
68
  const { settings } = config;
68
69
  const querystring = data.querystring || data; // For backwards compat with data saved before Blocks schema
70
+ const subrequestID = content.UID + '-' + id;
69
71
  const { b_size = settings.defaultPageSize } = querystring;
70
72
  const [firstLoading, setFirstLoading] = React.useState(true);
71
73
  // save the path so it won't trigger dispatch on eager router location change
@@ -82,44 +84,49 @@ export default function withQuerystringResults(WrappedComponent) {
82
84
 
83
85
  const originalQuery = useSelector((state) => {
84
86
  if (props?.variation?.['@type'] === 'search') {
85
- return state.originalQuery?.[path]?.[id];
87
+ return state.originalQuery?.[path]?.[subrequestID];
86
88
  }
87
- return state.originalQuery?.[properties['@id']]?.[id]?.toArray?.();
89
+ return state.originalQuery?.[properties['@id']]?.[
90
+ subrequestID
91
+ ]?.toArray?.();
88
92
  });
89
93
  const folderItems = content?.is_folderish ? content.items : [];
90
94
  const hasQuery = querystring?.query?.length > 0;
91
- const hasLoaded = hasQuery ? querystringResults?.[id]?.loaded : true;
95
+ const hasLoaded = hasQuery
96
+ ? querystringResults?.[subrequestID]?.loaded
97
+ : true;
92
98
  const loadingQuery =
93
99
  hasQuery &&
94
- (querystringResults?.[id]?.loading || !querystringResults?.[id]?.loaded);
100
+ (querystringResults?.[subrequestID]?.loading ||
101
+ !querystringResults?.[subrequestID]?.loaded);
95
102
 
96
103
  const listingItems = hasQuery
97
- ? querystringResults?.[id]?.items || []
104
+ ? querystringResults?.[subrequestID]?.items || []
98
105
  : folderItems;
99
106
 
100
107
  const showAsFolderListing = !hasQuery && content?.items_total > b_size;
101
108
  const showAsQueryListing =
102
- hasQuery && querystringResults?.[id]?.total > b_size;
109
+ hasQuery && querystringResults?.[subrequestID]?.total > b_size;
103
110
 
104
111
  const itemsTotal = showAsFolderListing
105
112
  ? content.items_total
106
- : querystringResults?.[id]?.total;
113
+ : querystringResults?.[subrequestID]?.total;
107
114
 
108
115
  const totalPages = showAsFolderListing
109
116
  ? Math.ceil(content.items_total / b_size)
110
117
  : showAsQueryListing
111
- ? Math.ceil(querystringResults[id].total / b_size)
118
+ ? Math.ceil(querystringResults[subrequestID].total / b_size)
112
119
  : 0;
113
120
 
114
121
  const prevBatch = showAsFolderListing
115
122
  ? content.batching?.prev
116
123
  : showAsQueryListing
117
- ? querystringResults[id].batching?.prev
124
+ ? querystringResults[subrequestID].batching?.prev
118
125
  : null;
119
126
  const nextBatch = showAsFolderListing
120
127
  ? content.batching?.next
121
128
  : showAsQueryListing
122
- ? querystringResults[id].batching?.next
129
+ ? querystringResults[subrequestID].batching?.next
123
130
  : null;
124
131
 
125
132
  function handleContentPaginationChange(e, { activePage }) {
@@ -163,7 +170,7 @@ export default function withQuerystringResults(WrappedComponent) {
163
170
  );
164
171
  }
165
172
 
166
- if (firstLoading && querystringResults[id] && !loadingQuery) {
173
+ if (firstLoading && querystringResults[subrequestID] && !loadingQuery) {
167
174
  setFirstLoading(false);
168
175
  }
169
176
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -172,7 +179,8 @@ export default function withQuerystringResults(WrappedComponent) {
172
179
  useDeepCompareEffect(() => {
173
180
  if (
174
181
  (hasQuery &&
175
- (isEditMode || (!isEditMode && !querystringResults[id]?.loaded))) ||
182
+ (isEditMode ||
183
+ (!isEditMode && !querystringResults[subrequestID]?.loaded))) ||
176
184
  (hasQuery && props.variation?.['@type'] === 'search')
177
185
  ) {
178
186
  doSearch(data);
@@ -222,7 +230,7 @@ export default function withQuerystringResults(WrappedComponent) {
222
230
  getQueryStringResults(
223
231
  path,
224
232
  getAdaptedQuery(_querystring, b_size, data.variation),
225
- id,
233
+ subrequestID,
226
234
  page,
227
235
  ),
228
236
  );
@@ -245,7 +253,7 @@ export default function withQuerystringResults(WrappedComponent) {
245
253
  },
246
254
  ],
247
255
  },
248
- id,
256
+ subrequestID,
249
257
  ),
250
258
  );
251
259
  }
@@ -270,7 +278,7 @@ export default function withQuerystringResults(WrappedComponent) {
270
278
  ? handleContentPaginationChange(e, { activePage })
271
279
  : handleQueryPaginationChange(e, { activePage });
272
280
  }}
273
- total={querystringResults?.[id]?.total}
281
+ total={querystringResults?.[subrequestID]?.total}
274
282
  batch_size={b_size}
275
283
  currentPage={currentPage}
276
284
  totalPages={totalPages}
@@ -83,7 +83,6 @@ const UniversalLink = ({
83
83
  (!isExternal && url.includes('@@display-file')) || false;
84
84
 
85
85
  const checkedURL = URLUtils.checkAndNormalizeUrl(url);
86
-
87
86
  url = checkedURL.url;
88
87
  let tag = (
89
88
  <Link
@@ -0,0 +1,77 @@
1
+ /*
2
+ CUSTOMIZATIONS:
3
+ - Removed the "Site Administration" link, added a link to the search page
4
+ */
5
+
6
+ import { useEffect } from 'react';
7
+ import { BodyClass, toBackendLang } from '@plone/volto/helpers';
8
+ import { FormattedMessage } from 'react-intl';
9
+ import { Link } from 'react-router-dom';
10
+ import { Container } from 'semantic-ui-react';
11
+ import { withServerErrorCode } from '@plone/volto/helpers/Utils/Utils';
12
+ import { useDispatch, useSelector } from 'react-redux';
13
+ import { getNavigation } from '@plone/volto/actions';
14
+ import config from '@plone/volto/registry';
15
+
16
+ /**
17
+ * Not found function.
18
+ * @function NotFound
19
+ * @returns {string} Markup of the not found page.
20
+ */
21
+ const NotFound = () => {
22
+ const dispatch = useDispatch();
23
+ const lang = useSelector((state) => state.intl.locale);
24
+
25
+ useEffect(() => {
26
+ dispatch(
27
+ getNavigation(
28
+ config.settings.isMultilingual ? `/${toBackendLang(lang)}` : '/',
29
+ config.settings.navDepth,
30
+ ),
31
+ );
32
+ }, [dispatch, lang]);
33
+
34
+ return (
35
+ <Container className="view-wrapper">
36
+ <BodyClass className="page-not-found" />
37
+ <h1>
38
+ <FormattedMessage
39
+ id="This page does not seem to exist…"
40
+ defaultMessage="This page does not seem to exist…"
41
+ />
42
+ </h1>
43
+ <p className="description">
44
+ <FormattedMessage
45
+ id="We apologize for the inconvenience, but the page you were trying to access is not at this address. You can use the links below to help you find what you are looking for."
46
+ defaultMessage="We apologize for the inconvenience, but the page you were trying to access is not at this address. You can use the links below to help you find what you are looking for."
47
+ />
48
+ </p>
49
+ <p>
50
+ <Link to="/search">
51
+ <FormattedMessage id="Search Site" defaultMessage="Search Site" />
52
+ </Link>
53
+ </p>
54
+ {/* <p>
55
+ <FormattedMessage
56
+ id="If you are certain you have the correct web address but are encountering an error, please contact the {site_admin}."
57
+ defaultMessage="If you are certain you have the correct web address but are encountering an error, please contact the {site_admin}."
58
+ values={{
59
+ site_admin: (
60
+ <Link to="/contact-form">
61
+ <FormattedMessage
62
+ id="Site Administration"
63
+ defaultMessage="Site Administration"
64
+ />
65
+ </Link>
66
+ ),
67
+ }}
68
+ />
69
+ </p> */}
70
+ <p>
71
+ <FormattedMessage id="Thank you." defaultMessage="Thank you." />
72
+ </p>
73
+ </Container>
74
+ );
75
+ };
76
+
77
+ export default withServerErrorCode(404)(NotFound);
@@ -61,7 +61,7 @@ export const When = ({
61
61
  if (!datesInfo) {
62
62
  // eslint-disable-next-line no-console
63
63
  console.warn('EventWhen: Received invalid start or end date.');
64
- return;
64
+ return null;
65
65
  }
66
66
 
67
67
  const getDate = () => {
@@ -53,8 +53,12 @@ export const getCalendarDate = (item, rrulestr) => {
53
53
  rrulestr,
54
54
  intl,
55
55
  );
56
- realStart = recurrenceDates.recurrenceStart;
57
- realEnd = recurrenceDates.recurrenceEnd;
56
+ // If the recurrence range is entirely in the past,
57
+ // then no future occurrences exist and both
58
+ // recurrenceStart and recurrenceEnd will be null
59
+ // so fallback to displaying the original info
60
+ realStart = recurrenceDates.recurrenceStart || item.start;
61
+ realEnd = recurrenceDates.recurrenceEnd || item.end;
58
62
  }
59
63
  ret = (
60
64
  <When
@@ -170,7 +170,8 @@
170
170
  &:focus {
171
171
  & + label {
172
172
  &:before {
173
- box-shadow: 0 0 3px 3px #ccc;
173
+ box-shadow: 0 0 0 5px black !important;
174
+ outline: #ddd 2px solid !important;
174
175
  }
175
176
  }
176
177
  }
@@ -45,9 +45,15 @@
45
45
  font-size: 1rem !important;
46
46
  font-weight: 700 !important;
47
47
  line-height: 1.44444rem;
48
+ .external-link {
49
+ fill: $external-link-fill-buttons !important;
50
+ }
48
51
  }
49
52
 
50
53
  .card:after {
51
54
  content: none;
52
55
  }
56
+ .no-external-if-link > .external-link {
57
+ display: none;
58
+ }
53
59
  }
@@ -1,52 +1,34 @@
1
- .card-persona.card-teaser-image.card-flex.card {
2
- min-height: 135px;
3
- height: fit-content;
4
-
5
- &.card-with-image {
6
- .card-image-wrapper {
7
- flex: 1;
8
- display: flex;
9
- flex-direction: row;
10
- justify-content: space-between;
11
- align-items: flex-start;
1
+ .card-persona.card-flex {
2
+ .card-image-wrapper {
3
+ flex: 1;
4
+ display: flex;
5
+ align-items: flex-start;
6
+ }
12
7
 
13
- .card-body {
14
- width: calc(100% - 7.2rem);
15
- flex-grow: 0;
16
- }
17
- }
8
+ .card-body {
9
+ // TODO Rimuovere important e mettere p-4 come classe nel jsx
10
+ // nel momento in cui riusciremo a togliere il padding 0 important
11
+ // dalla classe .card-big-io-comune .card-body globalmente
12
+ padding: 24px !important;
18
13
  }
19
14
 
20
- .card-image-wrapper {
21
- .card-image {
22
- position: absolute;
23
- top: 0;
24
- right: 0;
25
- bottom: 0;
26
- overflow: hidden;
27
- height: 100%;
28
- .volto-image {
29
- height: 100%;
30
- display: flex;
31
- align-items: stretch;
15
+ .card-image {
16
+ flex: 0 0 130px;
32
17
 
33
- img {
34
- min-width: 5.27rem;
35
- max-width: 7.2rem;
36
- width: auto;
37
- min-height: 7.5rem;
38
- object-fit: cover;
39
- aspect-ratio: 180/100;
40
- object-position: center;
41
- }
42
- }
43
- }
44
- .card-title {
45
- font-size: $card-big-head-size;
46
- line-height: $card-big-head-l-h;
18
+ img {
19
+ // Dobbiamo vincere contro gli stili del blocco listing
20
+ width: 130px !important;
21
+ height: 130px * 1.4 !important;
22
+ object-fit: cover;
23
+ object-position: center;
47
24
  }
48
25
  }
49
26
 
27
+ .card-title {
28
+ font-size: $card-big-head-size;
29
+ line-height: $card-big-head-l-h;
30
+ }
31
+
50
32
  &.listing-item {
51
33
  .card-body {
52
34
  .category-top {
@@ -69,10 +51,5 @@
69
51
  }
70
52
  }
71
53
  }
72
-
73
- .card-image {
74
- margin-bottom: 0.8em;
75
- height: auto;
76
- }
77
54
  }
78
55
  }
@@ -21,4 +21,7 @@
21
21
  padding: 0;
22
22
  margin: 0;
23
23
  }
24
+ .no-external-if-link > .external-link {
25
+ display: none;
26
+ }
24
27
  }
@@ -61,3 +61,7 @@
61
61
  fill: $external-link-fill-subfooter !important;
62
62
  }
63
63
  }
64
+
65
+ .icon.external-link.icon-xs {
66
+ height: 1rem;
67
+ }
@@ -406,7 +406,12 @@ body.cms-ui {
406
406
  .public-DraftStyleDefault-block {
407
407
  margin-bottom: unset;
408
408
  }
409
- // z-index necessario su Volto 17 finché non passiamo ad usare slate
409
+ }
410
+ }
411
+
412
+ // z-index necessario su Volto 17 finché non passiamo ad usare slate
413
+ .block {
414
+ .DraftEditor-root {
410
415
  .DraftEditor-editorContainer,
411
416
  .public-DraftEditorPlaceholder-root {
412
417
  z-index: 0;