summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-11 23:43:02 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-11 23:43:02 +0200
commit92c394b43a0603743b914c6298aab986805ca990 (patch)
tree39308770fbae5558d98a7def3d25802ed8083d81 /config
parent47beb3fe6ed6fdb75c2dd3a55362ad1aba3bbc3b (diff)
Add drafts/recent/mine/chapters admin node views
Four NodesController actions -- drafts, recent, mine, chapters -- each building its own base scope, sharing one private method (index_matching) for search narrowing and pagination. Wizard rewrite to link into these instead of rendering its own tables is a separate, later step. Node.editor_search backs the shared "q" narrowing: an ILIKE substring match against title/abstract on whichever of head or draft is present, splitting the term on whitespace and requiring every word to match somewhere independently, not as one phrase, since real words can end up separated by markup in the underlying HTML. Deliberately separate from Node.search, the public content search, which stays tsvector-based and head-only. chapters generalizes into /admin/nodes/tags/:tags for an arbitrary tag list (OR'd, not AND'd), sharing the controller action but rendering its own template rather than branching inside one view.
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/config/routes.rb b/config/routes.rb
index aebce90..2c165d2 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -37,7 +37,12 @@ Cccms::Application.routes.draw do
37 37
38 resources :nodes do 38 resources :nodes do
39 collection do 39 collection do
40 get 'tags/:tags', action: :tags, as: :tags, constraints: { tags: /[^\/]+/ }
40 get :parameterize_preview 41 get :parameterize_preview
42 get :drafts
43 get :recent
44 get :mine
45 get :chapters
41 end 46 end
42 47
43 member do 48 member do