design-comuni-plone-theme 12.7.1 → 12.7.2

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.
Binary file
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [12.7.2](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v12.7.1...v12.7.2) (2025-11-21)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * check on token to allow display or download file in attachment card listing variation ([#1044](https://github.com/RedTurtle/design-comuni-plone-theme/issues/1044)) ([adf38e8](https://github.com/RedTurtle/design-comuni-plone-theme/commit/adf38e8e69f3b683dd00d329dccf589bddb87058))
9
+
10
+
11
+ ### Documentation
12
+
13
+ * updated publiccode and release log ([4555780](https://github.com/RedTurtle/design-comuni-plone-theme/commit/4555780465fb8c1f6db7c2b977ee7d3adf8c2582))
14
+
3
15
  ## [12.7.1](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v12.7.0...v12.7.1) (2025-11-17)
4
16
 
5
17
 
package/RELEASE.md CHANGED
@@ -41,6 +41,12 @@
41
41
  - ...
42
42
  -->
43
43
 
44
+ ## Versione 12.7.2 (21/11/2025)
45
+
46
+ ### Fix
47
+
48
+ - La variazione "Allegati" del blocco Elenco mostra ora la vista File quando un utente è autenticato, e presenta il comportamento richiesto (mostra anteprima PDF se l'opzione è selezionata e il file è un PDF, scarica il file se il file non è un PDF o l'opzione non è selezionata) se l'utente è anonimo.
49
+
44
50
  ## Versione 12.7.0 (12/11/2025)
45
51
 
46
52
  ### Novità
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": "12.7.1",
5
+ "version": "12.7.2",
6
6
  "main": "src/index.js",
7
7
  "repository": {
8
8
  "type": "git",
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: '2025-11-17'
230
+ releaseDate: '2025-11-21'
231
231
  softwareType: standalone/web
232
- softwareVersion: 12.7.1
232
+ softwareVersion: 12.7.2
233
233
  url: 'https://github.com/italia/design-comuni-plone-theme'
234
234
  usedBy:
235
235
  - ASP Comuni Modenesi Area Nord
@@ -1,4 +1,6 @@
1
1
  import React from 'react';
2
+ import { useSelector } from 'react-redux';
3
+
2
4
  import PropTypes from 'prop-types';
3
5
  import cx from 'classnames';
4
6
  import { defineMessages, useIntl } from 'react-intl';
@@ -35,6 +37,8 @@ const AttachmentCardTemplate = ({
35
37
  }) => {
36
38
  const intl = useIntl();
37
39
 
40
+ const token = useSelector((state) => state.userSession?.token);
41
+
38
42
  return (
39
43
  <Container className="px-4 pt-3">
40
44
  <div className="simple-card-compact-template">
@@ -53,6 +57,7 @@ const AttachmentCardTemplate = ({
53
57
  let itemUrl = { ...item };
54
58
  //la parte qui sotto commentata non serve perchè gestisce gia tutto UniversalLink e in view si vedrebbe /@@download/file duplicato nell url
55
59
  if (
60
+ !token &&
56
61
  item['@type'] === 'File' &&
57
62
  item?.mime_type === 'application/pdf'
58
63
  ) {
@@ -88,7 +93,6 @@ const AttachmentCardTemplate = ({
88
93
  item={!isEditMode ? itemUrl : null}
89
94
  href={isEditMode ? '#' : null}
90
95
  data-element={id_lighthouse}
91
- download={!show_pdf_preview}
92
96
  >
93
97
  {item.title || item.id}
94
98
  </UniversalLink>