summaryrefslogtreecommitdiff
path: root/app/views/nodes/new.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/nodes/new.html.erb')
-rw-r--r--app/views/nodes/new.html.erb55
1 files changed, 25 insertions, 30 deletions
diff --git a/app/views/nodes/new.html.erb b/app/views/nodes/new.html.erb
index f5574547..0a053250 100644
--- a/app/views/nodes/new.html.erb
+++ b/app/views/nodes/new.html.erb
@@ -6,13 +6,11 @@
6 </div> 6 </div>
7<% end %> 7<% end %>
8 8
9<p>What kind of node do you want to create?</p>
10
11<%= form_tag nodes_path do %> 9<%= form_tag nodes_path do %>
12<table id="new_node"> 10<div id="new_node">
13 <tr> 11
14 <td class="description">Type</td> 12 <div class="node_description">Type</div>
15 <td> 13 <div class="node_content">
16 <% CccConventions::NODE_KINDS.each do |kind, config| %> 14 <% CccConventions::NODE_KINDS.each do |kind, config| %>
17 <p> 15 <p>
18 <%= radio_button_tag :kind, kind, kind == "generic", 16 <%= radio_button_tag :kind, kind, kind == "generic",
@@ -23,35 +21,32 @@
23 <% end %> 21 <% end %>
24 </p> 22 </p>
25 <% end %> 23 <% end %>
26 </td> 24 </div>
27 </tr> 25
28 <tr> 26 <div class="node_description">Title</div>
29 <td class="description">Title</td> 27 <div class="node_content">
30 <td><%= text_field_tag :title %> 28 <%= text_field_tag :title %>
31 <span class="field_hint">A URL slug will be generated from this automatically. You can review or adjust it afterward under the "metadata" section's Slug field.</span> 29 <span class="field_hint">A URL slug will be generated from this automatically. You can review or adjust it afterward under the "metadata" section's Slug field.</span>
32 </td> 30 </div>
33 </tr> 31
34 <tr id="parent_search_field"> 32 <div id="parent_search_field">
35 <td class="description">Parent</td> 33 <div class="node_description">Parent</div>
36 <td> 34 <div class="node_content">
37 <%= text_field_tag :parent_search_term, @parent_name %> 35 <%= text_field_tag :parent_search_term, @parent_name %>
38 <%= hidden_field_tag :parent_id, @parent_id %> 36 <%= hidden_field_tag :parent_id, @parent_id %>
39 <div id="search_results"> 37 <div id="search_results"></div>
38 </div>
39 </div>
40 40
41 </div> 41 <div class="node_description">Resulting path</div>
42 </td> 42 <div class="node_content">
43 </tr>
44 <tr>
45 <td class="description">Resulting path</td>
46 <td>
47 <span id="resulting_path">—</span> 43 <span id="resulting_path">—</span>
48 <button type="button" id="copy_resulting_path" class="unselected">copy</button> 44 <button type="button" id="copy_resulting_path" class="unselected">copy</button>
49 <span class="field_hint">This preview updates as you type. The final path can still be changed afterward by editing the title (for the last segment) or moving the node to a different parent (for everything before it).</span> 45 <span class="field_hint">This preview updates as you type. The final path can still be changed afterward by editing the title (for the last segment) or moving the node to a different parent (for everything before it).</span>
50 </td> 46 </div>
51 </tr> 47
52 <tr> 48 <div class="node_description"></div>
53 <td></td> 49 <div class="node_content right"><%= submit_tag "Create" %></div>
54 <td class="right"><%= submit_tag "Create" %></td> 50
55 </tr> 51</div>
56</table>
57<% end %> 52<% end %>