From 8512c91f69d7d6199d5950a03aa47d5284509701 Mon Sep 17 00:00:00 2001
From: Wagner Trezub
Date: Mon, 26 Aug 2024 10:49:53 +0200
Subject: [PATCH 1/9] feat: added file last modified date
---
src/components/ItaliaTheme/View/Commons/Attachment.jsx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/components/ItaliaTheme/View/Commons/Attachment.jsx b/src/components/ItaliaTheme/View/Commons/Attachment.jsx
index 80c920d8f..a22669db8 100644
--- a/src/components/ItaliaTheme/View/Commons/Attachment.jsx
+++ b/src/components/ItaliaTheme/View/Commons/Attachment.jsx
@@ -6,7 +6,7 @@ import {
CardBody,
CardTitle,
} from 'design-react-kit/dist/design-react-kit';
-import { flattenToAppURL } from '@plone/volto/helpers';
+import { flattenToAppURL, viewDate } from '@plone/volto/helpers';
import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme';
const messages = defineMessages({
@@ -16,7 +16,7 @@ const messages = defineMessages({
},
});
-const Attachment = ({ title, description, download_url }) => {
+const Attachment = ({ title, description, download_url, item }) => {
const intl = useIntl();
return (
{
{title}
{description && {description}
}
+ {viewDate(intl.locale, item.modified, 'DD-MM-Y HH:MM')}
);
From 9c560c033a076cc01d5590cf2c7b8b5b807ed518 Mon Sep 17 00:00:00 2001
From: Wagner Trezub
Date: Wed, 28 Aug 2024 10:56:51 +0200
Subject: [PATCH 2/9] fix: added message
---
locales/de/LC_MESSAGES/volto.po | 5 +++++
locales/en/LC_MESSAGES/volto.po | 5 +++++
locales/es/LC_MESSAGES/volto.po | 5 +++++
locales/fr/LC_MESSAGES/volto.po | 5 +++++
locales/it/LC_MESSAGES/volto.po | 5 +++++
locales/volto.pot | 7 ++++++-
.../ItaliaTheme/View/Commons/Attachment.jsx | 13 +++++++++++--
7 files changed, 42 insertions(+), 3 deletions(-)
diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po
index b56d20c29..deb4f70f3 100644
--- a/locales/de/LC_MESSAGES/volto.po
+++ b/locales/de/LC_MESSAGES/volto.po
@@ -2170,6 +2170,11 @@ msgstr ""
msgid "iter_del_procedimento"
msgstr ""
+#: components/ItaliaTheme/View/Commons/Attachment
+# defaultMessage: Ultimo agg.to:
+msgid "last_update"
+msgstr ""
+
#: components/ItaliaTheme/View/UOView/UOStructure
# defaultMessage: Servizi o uffici di riferimento
msgid "legami_altre_strutture"
diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po
index 3a71fdea7..fa8539efe 100644
--- a/locales/en/LC_MESSAGES/volto.po
+++ b/locales/en/LC_MESSAGES/volto.po
@@ -2155,6 +2155,11 @@ msgstr ""
msgid "iter_del_procedimento"
msgstr "Procedure of the procedure"
+#: components/ItaliaTheme/View/Commons/Attachment
+# defaultMessage: Ultimo agg.to:
+msgid "last_update"
+msgstr "Last update"
+
#: components/ItaliaTheme/View/UOView/UOStructure
# defaultMessage: Servizi o uffici di riferimento
msgid "legami_altre_strutture"
diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po
index 86108873c..3255df066 100644
--- a/locales/es/LC_MESSAGES/volto.po
+++ b/locales/es/LC_MESSAGES/volto.po
@@ -2164,6 +2164,11 @@ msgstr "Inserta un filtro del menú lateral para ver los resultados relacionados
msgid "iter_del_procedimento"
msgstr "Procedimiento"
+#: components/ItaliaTheme/View/Commons/Attachment
+# defaultMessage: Ultimo agg.to:
+msgid "last_update"
+msgstr ""
+
#: components/ItaliaTheme/View/UOView/UOStructure
# defaultMessage: Servizi o uffici di riferimento
msgid "legami_altre_strutture"
diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po
index a7ea66ba3..6ec03772a 100644
--- a/locales/fr/LC_MESSAGES/volto.po
+++ b/locales/fr/LC_MESSAGES/volto.po
@@ -2172,6 +2172,11 @@ msgstr ""
msgid "iter_del_procedimento"
msgstr "Procédure"
+#: components/ItaliaTheme/View/Commons/Attachment
+# defaultMessage: Ultimo agg.to:
+msgid "last_update"
+msgstr ""
+
#: components/ItaliaTheme/View/UOView/UOStructure
# defaultMessage: Servizi o uffici di riferimento
msgid "legami_altre_strutture"
diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po
index f7d9fc30e..8a20e3249 100644
--- a/locales/it/LC_MESSAGES/volto.po
+++ b/locales/it/LC_MESSAGES/volto.po
@@ -2155,6 +2155,11 @@ msgstr "Inserire un filtro dal menù laterale per visualizzare i relativi risult
msgid "iter_del_procedimento"
msgstr "Iter del procedimento"
+#: components/ItaliaTheme/View/Commons/Attachment
+# defaultMessage: Ultimo agg.to:
+msgid "last_update"
+msgstr ""
+
#: components/ItaliaTheme/View/UOView/UOStructure
# defaultMessage: Servizi o uffici di riferimento
msgid "legami_altre_strutture"
diff --git a/locales/volto.pot b/locales/volto.pot
index e3bef3828..caa451fe2 100644
--- a/locales/volto.pot
+++ b/locales/volto.pot
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Plone\n"
-"POT-Creation-Date: 2024-07-25T10:23:52.051Z\n"
+"POT-Creation-Date: 2024-08-28T08:55:19.173Z\n"
"Last-Translator: Plone i18n \n"
"Language-Team: Plone i18n \n"
"MIME-Version: 1.0\n"
@@ -2157,6 +2157,11 @@ msgstr ""
msgid "iter_del_procedimento"
msgstr ""
+#: components/ItaliaTheme/View/Commons/Attachment
+# defaultMessage: Ultimo agg.to:
+msgid "last_update"
+msgstr ""
+
#: components/ItaliaTheme/View/UOView/UOStructure
# defaultMessage: Servizi o uffici di riferimento
msgid "legami_altre_strutture"
diff --git a/src/components/ItaliaTheme/View/Commons/Attachment.jsx b/src/components/ItaliaTheme/View/Commons/Attachment.jsx
index a22669db8..ba0daeb97 100644
--- a/src/components/ItaliaTheme/View/Commons/Attachment.jsx
+++ b/src/components/ItaliaTheme/View/Commons/Attachment.jsx
@@ -6,7 +6,8 @@ import {
CardBody,
CardTitle,
} from 'design-react-kit/dist/design-react-kit';
-import { flattenToAppURL, viewDate } from '@plone/volto/helpers';
+import { flattenToAppURL } from '@plone/volto/helpers';
+import { viewDate } from 'design-comuni-plone-theme/helpers';
import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme';
const messages = defineMessages({
@@ -14,6 +15,10 @@ const messages = defineMessages({
id: 'attachment',
defaultMessage: 'Allegato',
},
+ last_update: {
+ id: 'last_update',
+ defaultMessage: 'Ultimo agg.to:',
+ },
});
const Attachment = ({ title, description, download_url, item }) => {
@@ -34,7 +39,11 @@ const Attachment = ({ title, description, download_url, item }) => {
{title}
{description && {description}
}
- {viewDate(intl.locale, item.modified, 'DD-MM-Y HH:MM')}
+
+
+ {intl.formatMessage(messages.last_update)}{' '}
+ {viewDate(intl.locale, item.modified, 'DD-MM-Y HH:MM')}
+
);
From 1924dddd0d3918a4f9c2b79207e87f81efee1f12 Mon Sep 17 00:00:00 2001
From: Wagner Trezub
Date: Wed, 28 Aug 2024 11:04:53 +0200
Subject: [PATCH 3/9] fix: condition
---
src/components/ItaliaTheme/View/Commons/Attachment.jsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/ItaliaTheme/View/Commons/Attachment.jsx b/src/components/ItaliaTheme/View/Commons/Attachment.jsx
index ba0daeb97..1f2f666d3 100644
--- a/src/components/ItaliaTheme/View/Commons/Attachment.jsx
+++ b/src/components/ItaliaTheme/View/Commons/Attachment.jsx
@@ -42,7 +42,7 @@ const Attachment = ({ title, description, download_url, item }) => {
{intl.formatMessage(messages.last_update)}{' '}
- {viewDate(intl.locale, item.modified, 'DD-MM-Y HH:MM')}
+ {viewDate(intl.locale, item?.modified, 'DD-MM-Y HH:MM')}
From b5d3bb7e306eb608b61ae04a5cbc3c9e0d6a8a82 Mon Sep 17 00:00:00 2001
From: Wagner Trezub
Date: Mon, 2 Sep 2024 12:52:51 +0200
Subject: [PATCH 4/9] chore: release.md
---
RELEASE.md | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/RELEASE.md b/RELEASE.md
index 6c09a3c90..a7f588ac4 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -30,6 +30,12 @@
- ...
-->
+## Versione 7.30.5 (02/09/2024)
+
+### Migliorie
+
+- Aggiunto la data di modifica per mostrare la data dentro i documenti allegati nei CT Bando
+
## Versione 7.30.4 (26/08/2024)
### Fix
From 3676de75230f28b5a653f8cc0c193c976511d3d5 Mon Sep 17 00:00:00 2001
From: Wagner Trezub <60133113+Wagner3UB@users.noreply.github.com>
Date: Mon, 2 Sep 2024 14:13:29 +0200
Subject: [PATCH 5/9] Update
src/components/ItaliaTheme/View/Commons/Attachment.jsx
Co-authored-by: Giulia Ghisini <51911425+giuliaghisini@users.noreply.github.com>
---
src/components/ItaliaTheme/View/Commons/Attachment.jsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/components/ItaliaTheme/View/Commons/Attachment.jsx b/src/components/ItaliaTheme/View/Commons/Attachment.jsx
index 1f2f666d3..2ff8f4c37 100644
--- a/src/components/ItaliaTheme/View/Commons/Attachment.jsx
+++ b/src/components/ItaliaTheme/View/Commons/Attachment.jsx
@@ -40,10 +40,10 @@ const Attachment = ({ title, description, download_url, item }) => {
{description && {description}
}
-
+ {item?.modified &&
{intl.formatMessage(messages.last_update)}{' '}
{viewDate(intl.locale, item?.modified, 'DD-MM-Y HH:MM')}
-
+
}
);
From 9986ef2acdfa52697e9c6f6f78ccc73c513b4f17 Mon Sep 17 00:00:00 2001
From: Wagner Trezub
Date: Tue, 3 Sep 2024 10:08:10 +0200
Subject: [PATCH 6/9] fix: added condition for show the modified date
---
.../View/BandoView/BandoApprofondimenti.jsx | 1 +
.../ItaliaTheme/View/Commons/Attachment.jsx | 17 ++++++++++++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/components/ItaliaTheme/View/BandoView/BandoApprofondimenti.jsx b/src/components/ItaliaTheme/View/BandoView/BandoApprofondimenti.jsx
index d9b10f692..d544576de 100644
--- a/src/components/ItaliaTheme/View/BandoView/BandoApprofondimenti.jsx
+++ b/src/components/ItaliaTheme/View/BandoView/BandoApprofondimenti.jsx
@@ -35,6 +35,7 @@ const BandoApprofondimenti = ({ content }) => {
description={item.description}
download_url={item.url}
item={item}
+ showModified={true}
/>
// item={item} viene utilizzato nelle customizzazioni per ottenere altre proprietà
);
diff --git a/src/components/ItaliaTheme/View/Commons/Attachment.jsx b/src/components/ItaliaTheme/View/Commons/Attachment.jsx
index 2ff8f4c37..8b58f0033 100644
--- a/src/components/ItaliaTheme/View/Commons/Attachment.jsx
+++ b/src/components/ItaliaTheme/View/Commons/Attachment.jsx
@@ -21,7 +21,13 @@ const messages = defineMessages({
},
});
-const Attachment = ({ title, description, download_url, item }) => {
+const Attachment = ({
+ title,
+ description,
+ download_url,
+ item,
+ showModified = false,
+}) => {
const intl = useIntl();
return (
{
{description && {description}
}
+<<<<<<< Updated upstream
{item?.modified &&
{intl.formatMessage(messages.last_update)}{' '}
{viewDate(intl.locale, item?.modified, 'DD-MM-Y HH:MM')}
}
+=======
+ {showModified && (
+
+ {intl.formatMessage(messages.last_update)}{' '}
+ {viewDate(intl.locale, item?.modified, 'DD-MM-Y HH:MM')}
+
+ )}
+>>>>>>> Stashed changes
);
From 9c514c0c3fefa6225b49281a7b15b7a7fc15c2e3 Mon Sep 17 00:00:00 2001
From: Wagner Trezub
Date: Tue, 3 Sep 2024 10:15:29 +0200
Subject: [PATCH 7/9] fix: conflit solved
---
src/components/ItaliaTheme/View/Commons/Attachment.jsx | 7 -------
1 file changed, 7 deletions(-)
diff --git a/src/components/ItaliaTheme/View/Commons/Attachment.jsx b/src/components/ItaliaTheme/View/Commons/Attachment.jsx
index 8b58f0033..b33c49c3b 100644
--- a/src/components/ItaliaTheme/View/Commons/Attachment.jsx
+++ b/src/components/ItaliaTheme/View/Commons/Attachment.jsx
@@ -46,19 +46,12 @@ const Attachment = ({
{description && {description}
}
-<<<<<<< Updated upstream
- {item?.modified &&
- {intl.formatMessage(messages.last_update)}{' '}
- {viewDate(intl.locale, item?.modified, 'DD-MM-Y HH:MM')}
-
}
-=======
{showModified && (
{intl.formatMessage(messages.last_update)}{' '}
{viewDate(intl.locale, item?.modified, 'DD-MM-Y HH:MM')}
)}
->>>>>>> Stashed changes
);
From 634b8f49c879a3b87803936aa879bc1a21168fc5 Mon Sep 17 00:00:00 2001
From: Wagner Trezub <60133113+Wagner3UB@users.noreply.github.com>
Date: Tue, 3 Sep 2024 11:42:13 +0200
Subject: [PATCH 8/9] fix: added condition
Co-authored-by: Giulia Ghisini <51911425+giuliaghisini@users.noreply.github.com>
---
src/components/ItaliaTheme/View/Commons/Attachment.jsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/ItaliaTheme/View/Commons/Attachment.jsx b/src/components/ItaliaTheme/View/Commons/Attachment.jsx
index b33c49c3b..5113a1033 100644
--- a/src/components/ItaliaTheme/View/Commons/Attachment.jsx
+++ b/src/components/ItaliaTheme/View/Commons/Attachment.jsx
@@ -46,7 +46,7 @@ const Attachment = ({
{description && {description}
}
- {showModified && (
+ {showModified && item?.modified && (
{intl.formatMessage(messages.last_update)}{' '}
{viewDate(intl.locale, item?.modified, 'DD-MM-Y HH:MM')}
From 08b38d1d2d42fcb9d213a19ca10f9ad3f69ec6a2 Mon Sep 17 00:00:00 2001
From: Giulia Ghisini <51911425+giuliaghisini@users.noreply.github.com>
Date: Wed, 4 Sep 2024 09:04:51 +0200
Subject: [PATCH 9/9] Update RELEASE.md
---
RELEASE.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/RELEASE.md b/RELEASE.md
index a7f588ac4..d87db1fe4 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -34,7 +34,7 @@
### Migliorie
-- Aggiunto la data di modifica per mostrare la data dentro i documenti allegati nei CT Bando
+- Aggiunto la data di modifica nei documenti allegati del CT Bando
## Versione 7.30.4 (26/08/2024)