Content: publish/hide chapters, sections and articles
- migration V5 adds published flag (default true) to chapters/sections/articles
- ContentService: tree(includeHidden) filters, treeAll(), findArticle(includeHidden),
set*Published; public tree/article expose only published items
- admin API: GET /tree/all, GET /all/{chapter}/{section}/{article}, PUT
/{chapters|sections|articles}/{id}/published
- web: learn pages for admins load the full tree, show "скрыто" badges and
publish/hide buttons for every chapter, section and article; hidden articles
open in preview for admins, guests get "not found"; article view carries
published flag
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
-- Публикация учебных материалов: главы, разделы и статьи можно скрывать от студентов.
|
||||
ALTER TABLE chapters ADD COLUMN published boolean NOT NULL DEFAULT true;
|
||||
ALTER TABLE sections ADD COLUMN published boolean NOT NULL DEFAULT true;
|
||||
ALTER TABLE articles ADD COLUMN published boolean NOT NULL DEFAULT true;
|
||||
Reference in New Issue
Block a user