Skip to content

Commit

Permalink
fix(ui): add show description to folder schema
Browse files Browse the repository at this point in the history
  • Loading branch information
RaneHyv committed Feb 22, 2024
1 parent fdcb6ee commit 4c45621
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions frontend/src/components/blocks/Listing/ListingTemplate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const ListingTemplate = (props) => {
linkHref,
showDescription = false,
isEditMode,
isFolder = false,
folderShowDescription = false,
} = props;

let link = null;
Expand Down Expand Up @@ -72,7 +72,10 @@ const ListingTemplate = (props) => {
className="listing-column"
key={i}
>
<Card item={item} showDescription={showDescription || isFolder} />
<Card
item={item}
showDescription={showDescription || folderShowDescription}
/>
</Grid.Column>
))}
</Grid>
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/components/theme/View/ListingView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ import { BodyClass } from '@plone/volto/helpers';
import { Container } from 'semantic-ui-react'; // Segment,

const ListingView = ({ content, location: { pathname } }) => {
const { show_description: folderShowDescription } = content || {};

return (
<Container id="page-folder">
<BodyClass className="multiple-content-view" />
<section id="content-core">
<ListingBody
properties={content}
data={{ isFolder: true }}
data={{ folderShowDescription }}
path={pathname}
/>
</section>
Expand Down

0 comments on commit 4c45621

Please sign in to comment.