summaryrefslogtreecommitdiff
path: root/app/models/node.rb
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-12 02:15:44 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-12 02:15:44 +0200
commit45bf65d04d046c0ea4a1150096b2a9b846d6c0b8 (patch)
tree24dad426779cb3b0ac59c405245aac1d28109982 /app/models/node.rb
parent13c8cb415813e90c883a44b0c0888382161de92a (diff)
Give the sitemap its own view, with collapse and descendant counts
Extracted from admin#index's inline table into NodesController#sitemap. Nested <details>/<summary> per branch, one linear pass over the existing flat [node, level] list (no added queries) -- each node's own descendant count computed the same way, via a small stack rather than re-walking the tree per node. Branches under updates/, club/erfas, club/chaostreffs, and disclosure start collapsed by default (CccConventions::SITEMAP_COLLAPSED_PATHS); any branch currently collapsed, whether by that default or because someone just closed it, is highlighted via a plain :not([open]) selector -- no state tracked outside the DOM itself. Dropped the update?-post exclusion this view used to rely on -- no longer needed now that updates/ collapses instead of being filtered out, so its real children (previously silently absent) now show up correctly. admin#index's own, separate @sitemap query is unchanged; that view has no collapse mechanism to compensate and wasn't part of this.
Diffstat (limited to 'app/models/node.rb')
0 files changed, 0 insertions, 0 deletions