diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-12 23:43:02 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-12 23:43:02 +0200 |
| commit | 848ce18303f927bfadaf0965a769cae2c62492a0 (patch) | |
| tree | 3cb14888a0df92178cd20037e7fe94f407d5ad2e /app/views/nodes/show.html.erb | |
| parent | b271648f89cba7cafafa1b73b1658b1c1bc0e4b0 (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/nodes/show.html.erb')
| -rw-r--r-- | app/views/nodes/show.html.erb | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/app/views/nodes/show.html.erb b/app/views/nodes/show.html.erb index 07cb5d13..6e202582 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 %> |
