forked from italia/design-comuni-plone-theme
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: rearranged contacts section for events (#863)
* fix: rearranged contacts section for events * fix: moved messages const to top --------- Co-authored-by: Martina Bustacchini <41484878+deodorhunter@users.noreply.github.com>
- Loading branch information
1 parent
a56b5dd
commit da10636
Showing
13 changed files
with
102 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 1 addition & 12 deletions
13
src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 1 addition & 12 deletions
13
src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreInterno.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/components/ItaliaTheme/View/EventoView/EventoOrganizzatoDa.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { defineMessages, useIntl } from 'react-intl'; | ||
import { richTextHasContent } from 'design-comuni-plone-theme/components/ItaliaTheme/View'; | ||
import EventoContattiOrganizzatoreInterno from 'design-comuni-plone-theme/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreInterno'; | ||
import EventoContattiOrganizzatoreEsterno from 'design-comuni-plone-theme/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno'; | ||
|
||
const messages = defineMessages({ | ||
organizzato_da: { | ||
id: 'organizzato_da', | ||
defaultMessage: 'Organizzato da', | ||
}, | ||
}); | ||
|
||
const EventoOrganizzatoDa = ({ content }) => { | ||
const intl = useIntl(); | ||
|
||
return content?.organizzato_da_interno?.length > 0 || | ||
richTextHasContent(content?.organizzato_da_esterno) || | ||
content?.telefono || | ||
content?.email || | ||
content?.fax ? ( | ||
<div className="mb-5 mt-3"> | ||
<h3 className="h5 mb-3">{intl.formatMessage(messages.organizzato_da)}</h3> | ||
|
||
{content?.organizzato_da_interno.length > 0 && ( | ||
<EventoContattiOrganizzatoreInterno content={content} /> | ||
)} | ||
|
||
{(richTextHasContent(content?.organizzato_da_esterno) || | ||
content?.telefono || | ||
content?.email || | ||
content?.fax) && ( | ||
<EventoContattiOrganizzatoreEsterno content={content} /> | ||
)} | ||
</div> | ||
) : null; | ||
}; | ||
|
||
export default EventoOrganizzatoDa; |
38 changes: 38 additions & 0 deletions
38
src/components/ItaliaTheme/View/EventoView/EventoPatrocinatoDa.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { defineMessages, useIntl } from 'react-intl'; | ||
import { Card, CardBody } from 'design-react-kit'; | ||
|
||
import { | ||
richTextHasContent, | ||
RichText, | ||
} from 'design-comuni-plone-theme/components/ItaliaTheme/View'; | ||
|
||
const messages = defineMessages({ | ||
patrocinato_da: { | ||
id: 'patrocinato_da', | ||
defaultMessage: 'Patrocinato da', | ||
}, | ||
}); | ||
|
||
const EventoPatrocinatoDa = ({ content }) => { | ||
const intl = useIntl(); | ||
return richTextHasContent(content?.patrocinato_da) ? ( | ||
<div className="mb-5"> | ||
<h3 className="mt-4 patrocinato-da h5"> | ||
{intl.formatMessage(messages.patrocinato_da)} | ||
</h3> | ||
<Card | ||
className="card card-teaser rounded shadow mt-3" | ||
noWrapper={true} | ||
tag="div" | ||
> | ||
<CardBody tag="div" className={'card-body pe-3'}> | ||
<div className="mb-5"> | ||
<RichText data={content?.patrocinato_da} /> | ||
</div> | ||
</CardBody> | ||
</Card> | ||
</div> | ||
) : null; | ||
}; | ||
|
||
export default EventoPatrocinatoDa; |
Oops, something went wrong.