diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-11 01:33:07 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-11 01:33:07 +0200 |
| commit | 15aff3eff51809d1ce21caab406a0ef8b13624b6 (patch) | |
| tree | 80cb30577b2edb8ccff05e408204d0f6dc7c3729 /app | |
| parent | 876697bdff7e03d98a7a426895b4e5dcc07c5a88 (diff) | |
Do not offer to destroy the only draft of a never-published node
Diffstat (limited to 'app')
| -rw-r--r-- | app/views/nodes/show.html.erb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/nodes/show.html.erb b/app/views/nodes/show.html.erb index 5756649..07cb5d1 100644 --- a/app/views/nodes/show.html.erb +++ b/app/views/nodes/show.html.erb | |||
| @@ -49,7 +49,7 @@ | |||
| 49 | form: { data: { confirm: "Publish this draft?" }, class: 'button_to state_changing' } %> | 49 | form: { data: { confirm: "Publish this draft?" }, class: 'button_to state_changing' } %> |
| 50 | </div> | 50 | </div> |
| 51 | <% end %> | 51 | <% end %> |
| 52 | <% if @node.draft || @node.autosave %> | 52 | <% if @node.autosave || (@node.draft && @node.head) %> |
| 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, |
