Skip to content

Commit

Permalink
fix: added component to show update_note field on Bandi view (#543)
Browse files Browse the repository at this point in the history
* fix: added component to show update_note field on Bandi view

* chore: generated translation files

* chore: added label in EN
  • Loading branch information
sabrina-bongiovanni authored Feb 19, 2024
1 parent 9747bd7 commit a9e33fe
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 1 deletion.
6 changes: 6 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@
- ...
-->

## Versione X.X.X (dd/mm/yyyy)

### Migliorie

- Il campo "Note aggiornamento" nel Tipo di Contenuto Bandi viene ora mostrato in pagina, se compilato.

## Versione 11.5.0 (16/02/2024)

### Migliorie
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 @@ -2564,6 +2564,11 @@ msgstr ""
msgid "nominativo"
msgstr ""

#: components/ItaliaTheme/View/BandoView/BandoNoteAggiornamento
# defaultMessage: Note di aggiornamento
msgid "note_aggiornamento"
msgstr ""

#: components/ItaliaTheme/View/Commons/RelatedItems
# defaultMessage: Novità
msgid "novita"
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 @@ -2549,6 +2549,11 @@ msgstr ""
msgid "nominativo"
msgstr "nominative"

#: components/ItaliaTheme/View/BandoView/BandoNoteAggiornamento
# defaultMessage: Note di aggiornamento
msgid "note_aggiornamento"
msgstr "Update notes"

#: components/ItaliaTheme/View/Commons/RelatedItems
# defaultMessage: Novità
msgid "novita"
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 @@ -2558,6 +2558,11 @@ msgstr "No hay vídeos seleccionados. Agregar un elemento para mostrar un vídeo
msgid "nominativo"
msgstr "nominativa"

#: components/ItaliaTheme/View/BandoView/BandoNoteAggiornamento
# defaultMessage: Note di aggiornamento
msgid "note_aggiornamento"
msgstr ""

#: components/ItaliaTheme/View/Commons/RelatedItems
# defaultMessage: Novità
msgid "novita"
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 @@ -2566,6 +2566,11 @@ msgstr ""
msgid "nominativo"
msgstr "nominatif"

#: components/ItaliaTheme/View/BandoView/BandoNoteAggiornamento
# defaultMessage: Note di aggiornamento
msgid "note_aggiornamento"
msgstr ""

#: components/ItaliaTheme/View/Commons/RelatedItems
# defaultMessage: Novità
msgid "novita"
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 @@ -2549,6 +2549,11 @@ msgstr "Nessun video selezionato. Aggiungi un elemento per mostrare un video"
msgid "nominativo"
msgstr "nominativo"

#: components/ItaliaTheme/View/BandoView/BandoNoteAggiornamento
# defaultMessage: Note di aggiornamento
msgid "note_aggiornamento"
msgstr ""

#: components/ItaliaTheme/View/Commons/RelatedItems
# defaultMessage: Novità
msgid "novita"
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-02-15T11:19:07.787Z\n"
"POT-Creation-Date: 2024-02-19T11:08:36.048Z\n"
"Last-Translator: Plone i18n <[email protected]>\n"
"Language-Team: Plone i18n <[email protected]>\n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -2551,6 +2551,11 @@ msgstr ""
msgid "nominativo"
msgstr ""

#: components/ItaliaTheme/View/BandoView/BandoNoteAggiornamento
# defaultMessage: Note di aggiornamento
msgid "note_aggiornamento"
msgstr ""

#: components/ItaliaTheme/View/Commons/RelatedItems
# defaultMessage: Novità
msgid "novita"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import React from 'react';
import PropTypes from 'prop-types';
import { defineMessages, useIntl } from 'react-intl';

const messages = defineMessages({
note_aggiornamento: {
id: 'note_aggiornamento',
defaultMessage: 'Note di aggiornamento',
},
});

const BandoNoteAggiornamento = ({ content }) => {
const intl = useIntl();
return content?.update_note ? (
<div className="mb-4">
<h3 className="h5">{intl.formatMessage(messages.note_aggiornamento)}</h3>
<span>{content?.update_note}</span>
</div>
) : (
<></>
);
};

BandoNoteAggiornamento.propTypes = {
content: PropTypes.shape({
update_note: PropTypes.shape(PropTypes.string),
}).isRequired,
};
export default BandoNoteAggiornamento;
2 changes: 2 additions & 0 deletions src/components/ItaliaTheme/View/BandoView/BandoView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
BandoServizi,
BandoDate,
BandoApprofondimenti,
BandoNoteAggiornamento,
BandoUlterioriInformazioni,
RelatedItemInEvidence,
SkipToMainContent,
Expand All @@ -34,6 +35,7 @@ export const BandoViewSectionsOrder = [
{
/* ALLEGATI (CARTELLE APPROFONDIMENTI) */ component: BandoApprofondimenti,
},
{ /* NOTE AGGIORNAMENTO */ component: BandoNoteAggiornamento },
{ /* ULTERIORI INFORMAZIONI */ component: BandoUlterioriInformazioni },
];
/**
Expand Down
1 change: 1 addition & 0 deletions src/components/ItaliaTheme/View/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export BandoAreaResponsabile from 'design-comuni-plone-theme/components/ItaliaTh
export BandoServizi from 'design-comuni-plone-theme/components/ItaliaTheme/View/BandoView/BandoServizi';
export BandoDate from 'design-comuni-plone-theme/components/ItaliaTheme/View/BandoView/BandoDate';
export BandoApprofondimenti from 'design-comuni-plone-theme/components/ItaliaTheme/View/BandoView/BandoApprofondimenti';
export BandoNoteAggiornamento from 'design-comuni-plone-theme/components/ItaliaTheme/View/BandoView/BandoNoteAggiornamento';
export BandoUlterioriInformazioni from 'design-comuni-plone-theme/components/ItaliaTheme/View/BandoView/BandoUlterioriInformazioni';

export CartellaModulisticaAfterContent from 'design-comuni-plone-theme/components/ItaliaTheme/View/CartellaModulisticaView/Placeholder/AfterContent';
Expand Down

0 comments on commit a9e33fe

Please sign in to comment.