Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Last modified document #749

Merged
merged 10 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
giuliaghisini marked this conversation as resolved.
Show resolved Hide resolved

## Versione 7.30.4 (26/08/2024)

### Fix
Expand Down
5 changes: 5 additions & 0 deletions locales/de/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 5 additions & 0 deletions locales/en/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 5 additions & 0 deletions locales/es/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 5 additions & 0 deletions locales/fr/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 5 additions & 0 deletions locales/it/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 6 additions & 1 deletion locales/volto.pot
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>\n"
"Language-Team: Plone i18n <[email protected]>\n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -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"
Expand Down
12 changes: 11 additions & 1 deletion src/components/ItaliaTheme/View/Commons/Attachment.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,21 @@ 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({
attachment: {
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 }) => {
const intl = useIntl();
return (
<Card
Expand All @@ -34,6 +39,11 @@ const Attachment = ({ title, description, download_url }) => {
<a href={flattenToAppURL(download_url)}>{title}</a>
</CardTitle>
{description && <p>{description}</p>}

{item?.modified && <p>
{intl.formatMessage(messages.last_update)}{' '}
{viewDate(intl.locale, item?.modified, 'DD-MM-Y HH:MM')}
</p>}
</CardBody>
</Card>
);
Expand Down
Loading