diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-10 02:13:02 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-10 02:13:02 +0200 |
| commit | c2b2648d327e1c1749c37fe2e58cd051ed871547 (patch) | |
| tree | e8d3c48eb01b8d6b512d20603a1db8f910ec110c /app/views | |
| parent | 205e6216fc7850fe717122c189e5003d1f9e8afe (diff) | |
Destroying Draft or Discarding Autosave drops you where you left
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/nodes/show.html.erb | 1 | ||||
| -rw-r--r-- | app/views/revisions/diff.html.erb | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/app/views/nodes/show.html.erb b/app/views/nodes/show.html.erb index 2469310..8b9e98b 100644 --- a/app/views/nodes/show.html.erb +++ b/app/views/nodes/show.html.erb | |||
| @@ -53,6 +53,7 @@ | |||
| 53 | <div class="node_info_item"> | 53 | <div class="node_info_item"> |
| 54 | <%= button_to (@node.draft && !@node.autosave ? 'Destroy Draft' : 'Discard Autosave'), | 54 | <%= button_to (@node.draft && !@node.autosave ? 'Destroy Draft' : 'Discard Autosave'), |
| 55 | revert_node_path(@node), method: :put, | 55 | revert_node_path(@node), method: :put, |
| 56 | params: { return_to: request.path }, | ||
| 56 | form: { data: { confirm: "This cannot be undone. Continue?" }, class: 'button_to destructive' } %> | 57 | form: { data: { confirm: "This cannot be undone. Continue?" }, class: 'button_to destructive' } %> |
| 57 | </div> | 58 | </div> |
| 58 | <% end %> | 59 | <% end %> |
diff --git a/app/views/revisions/diff.html.erb b/app/views/revisions/diff.html.erb index 3157dca..490cf17 100644 --- a/app/views/revisions/diff.html.erb +++ b/app/views/revisions/diff.html.erb | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | <% if !@locked_by_other && (@node.autosave || @node.draft) %> | 36 | <% if !@locked_by_other && (@node.autosave || @node.draft) %> |
| 37 | <%= button_to (@node.draft && !@node.autosave ? 'Destroy Draft' : 'Discard Autosave'), | 37 | <%= button_to (@node.draft && !@node.autosave ? 'Destroy Draft' : 'Discard Autosave'), |
| 38 | revert_node_path(@node), method: :put, | 38 | revert_node_path(@node), method: :put, |
| 39 | params: { return_to: request.fullpath }, | ||
| 39 | form: { data: { confirm: "This cannot be undone. Continue?" }, class: 'button_to destructive' } %> | 40 | form: { data: { confirm: "This cannot be undone. Continue?" }, class: 'button_to destructive' } %> |
| 40 | <% end %> | 41 | <% end %> |
| 41 | </p> | 42 | </p> |
