From bcaa25f9afaaef95e287a6885186209cdad99848 Mon Sep 17 00:00:00 2001 From: Wagner Trezub <60133113+Wagner3UB@users.noreply.github.com> Date: Wed, 4 Sep 2024 09:05:27 +0200 Subject: [PATCH] feat: show Last modified date for documents in ct Bando(#749) * feat: added file last modified date * fix: added message * fix: condition * chore: release.md * Update src/components/ItaliaTheme/View/Commons/Attachment.jsx Co-authored-by: Giulia Ghisini <51911425+giuliaghisini@users.noreply.github.com> * fix: added condition for show the modified date * fix: conflit solved * fix: added condition Co-authored-by: Giulia Ghisini <51911425+giuliaghisini@users.noreply.github.com> * Update RELEASE.md --------- Co-authored-by: Giulia Ghisini <51911425+giuliaghisini@users.noreply.github.com> --- RELEASE.md | 6 ++++++ 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 ++++++- .../View/BandoView/BandoApprofondimenti.jsx | 1 + .../ItaliaTheme/View/Commons/Attachment.jsx | 20 ++++++++++++++++++- 9 files changed, 57 insertions(+), 2 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 6c09a3c90..d87db1fe4 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -30,6 +30,12 @@ - ... --> +## Versione 7.30.5 (02/09/2024) + +### Migliorie + +- Aggiunto la data di modifica nei documenti allegati del CT Bando + ## Versione 7.30.4 (26/08/2024) ### Fix 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/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 80c920d8f..5113a1033 100644 --- a/src/components/ItaliaTheme/View/Commons/Attachment.jsx +++ b/src/components/ItaliaTheme/View/Commons/Attachment.jsx @@ -7,6 +7,7 @@ import { CardTitle, } from 'design-react-kit/dist/design-react-kit'; 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,9 +15,19 @@ const messages = defineMessages({ id: 'attachment', defaultMessage: 'Allegato', }, + last_update: { + id: 'last_update', + defaultMessage: 'Ultimo agg.to:', + }, }); -const Attachment = ({ title, description, download_url }) => { +const Attachment = ({ + title, + description, + download_url, + item, + showModified = false, +}) => { const intl = useIntl(); return ( { {title} {description &&

{description}

} + + {showModified && item?.modified && ( +

+ {intl.formatMessage(messages.last_update)}{' '} + {viewDate(intl.locale, item?.modified, 'DD-MM-Y HH:MM')} +

+ )}
);