feat: sous-pages — parent_id, sidebar hiérarchique, bouton +New sub-page
- DB: parent_id dans table pages (ALTER TABLE migration auto) - Sidebar: pages parent_id IS NULL affichées, sous-pages indentées en dessous - API: create_page accepte parent_id (0 = racine) - JS: newSubPage extrait page ID et passe parent_id - page_editor: liste les sous-pages + bouton '+ New sub-page'
This commit is contained in:
@@ -436,7 +436,8 @@
|
||||
},
|
||||
newSubPage(parentId) {
|
||||
const project = this.workspaceKey || '';
|
||||
fetch(`/board/api/pages?title=New%20page§ion=Private&project=${encodeURIComponent(project)}`, {
|
||||
const pid = parentId.replace('page/', '');
|
||||
fetch(`/board/api/pages?title=New%20sub-page§ion=Private&project=${encodeURIComponent(project)}&parent_id=${pid}`, {
|
||||
method: 'POST',
|
||||
headers: { 'X-CSRF-Token': this.getCsrfToken() }
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user