diff options
| author | hukl <contact@smyck.org> | 2009-09-08 16:35:22 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-09-08 16:35:22 +0200 |
| commit | b981d83e5e005817a67b11ccf92dd65bb506bcd4 (patch) | |
| tree | 046778c6ef694178b12acf28837aa63d6b0a7493 /app/views | |
| parent | 03bde9fb42235af7147d6312e2cf6d928111dee1 (diff) | |
new interface for adding nodes. still needs a bit radio button magick
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/nodes/new.html.erb | 52 |
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 |
