Skip to content

Commit

Permalink
PRO-7053: hide importDraftsOnly checkbox for autopublished docs (#102)
Browse files Browse the repository at this point in the history
* hide importDraftsOnly option

* changelog

---------

Co-authored-by: Etienne Laurent <[email protected]>
  • Loading branch information
ETLaurent and Etienne Laurent authored Feb 10, 2025
1 parent 926e3d8 commit 2d53055
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## UNRELEASED

### Changes

* Hide the `importDraftsOnly` checkbox for autopublished documents.

### Adds

* Adds a method to sort all exported documents, makes sure that parent pages come always first.
Expand Down
8 changes: 7 additions & 1 deletion ui/apos/components/AposImportModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@
class="apos-import__warning"
:modifiers="[ 'apos-is-warning', 'apos-is-filled' ]"
/>
<div class="apos-import__import-drafts-only-wrapper">
<div
v-if="showImportDraftsOnlyOption"
class="apos-import__import-drafts-only-wrapper"
>
<AposCheckbox
v-model="checked"
class="apos-import__import-drafts-only"
Expand Down Expand Up @@ -127,6 +130,9 @@ export default {
// likely empty).
return this.$t(apos.modules[this.moduleName]?.label ?? this.labels.plural);
},
showImportDraftsOnlyOption() {
return apos.modules[this.moduleName]?.autopublish !== true;
},
formats() {
return apos.modules['@apostrophecms/import-export'].formats;
},
Expand Down

0 comments on commit 2d53055

Please sign in to comment.