summaryrefslogtreecommitdiff
path: root/app/views/nodes/edit.html.erb
blob: 6848dfb0a684322f9f6798d586a7c6ed33711fbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<h1>Nodes#edit</h1>

<h1>Editing page</h1>

<%= I18n.locale %>

<%= @node.unique_name %>

<div class="page_editor">
  <% form_for(@node) do |f| %>
    <%= f.error_messages %>
    
    <% draft = @node.find_or_create_draft( current_user ) %>
    <% fields_for draft do |d| %>
    <p></p>
    <p>
      <%= d.label :title %><br />
      <%= d.text_field :title %>
    </p>
    <p>
      <%= d.label :abstract %><br />
      <%= d.text_area :abstract %>
    </p>
    <p>
      <%= d.label :body %><br />
      <%= d.text_area :body, :class => 'with_editor' %>
    </p>
    <% end %>
      
    <p>
      <%= f.submit "Update" %>
    </p>
  <% end %>
  
  <%= link_to 'Show', @node %> |
  <%= link_to 'Back', nodes_path %>
</div>