diff options
Diffstat (limited to 'app/views/nodes/edit.html.erb')
| -rw-r--r-- | app/views/nodes/edit.html.erb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb index cdc9b36e..1c194101 100644 --- a/app/views/nodes/edit.html.erb +++ b/app/views/nodes/edit.html.erb | |||
| @@ -6,9 +6,16 @@ | |||
| 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 changes'), | 9 | <%= button_to (@node.draft && !@node.autosave ? 'Destroy Draft' : 'Discard Autosave'), |
| 10 | revert_node_path(@node), method: :put, | 10 | revert_node_path(@node), method: :put, |
| 11 | form: { data: { confirm: "This cannot be undone. Continue?" }, class: 'button_to destructive' } %> | 11 | form: { data: { confirm: "This cannot be undone. Continue?" }, class: 'button_to destructive' } %> |
| 12 | <% if pair = @node.available_layer_pairs.find { |p| p.include?(:autosave) } %> | ||
| 13 | <%= button_to 'What changed?', | ||
| 14 | diff_node_revisions_path(@node), | ||
| 15 | method: :get, | ||
| 16 | params: { start_revision: pair.first, end_revision: pair.last }, | ||
| 17 | form: { class: 'button_to computation' } %> | ||
| 18 | <% end %> | ||
| 12 | <% end %> | 19 | <% end %> |
| 13 | 20 | ||
| 14 | <%= submit_tag "Save Draft", form: dom_id(@node, :edit) %> | 21 | <%= submit_tag "Save Draft", form: dom_id(@node, :edit) %> |
