summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-12 23:43:02 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-12 23:43:02 +0200
commit848ce18303f927bfadaf0965a769cae2c62492a0 (patch)
tree3cb14888a0df92178cd20037e7fe94f407d5ad2e /app/views
parentb271648f89cba7cafafa1b73b1658b1c1bc0e4b0 (diff)
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.
Diffstat (limited to 'app/views')
-rw-r--r--app/views/assets/index.html.erb8
-rw-r--r--app/views/assets/show.html.erb4
-rw-r--r--app/views/events/edit.html.erb6
-rw-r--r--app/views/events/index.html.erb8
-rw-r--r--app/views/events/show.html.erb8
-rw-r--r--app/views/events/without_node.html.erb4
-rw-r--r--app/views/menu_items/index.html.erb11
-rw-r--r--app/views/nodes/_node_list.html.erb4
-rw-r--r--app/views/nodes/chapters.html.erb6
-rw-r--r--app/views/nodes/edit.html.erb8
-rw-r--r--app/views/nodes/index.html.erb4
-rw-r--r--app/views/nodes/show.html.erb15
-rw-r--r--app/views/occurrences/index.html.erb4
-rw-r--r--app/views/pages/index.html.erb4
-rw-r--r--app/views/revisions/diff.html.erb10
-rw-r--r--app/views/users/_user.html.erb7
-rw-r--r--app/views/users/index.html.erb8
-rw-r--r--app/views/users/show.html.erb4
18 files changed, 85 insertions, 38 deletions
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 @@
1<h1>Assets</h1> 1<h1>Assets</h1>
2 2
3<%= link_to 'New asset', new_asset_path, class: 'action_button' %> 3<%= link_to new_asset_path, class: 'action_button' do %>
4 <%= icon("plus", library: "tabler", "aria-hidden": true) %> Create asset
5<% end %>
4 6
5<%= will_paginate @assets %> 7<%= will_paginate @assets %>
6 8
@@ -20,7 +22,9 @@
20 <td><%= asset.upload.content_type %></td> 22 <td><%= asset.upload.content_type %></td>
21 <td><%= link_to 'Show', asset %></td> 23 <td><%= link_to 'Show', asset %></td>
22 <td><%= link_to 'Edit', edit_asset_path(asset) %></td> 24 <td><%= link_to 'Edit', edit_asset_path(asset) %></td>
23 <td><%= button_to 'Destroy', asset, method: :delete, form: { data: { confirm: 'Are you sure?' }, class: 'button_to destructive' } %></td> 25 <td><%= button_to asset, method: :delete, form: { data: { confirm: 'Are you sure?' }, class: 'button_to destructive' } do %>
26 <%= icon("trash", library: "tabler", "aria-hidden": true) %> Destroy
27 <% end %></td>
24 </tr> 28 </tr>
25<% end %> 29<% end %>
26</table> 30</table>
diff --git a/app/views/assets/show.html.erb b/app/views/assets/show.html.erb
index 0286678..5717dd9 100644
--- a/app/views/assets/show.html.erb
+++ b/app/views/assets/show.html.erb
@@ -6,7 +6,9 @@
6 <div class="node_content node_info_group"> 6 <div class="node_content node_info_group">
7 <div class="node_info_group_items"> 7 <div class="node_info_group_items">
8 <div class="node_info_item"> 8 <div class="node_info_item">
9 <%= link_to 'Edit', edit_asset_path(@asset), class: 'action_button' %> 9 <%= link_to edit_asset_path(@asset), class: 'action_button' do %>
10 <%= icon("edit", library: "tabler", "aria-hidden": true) %> Edit
11 <% end %>
10 </div> 12 </div>
11 <div class="node_info_item"> 13 <div class="node_info_item">
12 <%= link_to 'Back', assets_path %> 14 <%= link_to 'Back', assets_path %>
diff --git a/app/views/events/edit.html.erb b/app/views/events/edit.html.erb
index 45b084f..b6564a4 100644
--- a/app/views/events/edit.html.erb
+++ b/app/views/events/edit.html.erb
@@ -2,8 +2,10 @@
2 2
3<div class="node_action_bar standalone_action_bar"> 3<div class="node_action_bar standalone_action_bar">
4 <%= link_to 'Back', safe_return_to(params[:return_to] || events_path) %> 4 <%= link_to 'Back', safe_return_to(params[:return_to] || events_path) %>
5 <%= button_to 'Destroy', event_path(@event), method: :delete, 5 <%= button_to event_path(@event), method: :delete,
6 form: { data: { confirm: 'Delete this event?' }, class: 'button_to destructive' } %> 6 form: { data: { confirm: 'Delete this event?' }, class: 'button_to destructive' } do %>
7 <%= icon("trash", library: "tabler", "aria-hidden": true) %> Destroy
8 <% end %>
7</div> 9</div>
8 10
9<%= form_for(@event) do |f| %> 11<%= form_for(@event) do |f| %>
diff --git a/app/views/events/index.html.erb b/app/views/events/index.html.erb
index 3d953d5..dde897e 100644
--- a/app/views/events/index.html.erb
+++ b/app/views/events/index.html.erb
@@ -1,7 +1,11 @@
1<h1>Events</h1> 1<h1>Events</h1>
2 2
3<%= link_to 'New event', new_event_path, class: 'action_button' %> 3<div class="button_row">
4<%= link_to 'View events without a page →', without_node_events_path %> 4 <%= link_to new_event_path, class: 'action_button' do %>
5 <%= icon("plus", library: "tabler", "aria-hidden": true) %> Create event
6 <% end %>
7 <%= link_to 'View events without a page →', without_node_events_path %>
8</div>
5 9
6<%= will_paginate @events %> 10<%= will_paginate @events %>
7 11
diff --git a/app/views/events/show.html.erb b/app/views/events/show.html.erb
index 5812228..ac084c9 100644
--- a/app/views/events/show.html.erb
+++ b/app/views/events/show.html.erb
@@ -11,10 +11,14 @@
11 </div> 11 </div>
12 <% end %> 12 <% end %>
13 <div class="node_info_item"> 13 <div class="node_info_item">
14 <%= link_to 'Edit', edit_event_path(@event, return_to: request.path), class: 'action_button' %> 14 <%= link_to edit_event_path(@event, return_to: request.path), class: 'action_button' do %>
15 <%= icon("edit", library: "tabler", "aria-hidden": true) %> Edit
16 <% end %>
15 </div> 17 </div>
16 <div class="node_info_item"> 18 <div class="node_info_item">
17 <%= button_to 'Destroy', event_path(@event), method: :delete, form: { data: { confirm: 'Delete this event?' }, class: 'button_to destructive' } %> 19 <%= button_to event_path(@event), method: :delete, form: { data: { confirm: 'Delete this event?' }, class: 'button_to destructive' } do %>
20 <%= icon("trash", library: "tabler", "aria-hidden": true) %> Destroy
21 <% end %>
18 </div> 22 </div>
19 </div> 23 </div>
20 </div> 24 </div>
diff --git a/app/views/events/without_node.html.erb b/app/views/events/without_node.html.erb
index 52514ab..bb27173 100644
--- a/app/views/events/without_node.html.erb
+++ b/app/views/events/without_node.html.erb
@@ -1,7 +1,9 @@
1<h1>Events without a node</h1> 1<h1>Events without a node</h1>
2 2
3<%= link_to '← All events', events_path %> 3<%= link_to '← All events', events_path %>
4<%= link_to 'New event', new_event_path, class: 'action_button' %> 4<%= link_to new_event_path, class: 'action_button' do %>
5 <%= icon("plus", library: "tabler", "aria-hidden": true) %> Create event
6<% end %>
5 7
6<%= will_paginate @events %> 8<%= will_paginate @events %>
7 9
diff --git a/app/views/menu_items/index.html.erb b/app/views/menu_items/index.html.erb
index e84199b..591eb68 100644
--- a/app/views/menu_items/index.html.erb
+++ b/app/views/menu_items/index.html.erb
@@ -1,6 +1,8 @@
1<h1>Menu Items</h1> 1<h1>Menu Items</h1>
2 2
3<%= link_to 'New menu item', new_menu_item_path, class: 'action_button' %> 3<%= link_to new_menu_item_path, class: 'action_button' do %>
4 <%= icon("plus", library: "tabler", "aria-hidden": true) %> Create menu item
5<% end %>
4 6
5<table id="menu_item_list"> 7<table id="menu_item_list">
6 <% @menu_items.each do |menu_item| %> 8 <% @menu_items.each do |menu_item| %>
@@ -11,9 +13,10 @@
11 <td class="menu_item_title"><%= menu_item.title %></td> 13 <td class="menu_item_title"><%= menu_item.title %></td>
12 <td><%= link_to "Edit", edit_menu_item_path(menu_item) %></td> 14 <td><%= link_to "Edit", edit_menu_item_path(menu_item) %></td>
13 <td> 15 <td>
14 <%= button_to "Delete", menu_item_path(menu_item), 16 <%= button_to menu_item_path(menu_item), method: :delete,
15 method: :delete, 17 form: { data: { confirm: "Do you really want to destroy the menu entry?" }, class: 'button_to destructive' } do %>
16 form: { data: { confirm: "Are you sure?" }, class: 'button_to destructive' } %> 18 <%= icon("trash", library: "tabler", "aria-hidden": true) %> Destroy
19 <% end %>
17 </td> 20 </td>
18 </tr> 21 </tr>
19 <% end %> 22 <% end %>
diff --git a/app/views/nodes/_node_list.html.erb b/app/views/nodes/_node_list.html.erb
index 03f38b4..f7210f1 100644
--- a/app/views/nodes/_node_list.html.erb
+++ b/app/views/nodes/_node_list.html.erb
@@ -4,7 +4,9 @@
4 <% end %> 4 <% end %>
5 <%= hidden_field_tag :tags, params[:tags] if params[:tags].present? %> 5 <%= hidden_field_tag :tags, params[:tags] if params[:tags].present? %>
6 <%= text_field_tag :q, params[:q], placeholder: "Search title, abstract, body…" %> 6 <%= text_field_tag :q, params[:q], placeholder: "Search title, abstract, body…" %>
7 <%= submit_tag "Search", class: "action_button" %> 7 <%= button_tag type: "submit", class: "action_button" do %>
8 <%= icon("search", library: "tabler", "aria-hidden": true) %> Search
9 <% end %>
8 <% if params[:q].present? || params[:kinds].present? || params[:tags].present? %> 10 <% if params[:q].present? || params[:kinds].present? || params[:tags].present? %>
9 <%= link_to "Reset", url_for(controller: params[:controller], action: params[:action]) %> 11 <%= link_to "Reset", url_for(controller: params[:controller], action: params[:action]) %>
10 <% end %> 12 <% end %>
diff --git a/app/views/nodes/chapters.html.erb b/app/views/nodes/chapters.html.erb
index 939f19c..543bc53 100644
--- a/app/views/nodes/chapters.html.erb
+++ b/app/views/nodes/chapters.html.erb
@@ -1,9 +1,11 @@
1<h1>Chapters</h1> 1<h1>Chapters</h1>
2 2
3<%= form_tag chapters_nodes_path, method: :get do %> 3<%= form_tag chapters_nodes_path, method: :get, class: "node_search_form" do %>
4 <label><%= check_box_tag 'kinds[]', 'erfa', @kind_keys.include?('erfa') %> Erfa</label> 4 <label><%= check_box_tag 'kinds[]', 'erfa', @kind_keys.include?('erfa') %> Erfa</label>
5 <label><%= check_box_tag 'kinds[]', 'chaostreff', @kind_keys.include?('chaostreff') %> Chaostreff</label> 5 <label><%= check_box_tag 'kinds[]', 'chaostreff', @kind_keys.include?('chaostreff') %> Chaostreff</label>
6 <%= submit_tag "Filter", class: "action_button" %> 6 <%= button_tag type: "submit", class: "action_button" do %>
7 <%= icon("filter", library: "tabler", "aria-hidden": true) %> Filter
8 <% end %>
7<% end %> 9<% end %>
8 10
9<%= render 'node_list' %> 11<%= render 'node_list' %>
diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb
index 13b78fc..1ac05e0 100644
--- a/app/views/nodes/edit.html.erb
+++ b/app/views/nodes/edit.html.erb
@@ -6,9 +6,11 @@
6 disabled: @node.autosave.present? %> 6 disabled: @node.autosave.present? %>
7 7
8 <% if @node.autosave || (@node.draft && @node.head) %> 8 <% if @node.autosave || (@node.draft && @node.head) %>
9 <%= button_to (@node.draft && !@node.autosave ? 'Destroy Draft' : 'Discard Autosave'), 9 <%= button_to revert_node_path(@node), method: :put,
10 revert_node_path(@node), method: :put, 10 form: { data: { confirm: "This cannot be undone. Continue?" }, class: 'button_to destructive' } do %>
11 form: { data: { confirm: "This cannot be undone. Continue?" }, class: 'button_to destructive' } %> 11 <%= icon("trash", library: "tabler", "aria-hidden": true) %>
12 <%= @node.draft && !@node.autosave ? "Destroy Draft" : "Discard Autosave" %>
13 <% end %>
12 <% if pair = @node.available_layer_pairs.find { |p| p.include?(:autosave) } %> 14 <% if pair = @node.available_layer_pairs.find { |p| p.include?(:autosave) } %>
13 <%= button_to 'What changed?', 15 <%= button_to 'What changed?',
14 diff_node_revisions_path(@node), 16 diff_node_revisions_path(@node),
diff --git a/app/views/nodes/index.html.erb b/app/views/nodes/index.html.erb
index 2688ea1..3bb251c 100644
--- a/app/views/nodes/index.html.erb
+++ b/app/views/nodes/index.html.erb
@@ -1,7 +1,9 @@
1<h1>Nodes</h1> 1<h1>Nodes</h1>
2 2
3<div> 3<div>
4 <%= link_to 'New node', new_node_path, class: 'action_button' %> 4 <%= link_to new_node_path, class: 'action_button' do %>
5 <%= icon("plus", library: "tabler", "aria-hidden": true) %> Create node
6 <% end %>
5 <span class="field_hint">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.</span> 7 <span class="field_hint">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.</span>
6</div> 8</div>
7 9
diff --git a/app/views/nodes/show.html.erb b/app/views/nodes/show.html.erb
index 07cb5d1..6e20258 100644
--- a/app/views/nodes/show.html.erb
+++ b/app/views/nodes/show.html.erb
@@ -25,7 +25,10 @@
25 <% if locked_by_other %> 25 <% if locked_by_other %>
26 <span class="disabled_action"><%= edit_label %></span> 26 <span class="disabled_action"><%= edit_label %></span>
27 <% else %> 27 <% else %>
28 <%= link_to (@node.autosave ? "Continue Editing" : (@node.draft ? "Edit Draft" : "Lock + Edit")), edit_node_path(@node), class: "action_button" %> 28 <%= link_to edit_node_path(@node), class: "action_button" do %>
29 <%= icon("edit", library: "tabler", "aria-hidden": true) %>
30 <%= @node.autosave ? "Continue Editing" : (@node.draft ? "Edit Draft" : "Lock + Edit") %>
31 <% end %>
29 <% if !@node.draft && !@node.autosave %> 32 <% if !@node.draft && !@node.autosave %>
30 <span class="field_hint">Nothing pending — this will start a fresh draft.</span> 33 <span class="field_hint">Nothing pending — this will start a fresh draft.</span>
31 <% end %> 34 <% end %>
@@ -51,10 +54,12 @@
51 <% end %> 54 <% end %>
52 <% if @node.autosave || (@node.draft && @node.head) %> 55 <% if @node.autosave || (@node.draft && @node.head) %>
53 <div class="node_info_item"> 56 <div class="node_info_item">
54 <%= button_to (@node.draft && !@node.autosave ? 'Destroy Draft' : 'Discard Autosave'), 57 <%= button_to revert_node_path(@node), method: :put,
55 revert_node_path(@node), method: :put, 58 params: { return_to: request.path },
56 params: { return_to: request.path }, 59 form: { data: { confirm: "This cannot be undone. Continue?" }, class: 'button_to destructive' } do %>
57 form: { data: { confirm: "This cannot be undone. Continue?" }, class: 'button_to destructive' } %> 60 <%= icon("trash", library: "tabler", "aria-hidden": true) %>
61 <%= @node.draft && !@node.autosave ? "Destroy Draft" : "Discard Autosave" %>
62 <% end %>
58 </div> 63 </div>
59 <% end %> 64 <% end %>
60 <% end %> 65 <% end %>
diff --git a/app/views/occurrences/index.html.erb b/app/views/occurrences/index.html.erb
index 82818d0..aa084ed 100644
--- a/app/views/occurrences/index.html.erb
+++ b/app/views/occurrences/index.html.erb
@@ -18,7 +18,9 @@
18 <td><%=h occurrence.event_id %></td> 18 <td><%=h occurrence.event_id %></td>
19 <td><%= link_to 'Show', occurrence %></td> 19 <td><%= link_to 'Show', occurrence %></td>
20 <td><%= link_to 'Edit', edit_occurrence_path(occurrence) %></td> 20 <td><%= link_to 'Edit', edit_occurrence_path(occurrence) %></td>
21 <td><%= button_to 'Destroy', occurrence, method: :delete, form: { data: { confirm: 'Are you sure?' } } %></td> 21 <td><%= button_to occurrence, method: :delete, form: { data: { confirm: 'Are you sure?' }, class: 'button_to destructive' } do %>
22 <%= icon("trash", library: "tabler", "aria-hidden": true) %> Destroy
23 <% end %></td>
22 </tr> 24 </tr>
23<% end %> 25<% end %>
24</table> 26</table>
diff --git a/app/views/pages/index.html.erb b/app/views/pages/index.html.erb
index 05c7311..da67871 100644
--- a/app/views/pages/index.html.erb
+++ b/app/views/pages/index.html.erb
@@ -12,7 +12,9 @@
12 <td><%=h page.title %></td> 12 <td><%=h page.title %></td>
13 <td><%= link_to 'Show', content_path(:page_path => page.node.unique_path) %></td> 13 <td><%= link_to 'Show', content_path(:page_path => page.node.unique_path) %></td>
14 <td><%= link_to 'Edit', edit_page_path(page) %></td> 14 <td><%= link_to 'Edit', edit_page_path(page) %></td>
15 <td><%= button_to 'Destroy', page, method: :delete, form: { data: { confirm: 'Are you sure?' } } %></td> 15 <td><%= button_to page, method: :delete, form: { data: { confirm: 'Are you sure?' }, class: 'button_to destructive' } do %>
16 <%= icon("trash", library: "tabler", "aria-hidden": true) %> Destroy
17 <% end %></td>
16 </tr> 18 </tr>
17<% end %> 19<% end %>
18</table> 20</table>
diff --git a/app/views/revisions/diff.html.erb b/app/views/revisions/diff.html.erb
index b9ce6bd..5638b7a 100644
--- a/app/views/revisions/diff.html.erb
+++ b/app/views/revisions/diff.html.erb
@@ -49,10 +49,12 @@
49 <% end %> 49 <% end %>
50 50
51 <% if !@locked_by_other && (@node.autosave || @node.draft) %> 51 <% if !@locked_by_other && (@node.autosave || @node.draft) %>
52 <%= button_to (@node.draft && !@node.autosave ? 'Destroy Draft' : 'Discard Autosave'), 52 <%= button_to revert_node_path(@node), method: :put,
53 revert_node_path(@node), method: :put, 53 params: { return_to: request.fullpath },
54 params: { return_to: request.fullpath }, 54 form: { data: { confirm: "This cannot be undone. Continue?" }, class: 'button_to destructive' } do %>
55 form: { data: { confirm: "This cannot be undone. Continue?" }, class: 'button_to destructive' } %> 55 <%= icon("trash", library: "tabler", "aria-hidden": true) %>
56 <%= @node.draft && !@node.autosave ? "Destroy Draft" : "Discard Autosave" %>
57 <% end %>
56 <% end %> 58 <% end %>
57 </p> 59 </p>
58<% end %> 60<% end %>
diff --git a/app/views/users/_user.html.erb b/app/views/users/_user.html.erb
index 798b82b..3a88f5e 100644
--- a/app/views/users/_user.html.erb
+++ b/app/views/users/_user.html.erb
@@ -7,9 +7,10 @@
7 <%= link_to "edit", edit_user_path(user) %> 7 <%= link_to "edit", edit_user_path(user) %>
8 </td> 8 </td>
9 <td> 9 <td>
10 <%= button_to "destroy", user_path(user), 10 <%= button_to user_path(user), method: :delete,
11 method: :delete, 11 form: { data: { confirm: "Do you really want to destroy user #{user.login}?" }, class: 'button_to destructive' } do %>
12 form: { data: { confirm: "Do you really want to delete user #{user.login}?" }, class: 'button_to destructive' } %> 12 <%= icon("trash", library: "tabler", "aria-hidden": true) %> Destroy
13 <% end %>
13 </td> 14 </td>
14 <% end %> 15 <% end %>
15</tr> 16</tr>
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb
index 46e958b..4f5266d 100644
--- a/app/views/users/index.html.erb
+++ b/app/views/users/index.html.erb
@@ -1,5 +1,7 @@
1<h1>Admins</h1> 1<h1>Admins</h1>
2<%= link_to 'New admin user', new_user_path(admin: true), class: 'action_button' %> 2<%= link_to new_user_path(admin: true), class: 'action_button' do %>
3 <%= icon("plus", library: "tabler", "aria-hidden": true) %> Create admin user
4<% end %>
3<table class="user_table"> 5<table class="user_table">
4 <tr class="header"> 6 <tr class="header">
5 <th>Login</th> 7 <th>Login</th>
@@ -11,7 +13,9 @@
11</table> 13</table>
12 14
13<h1>Users</h1> 15<h1>Users</h1>
14<%= link_to 'New user', new_user_path, class: 'action_button' %> 16<%= link_to new_user_path, class: 'action_button' do %>
17 <%= icon("plus", library: "tabler", "aria-hidden": true) %> Create user
18<% end %>
15<table class="user_table"> 19<table class="user_table">
16 <tr class="header"> 20 <tr class="header">
17 <th>Login</th> 21 <th>Login</th>
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index e744efe..70881db 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -6,7 +6,9 @@
6 <div class="node_content node_info_group"> 6 <div class="node_content node_info_group">
7 <div class="node_info_group_items"> 7 <div class="node_info_group_items">
8 <div class="node_info_item"> 8 <div class="node_info_item">
9 <%= link_to 'Edit', edit_user_path(@user), class: 'action_button' %> 9 <%= link_to edit_user_path(@user), class: 'action_button' do %>
10 <%= icon("edit", library: "tabler", "aria-hidden": true) %> Edit
11 <% end %>
10 </div> 12 </div>
11 </div> 13 </div>
12 </div> 14 </div>