diff options
Diffstat (limited to 'app/views/revisions')
| -rw-r--r-- | app/views/revisions/diff.html.erb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/views/revisions/diff.html.erb b/app/views/revisions/diff.html.erb index b9ce6bdd..5638b7ab 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 %> |
