From 92c394b43a0603743b914c6298aab986805ca990 Mon Sep 17 00:00:00 2001
From: erdgeist
Date: Sat, 11 Jul 2026 23:43:02 +0200
Subject: 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.
---
app/views/nodes/chapters.html.erb | 9 +++++++++
1 file changed, 9 insertions(+)
create mode 100644 app/views/nodes/chapters.html.erb
(limited to 'app/views/nodes/chapters.html.erb')
diff --git a/app/views/nodes/chapters.html.erb b/app/views/nodes/chapters.html.erb
new file mode 100644
index 0000000..939f19c
--- /dev/null
+++ b/app/views/nodes/chapters.html.erb
@@ -0,0 +1,9 @@
+
Chapters
+
+<%= form_tag chapters_nodes_path, method: :get do %>
+
+
+ <%= submit_tag "Filter", class: "action_button" %>
+<% end %>
+
+<%= render 'node_list' %>
--
cgit v1.3
From 848ce18303f927bfadaf0965a769cae2c62492a0 Mon Sep 17 00:00:00 2001
From: erdgeist
Date: Sun, 12 Jul 2026 23:43:02 +0200
Subject: Normalize action-button wording and add icons app-wide
"New X" becomes "Create X" throughout (users, events, assets, menu
items, nodes), matching the verb-first pattern the dashboard's own
signposts already established, with a shared plus icon rather than a
document-flavored one that only made sense next to "post". The
"Destroy"/"destroy"/"Delete" family is normalized to "Destroy"
everywhere, with a shared trash icon; occurrences#index and
pages#index also pick up the destructive button class they'd been
silently missing. Filter and Search convert from submit_tag to
button_tag, the only way either can hold an icon alongside its label.
Edit and the node editor's three dynamic labels (Continue Editing /
Edit Draft / Lock + Edit) share one icon without touching their
wording -- unlike Destroy's family, the state nuance in the text is
real information, not just inconsistent phrasing.
---
app/views/assets/index.html.erb | 8 ++++++--
app/views/assets/show.html.erb | 4 +++-
app/views/events/edit.html.erb | 6 ++++--
app/views/events/index.html.erb | 8 ++++++--
app/views/events/show.html.erb | 8 ++++++--
app/views/events/without_node.html.erb | 4 +++-
app/views/menu_items/index.html.erb | 11 +++++++----
app/views/nodes/_node_list.html.erb | 4 +++-
app/views/nodes/chapters.html.erb | 6 ++++--
app/views/nodes/edit.html.erb | 8 +++++---
app/views/nodes/index.html.erb | 4 +++-
app/views/nodes/show.html.erb | 15 ++++++++++-----
app/views/occurrences/index.html.erb | 4 +++-
app/views/pages/index.html.erb | 4 +++-
app/views/revisions/diff.html.erb | 10 ++++++----
app/views/users/_user.html.erb | 7 ++++---
app/views/users/index.html.erb | 8 ++++++--
app/views/users/show.html.erb | 4 +++-
test/controllers/users_controller_test.rb | 2 +-
19 files changed, 86 insertions(+), 39 deletions(-)
(limited to 'app/views/nodes/chapters.html.erb')
diff --git a/app/views/assets/index.html.erb b/app/views/assets/index.html.erb
index 6591091..8c35561 100644
--- a/app/views/assets/index.html.erb
+++ b/app/views/assets/index.html.erb
@@ -1,6 +1,8 @@
- <%= link_to 'New node', new_node_path, class: 'action_button' %>
+ <%= link_to new_node_path, class: 'action_button' do %>
+ <%= icon("plus", library: "tabler", "aria-hidden": true) %> Create node
+ <% end %>
Creates a node with no parent or kind set — for a specific page, use the wizard's create flow or "add child" from an existing node instead.