Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/_static/icons/contents.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/how-to-guides/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ icons
configure-plate-code-block-languages
bind-metadata-fields-to-plate-text-blocks
custom-content-types
manage-folder-contents-in-bulk
```
83 changes: 83 additions & 0 deletions docs/how-to-guides/manage-folder-contents-in-bulk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
myst:
html_meta:
"description": "How to rename, change state, tag, and edit properties for one or more items in the Plone Aurora folder contents view"
"property=og:description": "How to rename, change state, tag, and edit properties for one or more items in the Plone Aurora folder contents view"
"property=og:title": "Manage folder contents in bulk"
"keywords": "Plone Aurora, contents, rename, workflow, tags, properties, bulk"
---

# Manage folder contents in bulk

This guide shows you how to rename items, change their workflow state, edit their tags, and edit their properties from the folder contents view.
Each action works on one or several items at once.

## Open the folder contents view

Navigate to a folder, then select the {guilabel}`Contents` button <img alt="Contents" src="../_static/icons/contents.svg" class="inline"> in the toolbar.
The view lists the items in the folder together with a toolbar of actions.

## Select the items to act on

To select items to act on, check their checkboxes in the first column.
To either select or deselect all items on the current page, check the checkbox in the table header.

The {guilabel}`Rename`, {guilabel}`Change state`, {guilabel}`Tags`, and {guilabel}`Properties` actions stay disabled until you select at least one item.
Each action applies to the current selection.

## Rename items

1. Select the items to rename.
2. Select {guilabel}`Rename` in the toolbar.
3. Edit the {guilabel}`Name`, the {guilabel}`URL`, or both for each item in the dialog.
4. Select the {guilabel}`` button to apply the changes.

The {guilabel}`Name` is the title of the item.
The {guilabel}`URL` is the last segment of the item's URL.

````{note}
Changing the {guilabel}`URL` changes the item's URL.
Aurora automatically redirects the old URL to the new one, so existing links and bookmarks keep working.
```{todo}
Document the URL management control panel once it is available.
See [URL management: redirect control panel + documentation](https://github.com/plone/aurora/issues/121).
```
````

## Change the workflow state

1. Select the items whose state you want to change.
2. Select {guilabel}`Change state` in the toolbar.
3. Choose a transition from the list.
4. Optionally add a comment.
5. Optionally select {guilabel}`Apply to contained items` to apply the transition recursively.
6. Select the {guilabel}`` button to apply the transition.

The list offers only the transitions that are available for every selected item.
If the selected items share no common transition, the dialog tells you so, and you can't apply a transition.

## Edit tags

1. Select the items to tag.
2. Select {guilabel}`Tags` in the toolbar.
3. Remove a tag by selecting the {guilabel}`×` next to it.
Comment thread
stevepiercy marked this conversation as resolved.
4. Add a tag by typing it in the input and pressing {kbd}`Enter`.
5. Select {guilabel}`Save tags` to apply the changes.

The field shows the tags already present on the selection.
The input suggests existing tags from the site.
Adding a tag applies it to every selected item, and removing a tag removes it from every selected item.

## Edit properties

1. Select the items whose properties you want to edit.
2. Select {guilabel}`Properties` in the toolbar.
3. Edit any of the {guilabel}`Publishing date`, {guilabel}`Expiration date`, {guilabel}`Rights`, {guilabel}`Creators`, or {guilabel}`Exclude from navigation`.
4. Select the {guilabel}`` button to apply the changes.

The dialog saves only the fields you change.
Fields you leave untouched keep their current values on each item.

When you select several items whose values differ for a field, that field shows {guilabel}`Mixed values`.
Leave it untouched to keep each item's own value, or set a value to apply it to every selected item.
1 change: 1 addition & 0 deletions packages/client/news/+update-subjects.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allowed `updateContent` to set the `subjects` (tags) field. @nils-pzr
1 change: 1 addition & 0 deletions packages/client/news/+workflow-transition.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added an optional `transition` argument to `createWorkflow` so any workflow transition can be triggered, not only `publish`. @nils-pzr
8 changes: 6 additions & 2 deletions packages/client/src/restapi/workflow/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,19 @@ import type { RequestResponse } from '../types';

export const createWorkflowArgsSchema = z.object({
path: z.string(),
transition: z.string().optional(),
data: createWorkflowDataSchema.optional(),
});

export type CreateWorkflowArgs = z.infer<typeof createWorkflowArgsSchema>;

export async function createWorkflow(
this: PloneClient,
{ path, data }: CreateWorkflowArgs,
{ path, transition, data }: CreateWorkflowArgs,
): Promise<RequestResponse<CreateWorkflowResponse>> {
const validatedArgs = createWorkflowArgsSchema.parse({
path,
transition,
data,
});

Expand All @@ -26,7 +28,9 @@ export async function createWorkflow(
config: this.config,
};

const workflowPath = `${validatedArgs.path}/@workflow/publish`;
const workflowPath = `${validatedArgs.path}/@workflow/${
validatedArgs.transition ?? 'publish'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not make this optional in the schema and would not have a fallback here. Thoughts @sneridagh ?

@sneridagh sneridagh Jun 12, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pnicolli certainly not optional, and clearly an overlook from the original implementation. However, now I am confused. It's createXXX because it's POST? We are not creating a workflow, right? meh... we should review some of the names, although now I remember that the policy was to match the plone.restapi naming schema so one can relate to what endpoint makes reference.

No fallback either, it has no sense (again from the original implementation).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah then let's remove the optional and the fallback and make the transition parameter mandatory, and let's discuss possible renaming later.

}`;

return apiRequest('post', workflowPath, options);
}
1 change: 1 addition & 0 deletions packages/client/src/validation/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export const updateContentDataSchema = z
.optional(),
relatedItems: z.array(RelatedItemPayloadSchema).optional(),
rights: z.string().nullable().optional(),
subjects: z.array(z.string()).optional(),
table_of_contents: z.boolean().nullable().optional(),
title: z.string().optional(),
versioning_enabled: z.boolean().optional(),
Expand Down
8 changes: 4 additions & 4 deletions packages/contents/components/ContentsActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import { useContentsContext } from '../providers/contents';

type Props = {
upload: () => void | Promise<void>;
rename: () => Promise<void>;
workflow: () => Promise<void>;
tags: () => Promise<void>;
properties: () => Promise<void>;
rename: () => void | Promise<void>;
workflow: () => void | Promise<void>;
tags: () => void | Promise<void>;
properties: () => void | Promise<void>;
cut: (item?: Brain) => void;
copy: (item?: Brain) => void;
paste: () => Promise<void>;
Expand Down
27 changes: 13 additions & 14 deletions packages/contents/components/ContentsTable/ContentsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ interface ContentsTableProps {
indexes: TableIndexes;
onSelectIndex: (index: string) => void;
sortItems: (index: string) => void;
upload: () => Promise<void>;
rename: () => Promise<void>;
workflow: () => Promise<void>;
tags: () => Promise<void>;
properties: () => Promise<void>;
// cut: (item?: object) => Promise<void>;
// copy: (item?: object) => Promise<void>;
// paste: () => Promise<void>;
Expand All @@ -89,11 +84,6 @@ export function ContentsTable({
indexes: baseIndexes,
onSelectIndex,
sortItems,
upload,
rename,
workflow,
tags,
properties,
// cut,
// copy,
// paste,
Expand All @@ -111,6 +101,10 @@ export function ContentsTable({
setShowDelete,
setItemsToDelete,
setShowUpload,
setShowRename,
setShowWorkflow,
setShowTags,
setShowProperties,
showToast,
} = useContentsContext();
const fetcher = useFetcher();
Expand Down Expand Up @@ -169,6 +163,11 @@ export function ContentsTable({
setShowUpload(true);
};

const openRename = () => setShowRename(true);
const openWorkflow = () => setShowWorkflow(true);
const openTags = () => setShowTags(true);
const openProperties = () => setShowProperties(true);

const orderItem = async (id: string, delta: number | 'bottom' | 'top') => {
await fetcher.submit(
{
Expand Down Expand Up @@ -547,10 +546,10 @@ export function ContentsTable({
{!isMobileScreenSize && (
<ContentsActions
upload={openUpload}
rename={rename}
workflow={workflow}
tags={tags}
properties={properties}
rename={openRename}
workflow={openWorkflow}
tags={openTags}
properties={openProperties}
cut={cut}
copy={copy}
paste={paste}
Expand Down
Loading
Loading