diff options
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/nodes/edit.html.erb | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb index 433c5eb..67e3c56 100644 --- a/app/views/nodes/edit.html.erb +++ b/app/views/nodes/edit.html.erb | |||
| @@ -4,10 +4,8 @@ | |||
| 4 | 4 | ||
| 5 | <% form_for(@node) do |f| %> | 5 | <% form_for(@node) do |f| %> |
| 6 | <%= f.error_messages %> | 6 | <%= f.error_messages %> |
| 7 | |||
| 8 | <% if draft = @node.find_or_create_draft( User.first ) %> | ||
| 9 | 7 | ||
| 10 | <% fields_for @node.draft do |d| %> | 8 | <% fields_for @node.find_or_create_draft( current_user ) do |d| %> |
| 11 | <p> | 9 | <p> |
| 12 | <%= d.label :title %><br /> | 10 | <%= d.label :title %><br /> |
| 13 | <%= d.text_field :title %> | 11 | <%= d.text_field :title %> |
| @@ -21,12 +19,7 @@ | |||
| 21 | <%= d.text_area :body %> | 19 | <%= d.text_area :body %> |
| 22 | </p> | 20 | </p> |
| 23 | <% end %> | 21 | <% end %> |
| 24 | 22 | ||
| 25 | <% else %> | ||
| 26 | |||
| 27 | <p>Page is locked</p> | ||
| 28 | |||
| 29 | <% end %> | ||
| 30 | <p> | 23 | <p> |
| 31 | <%= f.submit "Update" %> | 24 | <%= f.submit "Update" %> |
| 32 | </p> | 25 | </p> |
