diff --git a/backend/src/ploneconf.core/src/ploneconf/core/vocabularies/sponsorship.py b/backend/src/ploneconf.core/src/ploneconf/core/vocabularies/sponsorship.py index 745c572..5adab20 100644 --- a/backend/src/ploneconf.core/src/ploneconf/core/vocabularies/sponsorship.py +++ b/backend/src/ploneconf.core/src/ploneconf/core/vocabularies/sponsorship.py @@ -5,6 +5,7 @@ LEVELS = [ + ("patron", "Patronage"), ("diamond", "Diamond"), ("platinum", "Platinum"), ("gold", "Gold"), @@ -12,7 +13,6 @@ ("bronze", "Bronze"), ("supporting", "Supporting"), ("oss", "Open Source"), - ("patron", "Patronage"), ("organizer", "Organized by"), ] diff --git a/frontend/src/addons/volto-conf2023-theme/src/components/Blocks/Listing/PersonsSimpleListingBody.jsx b/frontend/src/addons/volto-conf2023-theme/src/components/Blocks/Listing/PersonsSimpleListingBody.jsx index 5062c69..90eac5e 100644 --- a/frontend/src/addons/volto-conf2023-theme/src/components/Blocks/Listing/PersonsSimpleListingBody.jsx +++ b/frontend/src/addons/volto-conf2023-theme/src/components/Blocks/Listing/PersonsSimpleListingBody.jsx @@ -7,6 +7,7 @@ import { isInternalURL } from '@plone/volto/helpers/Url/Url'; import { Icon } from '@plone/volto/components'; import githubSVG from '../../../icons/github.svg'; import twitterSVG from '../../../icons/twitter.svg'; +import { Grid } from 'semantic-ui-react'; import { PreviewImage } from '@plone/volto/components'; @@ -33,42 +34,44 @@ const PersonsSimpleListingBody = ({ return ( <> -
+ {items.map((item) => ( -
- -
- -
-
-

{item.title ? item.title : item.id}

-
- {item.github && ( - e.stopPropagation()} - > - - - )} + +
+ +
+ +
+
+

{item.title ? item.title : item.id}

+
+ {item.github && ( + e.stopPropagation()} + > + + + )} - {item.twitter && ( - e.stopPropagation()} - > - - - )} + {item.twitter && ( + e.stopPropagation()} + > + + + )} +
-
- -
+ +
+ ))} -
+
{link &&
{link}
} diff --git a/frontend/src/addons/volto-conf2023-theme/src/components/Blocks/Listing/TalksListingBody.jsx b/frontend/src/addons/volto-conf2023-theme/src/components/Blocks/Listing/TalksListingBody.jsx index 68df8e5..e8cbebb 100644 --- a/frontend/src/addons/volto-conf2023-theme/src/components/Blocks/Listing/TalksListingBody.jsx +++ b/frontend/src/addons/volto-conf2023-theme/src/components/Blocks/Listing/TalksListingBody.jsx @@ -3,14 +3,12 @@ import PropTypes from 'prop-types'; import { ConditionalLink } from '@plone/volto/components'; import { flattenToAppURL } from '@plone/volto/helpers'; import cx from 'classnames'; -import DefaultImageSVG from '@plone/volto/components/manage/Blocks/Listing/default-image.svg'; import { isInternalURL } from '@plone/volto/helpers/Url/Url'; -import { Popup } from 'semantic-ui-react'; +import PresentersInfo from '../../../components/Session/PresentersInfo/PresentersInfo'; const TalksListingBody = ({ items, linkTitle, linkHref, isEditMode }) => { let link = null; let href = linkHref?.[0]?.['@id'] || ''; - if (isInternalURL(href)) { link = ( @@ -55,28 +53,7 @@ const TalksListingBody = ({ items, linkTitle, linkHref, isEditMode }) => { /> )}
-
- {item?.presenters?.map((speaker) => ( - - {!speaker?.image && ( - - )} - {speaker?.image && ( - {item.title} - )} -
- } - position="top center" - > - {speaker.title} - - ))} - + ))} diff --git a/frontend/src/addons/volto-conf2023-theme/src/components/Blocks/SearchBlock/FiltersModal.jsx b/frontend/src/addons/volto-conf2023-theme/src/components/Blocks/SearchBlock/FiltersModal.jsx new file mode 100644 index 0000000..e74043b --- /dev/null +++ b/frontend/src/addons/volto-conf2023-theme/src/components/Blocks/SearchBlock/FiltersModal.jsx @@ -0,0 +1,86 @@ +import React from 'react'; +import { Modal, TransitionablePortal } from 'semantic-ui-react'; +import { Button, Icon } from 'semantic-ui-react'; +import { isEmpty } from 'lodash'; + +function FiltersModal(props) { + let { children, size = 'fullscreen', data, facets = {} } = props; + const [open, setOpen] = React.useState(false); + const definedFacets = data.facets || []; + + function openModal() { + setOpen(true); + } + function closeModal() { + setOpen(false); + } + const totalFilters = definedFacets.filter( + ({ field }) => + field && + Object.keys(facets).includes(field.value) && + !isEmpty(facets[field.value]), + ).length; + const totalfiltertext = totalFilters ? ' ' + totalFilters : ''; + return ( + <> + + + closeModal()} + > +
+
+
+
+
+

{data.facetsTitle}

+
+
+
+ closeModal()} + onKeyDown={() => closeModal()} + tabIndex="0" + role="button" + > +
+
+
+
+
+
+ {children} +
+
+
+ +
+
+
+
+
+
+
+ + ); +} + +export default FiltersModal; diff --git a/frontend/src/addons/volto-conf2023-theme/src/components/Blocks/SearchBlock/PloneConfFacets.jsx b/frontend/src/addons/volto-conf2023-theme/src/components/Blocks/SearchBlock/PloneConfFacets.jsx new file mode 100644 index 0000000..0b5fc2e --- /dev/null +++ b/frontend/src/addons/volto-conf2023-theme/src/components/Blocks/SearchBlock/PloneConfFacets.jsx @@ -0,0 +1,128 @@ +import { Button, Grid, Segment } from 'semantic-ui-react'; +import { Facets } from '@plone/volto/components/manage/Blocks/Search/components'; +import { defineMessages, useIntl } from 'react-intl'; +import FiltersModal from './FiltersModal'; +import SearchInput from '@plone/volto/components/manage/Blocks/Search/components/SearchInput'; +import React from 'react'; +import { flushSync } from 'react-dom'; + +const messages = defineMessages({ + searchButtonText: { + id: 'Search', + defaultMessage: 'Search', + }, +}); + +const FacetWrapper = ({ children }) => ( + + {children} + +); + +function setFacetsHandler(setFacets, onTriggerSearch, searchedText) { + return (f) => { + flushSync(() => { + setFacets(f); + onTriggerSearch(searchedText || '', f); + }); + }; +} + +const PloneConfFacets = (props) => { + const { + children, + data, + facets, + setFacets, + onTriggerSearch, + searchedText, // search text for previous search + searchText, // search text currently being entered (controlled input) + isEditMode, + querystring = {}, + // searchData, + // mode = 'view', + // variation, + } = props; + const { showSearchButton } = data; + const isLive = !showSearchButton; + const intl = useIntl(); + if (querystring?.sortable_indexes?.effective?.title) { + querystring.sortable_indexes.effective.title = 'Publication date'; + } + if (querystring?.sortable_indexes?.sortable_title?.title) { + querystring.sortable_indexes.sortable_title.title = 'Sort by title'; + } + if (querystring?.sortable_indexes?.modified?.title) { + querystring.sortable_indexes.modified.title = 'Last edited'; + } + return ( + + {data?.headline && ( + + + {data.headline &&

{data.headline}

} +
+
+ )} + +
+ {(Object.keys(data).includes('showSearchInput') + ? data.showSearchInput + : true) && ( +
+ + {data.showSearchButton && ( + + )} +
+ )} +
+
+ {data.facets?.length && ( + +
+ +
+
+ )} +
+
+
+ + + {children} + + +
+ ); +}; + +export default PloneConfFacets; diff --git a/frontend/src/addons/volto-conf2023-theme/src/components/Session/PresentersInfo/PresentersInfo.jsx b/frontend/src/addons/volto-conf2023-theme/src/components/Session/PresentersInfo/PresentersInfo.jsx index 9ccd2f0..f18b290 100644 --- a/frontend/src/addons/volto-conf2023-theme/src/components/Session/PresentersInfo/PresentersInfo.jsx +++ b/frontend/src/addons/volto-conf2023-theme/src/components/Session/PresentersInfo/PresentersInfo.jsx @@ -6,9 +6,6 @@ import React from 'react'; import { flattenToAppURL } from '@plone/volto/helpers'; import DefaultImageSVG from '@plone/volto/components/manage/Blocks/Listing/default-image.svg'; -import { Icon } from '@plone/volto/components'; -import githubSVG from '../../../icons/github.svg'; -import twitterSVG from '../../../icons/twitter.svg'; import { Link } from 'react-router-dom'; import PropTypes from 'prop-types'; import { Popup } from 'semantic-ui-react'; @@ -17,13 +14,13 @@ const PresentersInfo = (props) => { const content = props.content; const presenters = content.presenters; return ( -
+
{presenters?.map((item) => ( -
+
+
{!item?.image?.download && ( )} @@ -39,35 +36,6 @@ const PresentersInfo = (props) => { > {item.title ? item.title : item.id} - -
- -
))} diff --git a/frontend/src/addons/volto-conf2023-theme/src/components/Session/ScheduleInfo/ScheduleInfo.jsx b/frontend/src/addons/volto-conf2023-theme/src/components/Session/ScheduleInfo/ScheduleInfo.jsx index 260adae..8f42f82 100644 --- a/frontend/src/addons/volto-conf2023-theme/src/components/Session/ScheduleInfo/ScheduleInfo.jsx +++ b/frontend/src/addons/volto-conf2023-theme/src/components/Session/ScheduleInfo/ScheduleInfo.jsx @@ -19,7 +19,7 @@ const ScheduleInfo = (props) => {
{start && ( - Date:{' '} + Date:{' '} {' '} @@ -32,7 +32,7 @@ const ScheduleInfo = (props) => { )} {track?.length > 0 && ( - Track:{' '} + Track:{' '} {track.map((item) => (