From 35cfbc97848bb2109a849eaf4d2deaa3300e179e Mon Sep 17 00:00:00 2001 From: Matthias Barde Date: Wed, 15 May 2024 15:46:57 +0200 Subject: [PATCH] Purge model_source property from Person.xml --- backend/src/plone/edu/profiles/default/types/Person.xml | 5 +++++ frontend/src/components/Views/Person.jsx | 5 +++++ frontend/src/config.js | 3 +++ 3 files changed, 13 insertions(+) create mode 100644 frontend/src/components/Views/Person.jsx diff --git a/backend/src/plone/edu/profiles/default/types/Person.xml b/backend/src/plone/edu/profiles/default/types/Person.xml index 816fd14..397c079 100644 --- a/backend/src/plone/edu/profiles/default/types/Person.xml +++ b/backend/src/plone/edu/profiles/default/types/Person.xml @@ -10,4 +10,9 @@ + + <model xmlns:i18n="http://xml.zope.org/namespaces/i18n" xmlns:marshal="http://namespaces.plone.org/supermodel/marshal" xmlns:form="http://namespaces.plone.org/supermodel/form" xmlns:security="http://namespaces.plone.org/supermodel/security" xmlns:indexer="http://namespaces.plone.org/supermodel/indexer" xmlns:lingua="http://namespaces.plone.org/supermodel/lingua" xmlns:users="http://namespaces.plone.org/supermodel/users" xmlns="http://namespaces.plone.org/supermodel/schema"> + <schema> + </schema> + </model> diff --git a/frontend/src/components/Views/Person.jsx b/frontend/src/components/Views/Person.jsx new file mode 100644 index 0000000..94276ce --- /dev/null +++ b/frontend/src/components/Views/Person.jsx @@ -0,0 +1,5 @@ +const PersonView = ({ content }) => { + return

{content.title}

; +}; + +export default PersonView; diff --git a/frontend/src/config.js b/frontend/src/config.js index 259bec5..d12f7dd 100644 --- a/frontend/src/config.js +++ b/frontend/src/config.js @@ -12,11 +12,14 @@ // [Internal] All the imports of modules required for the configuration *must* happen // here BEFORE the following line import AffiliationWidget from '@package/components/Widgets/Affiliation/AffiliationWidget'; +import PersonView from '@package/components/Views/Person'; import '@plone/volto/config'; export default function applyConfig(config) { config.widgets.widget.affiliation_widget = AffiliationWidget; + config.views.contentTypesViews.Person = PersonView; + return config; }