Skip to content

Commit 3b4c8f6

Browse files
authored
Merge pull request #1966 from umbraco/v14/bugfix/implement-folders-only-for-duplicate-to
Feature: implement folders only for duplicate to
2 parents 0e2da4c + 1cdbacd commit 3b4c8f6

File tree

7 files changed

+12
-1
lines changed

7 files changed

+12
-1
lines changed

src/packages/core/extension-registry/models/entity-action.model.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ export interface MetaEntityActionDuplicateToKind extends MetaEntityActionDefault
122122
duplicateRepositoryAlias: string;
123123
treeRepositoryAlias: string;
124124
treeAlias: string;
125+
foldersOnly?: boolean;
125126
}
126127

127128
// MOVE TO

src/packages/core/tree/entity-actions/duplicate-to/duplicate-to.action.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export class UmbDuplicateToEntityAction extends UmbEntityActionBase<MetaEntityAc
1717
unique: this.args.unique,
1818
entityType: this.args.entityType,
1919
treeAlias: this.args.meta.treeAlias,
20+
foldersOnly: this.args.meta.foldersOnly,
2021
},
2122
});
2223

src/packages/core/tree/entity-actions/duplicate-to/modal/duplicate-to-modal.element.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ export class UmbDuplicateToModalElement extends UmbModalBaseElement<UmbDuplicate
2222
return html`
2323
<umb-body-layout headline="Duplicate">
2424
<uui-box>
25-
<umb-tree alias=${this.data.treeAlias} @selection-change=${this.#onTreeSelectionChange}></umb-tree>
25+
<umb-tree
26+
alias=${this.data.treeAlias}
27+
.props=${{
28+
foldersOnly: this.data?.foldersOnly,
29+
}}
30+
@selection-change=${this.#onTreeSelectionChange}></umb-tree>
2631
</uui-box>
2732
2833
${this.#renderActions()}

src/packages/core/tree/entity-actions/duplicate-to/modal/duplicate-to-modal.token.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { UmbModalToken } from '@umbraco-cms/backoffice/modal';
44

55
export interface UmbDuplicateToModalData extends UmbEntityModel {
66
treeAlias: string;
7+
foldersOnly?: boolean;
78
}
89

910
export interface UmbDuplicateToModalValue {

src/packages/data-type/entity-actions/duplicate/manifests.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const entityActions: Array<ManifestTypes> = [
1515
duplicateRepositoryAlias: UMB_DUPLICATE_DATA_TYPE_REPOSITORY_ALIAS,
1616
treeAlias: UMB_DATA_TYPE_TREE_ALIAS,
1717
treeRepositoryAlias: UMB_DATA_TYPE_TREE_REPOSITORY_ALIAS,
18+
foldersOnly: true,
1819
},
1920
},
2021
];

src/packages/documents/document-types/entity-actions/duplicate/manifests.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const entityActions: Array<ManifestTypes> = [
1515
duplicateRepositoryAlias: UMB_DUPLICATE_DOCUMENT_TYPE_REPOSITORY_ALIAS,
1616
treeAlias: UMB_DOCUMENT_TYPE_TREE_ALIAS,
1717
treeRepositoryAlias: UMB_DOCUMENT_TYPE_TREE_REPOSITORY_ALIAS,
18+
foldersOnly: true,
1819
},
1920
},
2021
];

src/packages/media/media-types/entity-actions/duplicate/manifests.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const entityActions: Array<ManifestTypes> = [
1515
duplicateRepositoryAlias: UMB_DUPLICATE_MEDIA_TYPE_REPOSITORY_ALIAS,
1616
treeAlias: UMB_MEDIA_TYPE_TREE_ALIAS,
1717
treeRepositoryAlias: UMB_MEDIA_TYPE_TREE_REPOSITORY_ALIAS,
18+
foldersOnly: true,
1819
},
1920
},
2021
];

0 commit comments

Comments
 (0)