summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/views/nodes/new.html.erb52
1 files changed, 37 insertions, 15 deletions
diff --git a/app/views/nodes/new.html.erb b/app/views/nodes/new.html.erb
index 29a26b6..935e34f 100644
--- a/app/views/nodes/new.html.erb
+++ b/app/views/nodes/new.html.erb
@@ -2,19 +2,41 @@
2 2
3<%= error_messages_for :node %> 3<%= error_messages_for :node %>
4 4
5<% form_for @node do |f| %> 5
6 <p> 6<p>What kind of node do you want to create?</p>
7 <%= f.label 'Parent node' %><br /> 7
8 <%= select_tag( 8<% form_for nodes_path do %>
9 :parent_id, 9<table id="new_node">
10 options_for_select( 10 <tr>
11 Node.root.self_and_descendants.select{|x| x.level < 3}.map{|x| [x.unique_name,x.id]} 11 <td class="description">Type</td>
12 ) 12 <td>
13 ) %> 13 <div>
14 </p> 14 <%= radio_button_tag :kind, "generic" %>
15 <p> 15 Generic ( can be created anywhere )
16 <%= f.label :slug %><br /> 16 </div>
17 <%= f.text_field :slug %> 17 <p>
18 </p> 18 <%= radio_button_tag :kind, "update" %>
19 <p><%= f.submit 'Create node' %></p> 19 Update / Press release ( is automatically created in /updates )
20 </p>
21 </td>
22 </tr>
23 <tr>
24 <td class="description">Title</td>
25 <td><%= text_field_tag :title %></td>
26 </tr>
27 <tr>
28 <td class="description">Parent</td>
29 <td>
30 <%= text_field_tag :parent_search_term %>
31 <%= hidden_field_tag :parent_id %>
32 <div id="search_results">
33
34 </div>
35 </td>
36 </tr>
37 <tr>
38 <td></td>
39 <td class="right"><%= submit_tag "Create" %></td>
40 </tr>
41</table>
20<% end %> \ No newline at end of file 42<% end %> \ No newline at end of file