diff options
Diffstat (limited to 'app/views/nodes/edit.html.erb')
| -rw-r--r-- | app/views/nodes/edit.html.erb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb index 13b78fca..1ac05e08 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), |
