Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add batch operations to pages #4684

Merged
merged 35 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
31c3d84
add batch operations to pages
haroun Aug 9, 2024
c17bd83
add command menu shortcut and compose filters
haroun Aug 12, 2024
0d486e6
add missing await
haroun Aug 12, 2024
1e9ce3f
sync with piece type logic
haroun Aug 12, 2024
0ffcbf5
use updateCheckedDocs from the manager mixin for labelling
haroun Aug 12, 2024
4240c18
add batch operations permission
haroun Aug 12, 2024
802c0ac
handle batch operations and translate notification type
haroun Aug 13, 2024
3fe083c
update batch operation label with i18n keys
haroun Aug 14, 2024
ea86a09
add test for batch archive on pages
haroun Aug 15, 2024
be8d3ab
move child pages first and archive parent after
haroun Aug 16, 2024
c23afca
almost there with partial archive
haroun Aug 16, 2024
3614b4f
add batch restore
haroun Aug 19, 2024
eb1ae23
test restore
haroun Aug 20, 2024
4db264c
update path for archived pages
haroun Aug 20, 2024
e8549b8
keep slugs and remove console
haroun Aug 21, 2024
71dd758
remove only
haroun Aug 21, 2024
def432c
remove todo
haroun Aug 21, 2024
1a9d6f8
refactor to get patches
haroun Aug 21, 2024
174a3bf
Merge branch 'main' into pro-6425-batch-operation-page
haroun Aug 21, 2024
c1431fb
sort properties and fix display issues
haroun Aug 23, 2024
fe03bd4
fix label
haroun Aug 23, 2024
9cee0d5
link to draft in edit mode
haroun Aug 23, 2024
722cb38
use pages instead of items
haroun Aug 23, 2024
13e42cd
switch items to pagesFlat instead of pages
haroun Aug 23, 2024
d152ac7
remove debounce-async and fix function typo
haroun Aug 26, 2024
e3886dd
remove debug
haroun Aug 26, 2024
24f3f58
always notify before navigate
haroun Aug 26, 2024
3a47f31
fix page tree for per document permissions users
haroun Aug 26, 2024
b4c7dbb
await notify calls
haroun Aug 27, 2024
c2b4e63
Merge branch 'main' into pro-6425-batch-operation-page
haroun Aug 28, 2024
e98fc90
update changelog
haroun Aug 28, 2024
adfa4bd
add fix info
haroun Aug 28, 2024
6d419a0
add missing async
haroun Sep 2, 2024
3d614c8
PRO-6436: send checked types (#4711)
myovchev Sep 3, 2024
38b4285
Merge branch 'main' into pro-6425-batch-operation-page
haroun Sep 3, 2024
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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@
* Add option `skipReplace` for `apos.doc.changeDocIds` method to skip the replacing of the "old" document in the database.
* The `@apostrophecms/i18n` module now exposes a `locales` HTTP GET API to aid in implementation of native apps for localized sites.
* Context menus can be supplied a `menuId` so that interested components can listen to their opening/closing.
* Add batch operations to pages.
* Add shortcuts to pages manager.

### Changes

* Wait for notify before navigating to a new page.

### Fixes

* Fix link to pages in rich-text not showing UI to select page during edit.

## 4.6.1 (2024-08-26)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ export default {
body: {},
busy: true
});
apos.notify('apostrophe:restoredPrevious', {
await apos.notify('apostrophe:restoredPrevious', {
type: 'success',
dismiss: true
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -610,18 +610,15 @@ export default {
async onSaveDraft({ navigate = false } = {}) {
await this.save({
andPublish: false,
draft: true,
navigate
});
await apos.notify('apostrophe:draftSaved', {
type: 'success',
dismiss: true,
icon: 'file-document-icon'
});
},
async save({
andPublish = false,
navigate = false,
andSubmit = false,
draft = false,
keepOpen = false
}) {
const body = this.getRequestBody({ update: Boolean(this.currentId) });
Expand Down Expand Up @@ -668,6 +665,13 @@ export default {
this.$emit('modal-result', doc);
this.modal.showModal = false;
}
if (draft) {
await apos.notify('apostrophe:draftSaved', {
type: 'success',
dismiss: true,
icon: 'file-document-icon'
});
}
if (navigate) {
if (doc._url) {
window.location = doc._url;
Expand Down
6 changes: 6 additions & 0 deletions modules/@apostrophecms/i18n/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@
"back": "Back",
"backToHome": "Back to Home",
"basics": "Basics",
"batchArchiveProgress": "Archiving {{ type }}...",
"batchArchiveCompleted": "Archived {{ count }} {{ type }}.",
"batchPublishProgress": "Publishing {{ type }}...",
"batchPublishCompleted": "Published {{ count }} {{ type }}.",
"batchRestoreProgress": "Restoring {{ type }}...",
"batchRestoreCompleted": "Restored {{ count }} {{ type }}.",
"browseDocType": "Browse {{ type }}",
"cancel": "Cancel",
"cannotChangeSlugPrefix": "cannot change the slug prefix",
Expand Down
2 changes: 1 addition & 1 deletion modules/@apostrophecms/job/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ module.exports = {
return self.apos.notification.trigger(req, req.body.messages[stage], {
interpolate: {
count: options.count || (req.body._ids && req.body._ids.length),
type: req.body.type || req.t('apostrophe:document')
type: req.t(req.body.type) || req.t('apostrophe:document')
},
dismiss: options.dismiss,
job: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ function close() {
:deep(.apos-modal__controls--primary) {
& > .apos-button__wrapper,
& > .apos-context-menu {
margin-right: 7.5px;
margin-left: 7.5px;
}
}
Expand Down
Loading
Loading