summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-05 21:52:11 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-05 21:52:11 +0200
commit9a7ce465b06462443ee82e8418f3c070de080ab2 (patch)
treebf68ecc1536af990604cd58e75417073a07f0d1a /config
parent51d491a3d67e8c9efde8019ecb8a8e1a8195ec99 (diff)
Surface node-kind conventions in the admin UI
nodes#new: each kind's radio button now shows a label plus a smaller, muted .field_hint explaining what happens automatically (parent, tags, template) - previously a single undifferentiated string mixing a short label with a long parenthetical, cluttering the smaller kinds (erfa/chaostreff) worst. Title field gets the same hint treatment, telling editors up front that the slug is auto-generated and where to adjust it later - the previous silence here meant editors only discovered slug generation after already committing to a title, with no visible way to fix it. New "Resulting path" row live-previews the full URL (origin + kind's path prefix + a debounced call to the new parameterize_preview route, reusing the exact same slug_for helper "create" now calls, so the preview can never diverge from what actually gets created) as the editor types, plus a copy-to-clipboard button. For "generic", the prefix comes from whichever parent gets chosen via the search widget, not the registry - parent_search.link_closure now stashes the chosen node's unique_name as a data attribute for exactly this. New read-only admin/conventions view dumps the NODE_KINDS registry as a reference table for whoever's confused later about how a given kind behaves - deliberately just renders the same label/hint text used on nodes#new rather than re-describing parent/tags/template separately, since decomposing the parent Proc would mean either invoking it (Update's has a real side effect - creates the year folder) or re-stating its logic a second time in a different shape, either of which risks drifting from the actual behavior. nodes#edit's Template field gets a one-line hint noting the value may already be pre-filled based on how the node was created - the one place the previous commit's new inheritance mechanism actually surfaces on this view.
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/config/routes.rb b/config/routes.rb
index cf4733c..6c07414 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -59,6 +59,7 @@ Cccms::Application.routes.draw do
59 match 'admin' => 'admin#index', :as => :admin, :via => :get 59 match 'admin' => 'admin#index', :as => :admin, :via => :get
60 match 'admin/search' => 'admin#search', :as => :admin_search, :via => :get 60 match 'admin/search' => 'admin#search', :as => :admin_search, :via => :get
61 match 'admin/menu_search' => 'admin#menu_search', :as => :admin_menu_search, :via => :get 61 match 'admin/menu_search' => 'admin#menu_search', :as => :admin_menu_search, :via => :get
62 match 'admin/conventions' => 'admin#conventions', :as => :admin_conventions, :via => :get
62 match 'search' => 'search#index', :as => :search, :via => :get 63 match 'search' => 'search#index', :as => :search, :via => :get
63 64
64 resources :users 65 resources :users