feat: sous-pages — parent_id, sidebar hiérarchique, bouton +New sub-page
FlowDeck CI / test (push) Failing after 3s
FlowDeck CI / docker (push) Has been skipped

- 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:
2026-07-08 16:07:25 -04:00
parent b826cfc247
commit 4c49d43c66
5 changed files with 57 additions and 8 deletions
+7 -1
View File
@@ -71,7 +71,13 @@ async def view_page_root(request: Request, page_id: int):
parts = ws.split("/") if "/" in ws else ["", ""]
owner, repo = parts[0], parts[1] if len(parts) > 1 else ""
sidebar = board_sidebar(request, owner, repo)
ctx = {**sidebar, "page": page}
# Load sub-pages
with get_conn() as conn:
subs = conn.execute(
"SELECT id, title FROM pages WHERE parent_id=? ORDER BY updated_at DESC",
(page_id,),
).fetchall()
ctx = {**sidebar, "page": page, "sub_pages": [dict(s) for s in subs]}
template = env.get_template("page_editor.html")
return template.render(**ctx)