diff options
| author | hukl <contact@smyck.org> | 2009-02-22 17:00:57 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-02-22 17:00:57 +0100 |
| commit | c129af3e013edb9e68bdf9069bd2879590bc54fd (patch) | |
| tree | 3bef8df8e42e5b25225a10a994673b139ef03fca /app/views | |
| parent | 3df96bbb94a6d89709983d0911ca79491ed6e981 (diff) | |
replaced freeform textfield with select tag which has to be replaced with something more decent soon. but it works for now
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/nodes/new.html.erb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/views/nodes/new.html.erb b/app/views/nodes/new.html.erb index d657eb3..29a26b6 100644 --- a/app/views/nodes/new.html.erb +++ b/app/views/nodes/new.html.erb | |||
| @@ -4,8 +4,13 @@ | |||
| 4 | 4 | ||
| 5 | <% form_for @node do |f| %> | 5 | <% form_for @node do |f| %> |
| 6 | <p> | 6 | <p> |
| 7 | <%= f.label 'Parent node - Leave empty for top level' %><br /> | 7 | <%= f.label 'Parent node' %><br /> |
| 8 | <%= text_field_tag :parent_unique_name %> | 8 | <%= select_tag( |
| 9 | :parent_id, | ||
| 10 | options_for_select( | ||
| 11 | Node.root.self_and_descendants.select{|x| x.level < 3}.map{|x| [x.unique_name,x.id]} | ||
| 12 | ) | ||
| 13 | ) %> | ||
| 9 | </p> | 14 | </p> |
| 10 | <p> | 15 | <p> |
| 11 | <%= f.label :slug %><br /> | 16 | <%= f.label :slug %><br /> |
